On Wed, 20 Jul 2005, Raena Lea-Shannon wrote: > I tried re-encoding to .mov format with ffmpeg and the yuv4mpeg header can't > be read by mpeg2enc: > > lav2yuv /home/Raena/hdb2/Joan/Joan.mov |mpeg2enc -f 8 -S 3500 -o > /home/Raena/hdb2/Joan/Joan%d.m2v > INFO: [mpeg2enc] SETTING EXTENDED MMX for MOTION! > INFO: [mpeg2enc] SETTING MMX for TRANSFORM! > INFO: [mpeg2enc] SETTING EXTENDED MMX for PREDICTION! > Unable to identify file (not a supported format - avi, quicktime).
That could mean that ffmpeg isn't creating a valid Quicktime file but I think it's more likely that mjpegtools (specifically lav2yuv) was not built with Quicktime support. > **ERROR: [lav2yuv] Error opening /home/Raena/hdb2/Joan/Joan.mov > **ERROR: [mpeg2enc] Could not read YUV4MPEG2 header: system error (failed > read/write)! That's because lav2yuv doesn't recognize the input file and is breaking the pipeline which causes mpeg2enc to fail with an error (empty stream). When you built mjpegtools did you see these lines when running ./configure? checking for libquicktime >= 0.9.4... yes checking LIBQUICKTIME_CFLAGS... -I/usr/local/include/lqt checking LIBQUICKTIME_LIBS... -L/usr/local/lib -lquicktime -lpthread -lm -lz -ll The summary printed by ./configure should include a "true" for Quicktime: configure: MJPEG tools 1.7.0 build configuration : configure: configure: - X86 Optimizations: configure: - MMX/3DNow!/SSE enabled : true configure: - arch/cpu compiler flags : -march=pentium4 -mcpu=pentium4 configure: - video4linux recording/playback: true configure: - software MJPEG playback : true configure: - MPEG Z/Alpha : false configure: - Quicktime playback/recording : true configure: - PNG input support : true configure: - AVI MJPEG playback/recording : true (always) configure: - libDV (digital video) support : true configure: - Gtk+ support for glav : true Note the "Quicktime playback/recording : true". If Quicktime support is not builtin then lav2yuv will fail when trying to open the file. If you do have Quicktime support present then what does the libquicktime utility 'qtinfo' say about the input file? qtinfo /home/Raena/hdb2/Joan/Joan.mov > You suggested ... > possibility would be to use 'mplayer -vo yuv4mpeg' - you'll probably > need to create a FIFO (unless you have a lot of disk space ;)) and > I have trouble with the fifo. I have the files on another IDE device hdb2. Is > that a problem with fifo? Do I need to put all the files in and out on the The fifo simply needs to be present in the directory you run mplayer in. The source file can be anywhere. > hda2 where I have the OS? No, they can be anywhere you like. > mkfifo stream.yuv > mplayer -nosound -noframedrop -vo yuv4mpeg /path/to_my.avi & cat stream.yuv | > mpeg2enc -f 8 -o /path to/myfile.m2v That should be fine. > where do I pass the header info args for yuv4mpeg and what params/args do I > use? Well, 'yuv4mpeg' reads RAW (no YUV4MPEG2 header or frame markers) not YUV4MPEG2. First thing I would do is remove the YUV4MPEG2 info and then replace it using 'yuv4mpeg'. You will need to know the attributes of the input stream (square pixels or not, frame rate, top or bottom field first). As an example (you will almost certainly need to adapt the parameters) mkfifo stream.yuv mplayer ... & \ cat stream.yuv | y4mtoyuv | yuv4mpeg -w 640 -h 480 -x 420mpeg2 -a 1:1 -i t -r 30000:1001 | \ y4mscaler -O sar=10:11 -O size=704x480 | \ mpeg2enc -f 8 -q 4 -D 10 -E -10 -4 1 -2 1 -K tmpgenc -o output.m2v The above assumes you have 640x480 square pixels and are going to produce a 704x480 DVD. If you already have rectangular pixels then change the "-a 1:1" to be "-a 10:11" and leave out the y4mscaler command. I thought non-DV cards sampled at the 1:1 pixel rate but perhaps I'm getting forgetful or the programs/drivers have changed to use the Rec.601 pixel samplings. Try to get things going with lav2yuv and a Quicktime file first I think that'd be a lot easier. Cheers, Steven Schultz ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Mjpeg-users mailing list Mjpeg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mjpeg-users