VideoHelp.com forum archive
http://www.supermediastore.com/



Forum Archive Home -> Advanced Video Conversion -> Cleaning up a concatenated MPEG-2



Cleaning up a concatenated MPEG-2
thinker3932 posted 2008 Aug 18 11:59
I had two VOBs that I renamed to mpg and concatenated. They play fine, but I would like to clean up any "junk" that might have been at the header of the second VOB file (or the VOBs in general that was unique to VOB and not needed in mpg).

Any ideas what to look for in hex and what to delete from the file?

As to why I want to clean it up, the first MPG was 90 minutes long, but in the concatenated file the display on PowerDVD shows 82 minutes at the time the first file switches to the second. I am assuming this is an issue with junk in the file because on VideoLAN VLC player, the cutover reports at the correct time of 90 minutes, but shows the whole file to be only 105 minutes, when in fact it is over 180.

It plays fine on most players (but as you can imagine, some have issues with it). So any ideas what non-stream data I should hex edit out of there?



Baldrick posted 2008 Aug 18 13:13
I guess it would be easier to join them correctly using videoredo or avidemux. Or have you deleted the source vob files?


AlanHK posted 2008 Aug 18 13:29
Instead of concatenating and hex-editing, you could use VOB2MPG or VOBMerge.

If not possible, it wouldn't be a matter of just deleting stuff, but rebuilding the GOP timecodes.
MPEG-VCR has tools to do that.

Or possibly Restream could fix it.



thinker3932 posted 2008 Aug 20 15:57
Baldrick :
I guess it would be easier to join them correctly using videoredo or avidemux. Or have you deleted the source vob files?


The problem here is that it was a miniseries with two episodes--so I easily combined the vobs for the episodes but the two episodes were different titles/programs on the same disk--so that is where the joining has issues ..3_1.VOB to ...4_1.VOB

I have used ReStream successfully as suggested above --- but, it now takes a long time to "catchup" if I click ahead in the timeline (I am talking 30 seconds) What part of the MPEG stream am I removing that allows the A/V sync points or whatever it is that allows it to happen quicker?

Also, to use ReStream, I had to demux using TMPEng--and I could choose from MPEG-2 Program or MPEG-2 Super VCD; I chose Program; don't know if it was the muxing that created the subsequent delays in moving to a different point in the program or whether it was something in Restream?



poisondeathray posted 2008 Aug 20 16:02
You can use mpg2cut2 (free) and "append file" on the original files.

You cannot concatenate with a dos command, or you get errors.



SCDVD posted 2008 Aug 20 16:10
Any method of joining VOBs must preserve the structure. There is more to it that slapping the tail of one file to the head of another and wrapping some duct tape around it. You have to use a tool that is designed for this task such as the ones mentioned above.

Concatenating many types of files can create a number of problems. The only thing that concatenating a file does is join the files together so that it is a legal file to the OS. It doesn't take into consideration structural issues with the files. Imagine the problems you would have if you concatenated two data base files with different fields and records. You would have a broken file that wouldn't work in the application even though the OS would be happy to save and read the broken file.



FulciLives posted 2008 Aug 20 16:41
I've been on these forums not to mention computers for a long time and I've never run into the term Concatenating yet everyone here seems to be using it like it is some super common word.

I haven't a rat's ass idea what it means !!!

What the hell kind of insantiy is this ???

- John "FulciLives" Coleman



poisondeathray posted 2008 Aug 20 16:45
^ Programmers use it all the time, I'm going to guess the OP is a progammer. Who else likes to play with hex editers and concatenate things :)


SCDVD posted 2008 Aug 20 16:47
Here it what it means. http://en.wikipedia.org/wiki/Concatenation

It's a word that some people like to use because it makes them sound like a techno-big shot. It is the process of joining two data strings. It has no relevance for joining files with any type of structure that must be preserved.



thinker3932 posted 2008 Aug 20 16:52
Yes and no. MPEG was designed to be a stream. In its elemental form, you can concatenate binary streams as long as they are not inside of a container and as long as they have the exact same MPEG formatting and encoding--which is your point--files like this are usually contained in something like a vob or an mkv or something else to help programs deal with the contents--and you need to use tools that know how to strip that away before concatenating. I did use vobmerge--and that doesn't solve my problem entirely as I have some kind of problem with the GOP timecodes. I basically want to avoid decoding/reencoding. DOS concatenation works fine on elemental MPEG streams; but since I didn't encode these files; that is not what I am dealing with here.

FYI, the reason people use the term concatenate is that it is actually the command that one uses on Unix to do exactly what I describe. cat for short. If I am programming a voicemail system, I may cat two mpeg audio files together at the OS level. This I have done and it's the best, quickest way to do it. This is why the Microsoft Excel function is also called CONCATENATE if you ever have a need to merge two words in Excel.



SCDVD posted 2008 Aug 20 17:02
This is VideoHelp, not UnixHelp. We don't concatenate video files. Your were right poisondeathray, he's an engineer. You can also tell someone is an engineer because they like to debate and argue their little techno-points. It's their way of trying to socially cope. They think they are impressing you. I call it recreational equivocation.


FulciLives posted 2008 Aug 20 17:33
SCDVD :
This is VideoHelp, not UnixHelp. We don't concatenate video files. Your were right poisondeathray, he's an engineer. You can also tell someone is an engineer because they like to debate and argue their little techno-points. It's their way of trying to socially cope. They think they are impressing you. I call it recreational equivocation.

Now there are two words I know although that is a unique combination :lol:

- John "FulciLives" Coleman



AlanHK posted 2008 Aug 20 21:58
FulciLives :
I've been on these forums not to mention computers for a long time and I've never run into the term Concatenating yet everyone here seems to be using it like it is some super common word.

I haven't a rat's ass idea what it means !!!

What the hell kind of insantiy is this ???

- John "FulciLives" Coleman

I thought you were doing some Linux?

I was weaned on the Unix command line. One of the basic commands is "cat", short for "concatenate", used to copy and stream files. Works pretty much like "copy" with + in DOS.

See the Useless Use of Cat Award for which this should be a nominee.



AlanHK posted 2008 Aug 20 22:20
thinker3932 :
I have some kind of problem with the GOP timecodes. I basically want to avoid decoding/reencoding.


These are quite separate.

Encoding/reencoding refers to the video data in each frame and group of frames (GOP - Group Of Pictures). The timecodes are what players use to navigate amongst these through the file. Rewriting the timecodes is very simple and does not affect the video data, which is why those apps that do merge MPEG video will do so at virtually the same speed as the straight copy your cat method does. So you don't save any time and you end up with a screwy file that sort of plays, but probably has the wrong time indicator or goes out of sync. Why insist on doing this when there are many simple and free tools that do it right?

I've seen people drive in wood screws with a hammer to "save time" because they already had a hammer in their hand. The result was not pretty.



SCDVD posted 2008 Aug 20 22:57
AlanHK :

I've seen people drive in wood screws with a hammer to "save time" because they already had a hammer in their hand. The result was not pretty.


That says it very well.



sambat posted 2008 Aug 21 05:53
@thinker3932

Well, now that you've been put in your place and lectured by the guardians of the sacred torch, did you get anything useful from this farrago?



AlanHK posted 2008 Aug 21 09:21
sambat :
Well, now that you've been put in your place and lectured by the guardians of the sacred torch, did you get anything useful from this farrago?


Please, why don't you tell us how you would do it, or are you just sneering and sniping at those who tried to help?
Or perhaps you can give him a patch file he can hex edit in?



sambat posted 2008 Aug 21 12:32
SCDVD :
AlanHK :

I've seen people drive in wood screws with a hammer to "save time" because they already had a hammer in their hand. The result was not pretty.


That says it very well.


Where's the help here chum.
Presumably those who shower together are allowed to pass remarks, whereas the rest of the unwashed are out of the club.



lordsmurf posted 2008 Aug 21 12:59
FulciLives :
I've been on these forums not to mention computers for a long time and I've never run into the term Concatenating yet everyone here seems to be using it like it is some super common word.
I haven't a rat's ass idea what it means !!!
What the hell kind of insantiy is this ???
- John "FulciLives" Coleman

SCDVD :
Here it what it means. http://en.wikipedia.org/wiki/Concatenation
It's a word that some people like to use because it makes them sound like a techno-big shot. It is the process of joining two data strings. It has no relevance for joining files with any type of structure that must be preserved.


Indeed. CONCATENATE = MERGE
I hate the work "deprecate" too. DEPRECATE = DISCONTINUED and/or OBSOLETED

Video files should not be arbitrarily merged.



AlanHK posted 2008 Aug 21 21:06
sambat :
Where's the help here chum.


In my previous posts, chum, where I explained exactly what to do and why.

Where's the help you posted? So far two bile-filled posts attacking those who did try to share their experience and dissuade the OP from his problematic method. Do you fear his self-esteem was bruised by our lack of sensitivity?
Apologies to him if so. Not to you though.



AlanHK posted 2008 Aug 21 21:20
lordsmurf :
Indeed. CONCATENATE = MERGE
I hate the work "deprecate" too. DEPRECATE = DISCONTINUED and/or OBSOLETED


No, "CONCATENATE" means join end to end, one following the other.
"MERGE" implies a mixture -- e.g., muxing is a kind of merging.

If I have two lists:
A, E, M
c, f, h

concatenating would give: A, E, M, c, f, h
merging could give: A, c, E, f, h, M

And "DEPRECATED" means valid, but not recommended.
"DISCONTINUED" would mean it is unsupported.
Many HTML 3 elements are now deprecated, but not discontinued, they still work in modern browsers.



lordsmurf posted 2008 Aug 21 22:37
You're correct, but those are sadly the "practical definitions" these days.


thinker3932 posted 2008 Aug 25 20:37
Actually, I am not an engineer. Thanks to those of you who offered suggestions and sorry to those of you that I offended. Your points are well taken AlanHK. Anything since the MPEG-1 days seems to be a little beyond the duct tape phase--although I do tend to admire simpler times when duct tape would solve most problems. Some of the programs you mentioned will help -- either on this job or the next. Much appreciated.



Login/Register to our forum to be able to post here.








About   Advertise   Forum Archive   RSS Feeds   Statistics