On Sat, 5 Nov 2005, Steven M. Schultz wrote:

        Those do not look like yuvfps errors.  The mjpegtools portions of the
        script would put their name in the messages ([yuvcorrect], and so on).

        I see that '[yuvplay]' is logging messages but I can't seem to see
        a "yuvplay" anywhere in the script.

There's a second yuvplay command displaying the output of tee, just before it enters the encoder.

The resulting output file is empty. When I remove the yuvfps part from the
above command, everything works as expected.

        The "Encoded.m2v" or "EncoderPipe_23295" file?

The file Encoded.m2v is empty, EncoderPipe_23295 is a fifo file. In the mean time I discovered why this file is empty, it's because mpeg2enc failed. All of the filtering commands and yuvplay just kept on going, but mpeg2enc fails at the first frame already. I reduced the problem to the following command:

ffmpeg -i "widescreen.dv002.dv" -f image2pipe -vcodec pgmyuv -y /dev/stdout | pgmtoy4m -r 25:1 -i b -a 118:81 | yuvfps -n -r 30000:1001 | mpeg2enc -f 8 -o Encoded.m2v

which fails with this error message:

**ERROR: [mpeg2enc] Sample rate is greater than permitted in specified Level

When I look at the header of the stream that enters the encoder:

ffmpeg -i "widescreen.dv002.dv" -f image2pipe -vcodec pgmyuv -y /dev/stdout | pgmtoy4m -r 25:1 -i b -a 118:81 | yuvfps -n -r 30000:1001 | head -n 1

I see this:

YUV4MPEG2 W720 H576 F30000:1001 Ib A118:81 C420mpeg2

which looks fine. When I leave out the yuvfps part, the command works perfectly. The stream header looks like:

YUV4MPEG2 W720 H576 F25:1 Ib A118:81 C420mpeg2

So maybe the framerate 30000:1001 is causing a problem in mpeg2enc? This sounds unlikely as well, because mpeg2enc does seem to correctly interpret the framerate of the input stream:

   INFO: [mpeg2enc] Selecting DVD output profile
   INFO: [mpeg2enc] Assuming norm NTSC
   INFO: [mpeg2enc] Interlaced input - selecting interlaced encoding.
   INFO: [mpeg2enc] Encoding MPEG-2 video to ./Encoded.m2v
   INFO: [mpeg2enc] Horizontal size: 720 pel
   INFO: [mpeg2enc] Vertical size: 576 pel
   INFO: [mpeg2enc] Aspect ratio code: 3 = 16:9 display
   INFO: [mpeg2enc] Frame rate code:   4 = 30000.0/1001.0 (NTSC VIDEO)
   INFO: [mpeg2enc] Bitrate: 7500 KBit/s
   INFO: [mpeg2enc] Quality factor: 8 (Quantisation = 9) (1=best, 31=worst)
   INFO: [mpeg2enc] Field order for input: bottom-field-first
   INFO: [mpeg2enc] Sequence unlimited length
   INFO: [mpeg2enc] Search radius: 16
   INFO: [mpeg2enc] DualPrime: no
   INFO: [mpeg2enc] Using one-pass rate controller
   INFO: [mpeg2enc] GOP SIZE RANGE 9 TO 15
   INFO: [mpeg2enc] Setting colour/gamma parameters to "NTSC"
   INFO: [mpeg2enc] Progressive format frames = 0
**ERROR: [mpeg2enc] Sample rate is greater than permitted in specified Level

So why is this steam being rejected? What is this 'sample rate' that mpeg2enc is talking about?

        The other thing that is puzzling is

tee: write error

        That says 'tee' had a problem writing the output file EncoderPipe_23295

        Is there a permission or free space problem that would cause 'tee'
        to exit prematurely?  That could cause an empty output file too I
        think.   Does 'tee' produce errors like 'Runtime error (func=..."?

No, there isn't. Also, when I remove the yuvfps part from the command, things work perfectly.

Thanks for looking into the problem!

Cheers,

Dik


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to