Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
YUV files have no frame header, so that's not the issue. I suspect the culprit is the fact that you're using a really old version of mplayer that might just have a bug. Will try to check the file later. – slhck May 31 '12 at 19:38
Two years on, did you ever find a solution to this? I'm having the same problem, I can get around the horizontal scrolling by manually setting the frame size to (x*y*1.5)+6 (to soak up the "FRAME\n" at the end of each frame), but there is still a bit of an offset because of the YUV4MPEG header at the beginning of the file. I read elsewhere that mplayer should be able to play a YUV4MPEG stream simply with "mplayer stream.yuv" but that produces a lot of "Frame too small!" messages. – pix Jul 6 '14 at 9:17

You must log in to answer this question.

Browse other questions tagged .