On Friday 16 January 2004 23:41, Steven M. Schultz wrote: > On Fri, 16 Jan 2004, James Finnall wrote:
> > Thanks. What I think you want to do instead of creating > multiple .m2v files and appending them together is create a > _single_ y4m stream that goes into the encoder and produce a > _single_ .m2v file without any cat commands. Parentheses > (subshell) and semicolons are your friends ;) Something similar > to this: > I think I also agree on this as well. I have been trying to work something out like your script suggestion. But I keep running into the problem you describe next. > (jpeg2yuv #1; jpeg2yuv #2; ...) | mpeg2enc ... > > The big problem in doing that is each jpeg2yuv command generates > a YUV4MPEG2 header and the lower mjpegtools libraries will > declare that to be an error (because they are looking for either > end of file or FRAME\n). Thus the first line of each command > needs to be removed. > Yes, at the start of the second sequence, mpeg2enc complains about a bad header and terminates. > > I think the audio problems you're having are happening at the > splice points caused by cat'ing .m2v files together. Creating > a seamless .m2v file may solve your problems. > > No need for the -b since the default for -f 8 is fine. And -M > takes an argument - best to leave -M out unless you have a dual > cpu system (in which case -M 2 makes a lot of sense). The -M argument for mpeg2enc is in regard to multiple CPU usage. But for mplex it is in reference to segmented output. Because I cat'ed the files together, there are many start / end sequences and each force the creation of a new output file. Unless I use the -M switch. Then a warning message is displayed but the output remains in the one file. Of course, the segmentation is where my problems are, right? What I need is for jpeg2yuv and/or ppmtoy4m to have an option to strip the format info. So that the output files can be cat'd together. Of course the first time it is called, include the format, but then an option to continue the sequence. In that situation it would be the responsibility of the creator to insure that all files are equal qualities that match the original format. Or a separate util to strip the format info. Also, mpeg2enc could be instructed to ignore subsequent format info. The jpeg2yuv program will process mutliple files, but each file is two fields or 1 frame with -L 0 set. Thus I would need 30 files of the same image for 1 second of video. Repeated for 60 seconds, would be 1800 files. Or 162,000 files for 90 minutes of video. I will see what I can do with your script idea though. It has some operations I haven't done before. So it looks interesting to try. But it still looks like each time jpeg2yuv is called, the format info will be created in the stream. After the first sequence is complete then mpeg2enc will abort on the second sequence. With the same effect as files cat'ed together. I am not seeing where that is being avoided here. I also converted my jpeg files to ppm. (I found out it doesn't mean parts per million.) But I have had the same problem working with ppmtoy4m as well. I would think a process that works for jpeg2yuv would also work for ppmtoy4m. It also just came to me that Broadcast 2000 might be able to copy/paste some images to create a video stream as well. I have never used it for video before, just digitizing and editing audio files. I will see what I can do with it tomorrow. This operation looked so easy when I read the article in the Dec03 Linux Journal! James ------------------------------------------------------- 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