[MPlayer-users] Extract 422 Video

Larry Reznick lreznick at idistream.com
Thu Jul 17 21:13:20 CEST 2008


I have a large file encoded using the v210 codec. It contains YUV422 
video frames at 1920x1080, 24bpp. MPlayer announces in its VDec output 
line, "preferred colorspace: Packed YUY2" and plays it just fine. I 
have, in the past, converted this data to I420 without trouble. But, now 
I want to extract the 422 frames without conversion and put them into a 
file.

I have tried the following approach:

$ mencoder -nosound -ovc copy -frames 1 -of lavf inputfile.mov -o 
outputfile_422.yuv
MEncoder dev-SVN-r27305-4.1.2 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz (Family: 6, Model: 
15, Stepping: 6)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

122 audio & 254 video codecs
success: format: 0  data: 0x0 - 0xe035507d
libavformat file format detected.
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO:  [v210]  1920x1080  24bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44  fourcc:0x30313276  size:1920x1080  fps:25.000  ftime:=0.0400
** MUXER_LAVF 
*****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit.
videocodec: framecopy (1920x1080 24bpp fourcc=30313276)
VIDEO CODEC ID: 0
Writing header...
Writing index... 1f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]

Video stream: 1105920.000 kbit/s  (138239999 B/s)  size: 5529600 bytes  
0.040 secs  1 frames

When I divide the file size by the frame size (5529600 / 1920 / 1080) I 
should get 2 because 422 has 2 bytes per pixel. (I420 has 1.5 bytes per 
pixel.) Yet, as you can see from this, I'm getting 2.666.... This makes 
me wonder what's going on. If I take the 24bpp reference as RGBA or 
other similar variations it still doesn't work out because that should 
mean the frame size divide down should yield 3. When I increase the 
-frames counter so I've got enough to play, mplayer, using the rawvideo 
options with yuy2 or uyvy or any other possibilities doesn't play it 
right with the kind of look one associates with having the wrong frame 
size or colorspace.

Does anybody have any ideas on how I could extract raw YUV422P frames 
from this input file?

--Larry



More information about the MPlayer-users mailing list