On Thu, 22 Jan 2004, Richard Ellis wrote: > Is there any way to concatenate plural sets of mp2/m2v files for > multiplexing together into a single stream.
Not in a 100% reliable way. If you simply cat the files together you'll find that some software players ignore the discontinuity at the splice point but you'll also find other programs and players that are allergic to the splice point. There's also the possibility of clicks/pops in the audio at the junction. Some players will sail thru, others will artifact and some may even simply stop playing. > cat f1.mp2 f2.mp2 f3.mp2 > all.mp2 > cat f1.m2v f2.m2v f3.m2v > all.m2v > > mplex -f 8 -r 0 -V -b 230 -S 0 -o all.%0d.mpeg all.mp2 all.m2v > > And instead I end up getting three mpeg files, one each for the three > input files, as if they had been multiplexed individually. It would seem that mplex is seeing the discontinuity (clock/timestamp reset) as a 'new sequence' start command. > What I would like to get is a single mpeg file, made from > the "sum" of the three input files. Is there any way to make this > work correctly. Yes - but it takes preparation/setup in advance and not after the encoding has been done. The 100% guaranteed to work approach is to present the encoders with a continuous stream of data. Do the editing in what ever sound and video editor desired but then export single .wav and .y4m streams for encoding and then mux those together. Joining .mp2 files has resulted in a click/pop at the splice point the times I've tried it. I thought there was also the possibility of A/V sync issues but perhaps I'm thinking of something else. Creating a .wav file with an editor and encoding a single .wav file avoids those (possible) problems. It's really not hard at all to arrange for multiple yuv4mpeg2 sources to feed a single mpeg2enc process. (yuv4mpegsource1; yuv4mpegsource2; yuv4mpegsource3; ... ) | mpeg2enc Just use a simple shell function to strip off the extra header from all the sources except the first one. > I have tried in the past simply concatenating the separate mpeg files > into a single file (cat all*mpeg > total.mpeg) and the result plays It doesn't always work with all players. > the boundaries of the individual mpegs. If there were a way to > multiplex them together up front, the timestamps would be increasing > all the way through the resultant file. It's a job for mplex I suspect > I have not tried a concatenated -f 8 mpeg file on any hardware DVD > player, so I don't know if this trick only works with mplayer. Might work, might not - depends on the player. Some will glitch at the splice points while some might even stop playing. Your mileage may vary. I guess what's really needed is the ability for mplex to take multiple files and catenate them rather than muxing as multiple simultaneous video streams. Cheers, Steven Schultz ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Mjpeg-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mjpeg-users