Re: [Mjpeg-users] Creating a loop?
Oh, I'm so stupid. It was the audio file. Some day I have to learn how to read. -- Lehmeier Michael <[EMAIL PROTECTED]> --- 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
Re: [Mjpeg-users] Creating a loop?
From: Andrew Stevens <[EMAIL PROTECTED]> > > > cat video.m2v >> video2.m2v ; cat video.m2v >> video2.m2v > > > mv video2.m2v video.m2v > > > mplex -f 8 audio.m2a video.m2v -o output.mpg > > > > I think if I see cat used with MPEG-2 files one more time I'll > > scream. > Actually, contactenating a MPEG-2 video elementary stream > (an .m2v) is *almost* concatenatable. You need to strip the > sequence end markers but thats about it That's what I wanted to hear! :) But how long is the sequence end marker? >From looking at the code I thought 0x1B7L, meaning stripping the last two bytes. So I did this: cat video.m2v | head -c -2 > video2.m2v cat video.m2v | head -c -2 >> video2.m2v cat video.m2v >> video2.m2v There seems to be more to it because now I get a: ++ WARN: [mplex] Data follows end of last recogniseable MPEG audio frame - bad stream? How many bytes do I need to cut at the end? > (provided the sequences > match in encoding parameters!!). They do. > Obviously, for a multiplexed program stream: cat - forget it ;-) I already thought that much. -- Lehmeier Michael <[EMAIL PROTECTED]> --- 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
Re: [Mjpeg-users] Creating a loop?
Hi Steven, > > cat video.m2v >> video2.m2v ; cat video.m2v >> video2.m2v > > mv video2.m2v video.m2v > > mplex -f 8 audio.m2a video.m2v -o output.mpg > > I think if I see cat used with MPEG-2 files one more time I'll > scream. Actually, contactenating a MPEG-2 video elementary stream (an .m2v) is *almost* concatenatable. You need to strip the sequence end markers but thats about it (provided the sequences match in encoding parameters!!). Obviously, for a multiplexed program stream: cat - forget it ;-) cheers, Andrew --- 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
Re: [Mjpeg-users] Creating a loop?
On Mon, 26 Jan 2004, Lehmeier Michael wrote: > I have created a menu-video for a dvd. > It is only four seconds long, so when I use dvd options to loop it, the > menu resets every four seconds, not enough to navigate. > > So I want to loop it before authoring it. Ten times should be enough. > What I do now is something like that: > > cat video.m2v >> video2.m2v ; cat video.m2v >> video2.m2v > mv video2.m2v video.m2v > mplex -f 8 audio.m2a video.m2v -o output.mpg I think if I see cat used with MPEG-2 files one more time I'll scream. EEK! :) > The problem is that mplex now wants to split the output file at the end > of every part I joined. > > Can I prevent this somehow? Yes. > Is there an other, easier way to create a loop? Yes - and it was shown recently, but in case it has not made it into the archives here's the basics: Create a SINGLE continuous input of YUV4MPEG2 data into the encoder and create a single .m2v file of the desired length. The same principle applies to the audio as well because splicing .mp2 files together can result in A/V sync problems and/or clicks&pops at the splice points. Basically it goes like this: #!/bin/sh skip1() { read junk cat return 0 } ( \ YUV4MPEG-producer#1; \ YUV4MPEG-producer#2 | skip1; \ YUV4MPEG-producer#3 | skip1; \ YUV4MPEG-producer#4 | skip1; \ ... YUV4MPEG-producer#10 | skip1; ) | mpeg2enc -f 8 -o video2.m2v The only problem that needs to be dealt with is the extra YUV4MPEG2 headers that are produced by the additional Y4M producers - just read the first line and throw it away. At the end of the encoding there will be a single continuous .m2v file. 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