1

I'm making some experiences with the YUV raw video format. This YUV video I created (with ppmtoy4m from mjpegtools, from a series of screenshots taken at 24 fps) plays OK with Totem, correct rate, correct colors, everything. Plus, ffmpeg can convert it to a .mpg just fine. But mplayer and mencoder get lost. I'm using version 1.0-0.47.svn20100703 in CentOS 6.

I tried...

mplayer video.yuv -demuxer rawvideo -rawvideo w=1152:h=864:format=i420

...but the result is a weird frame displacement like an old TV with a deregulated horizontal. Seemingly, it's interpreting the frame headers as if they were part of the frame.

The bzipped YUV file can be found here (WARNING: 34 megs compressed, 3.5 gigs uncompressed!)

The indiviual ppm frames are here (2.8 megs compressed, 557 megs uncompressed)

The video was generated with

cat *.ppm | ppmtoy4m -F 24:1 >video.yuv

Is there a parameter I'm missing?

JCCyC
  • 2,883

1 Answers1

0

Your problem is that y4m format is not yuv. As slhck mentioned yuv has NO metadata and lacks even width and height information (not to mention specifying 4:2:0 4:2:2 or 4:4:4 ; 8-bit, 10-bit, 16-bit variants).

I found a description of Y4M format at https://wiki.multimedia.cx/index.php?title=YUV4MPEG2 and it definitely has metadata.

If you want raw yuv streams that mplayer can play, ppmtoy4m will not generate those. You might be able to use

ffmpeg -i %04d.ppm -c:v rawvideo -f rawvideo -pix_fmt yuv420p video.yuv

If instead you want to play a y4m stream, someone else will have to dig up the correct arguments to mplayer (or another tool).