[MPlayer-dev-eng] [PATCH] -ffourcc with raw video

Andrew Wason rectalogic at rectalogic.com
Fri Jul 18 17:44:13 CEST 2008


I'm encoding to raw audio/video in a QuickTime container. I'm encoding
video to YUY2 but the fourcc needs to be set to yuvs for QuickTime
Player to understand it. So I do this:

mencoder input.mp4 -of lavf -lavfopts format=mov -oac pcm -ovc raw -vf
scale,format=YUY2 -ffourcc yuvs -o output.mov

But the -ffourcc ends up being ignored and the resulting video has it
set to YUY2.  Same thing happens for AVI:

mencoder input.mp4 -of avi -oac pcm -ovc raw -vf scale,format=YUY2
-ffourcc yuvs -o output.avi


Initially mencoder.c sets mux_v->bih->biCompression to the value of
force_fourcc (yuvs) but then ve_raw.c:set_format resets biCompression
to YUY2 and this is then used by muxer_lavf.c:fix_parameters or
muxer_avi.c:avifile_write_header to set the fourcc to YUY2 instead of
yuvs.

This patch changes ve_raw.c:set_format to not overwrite biCompression
if force_fourcc is set.

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffourcc-raw.patch
Type: application/octet-stream
Size: 469 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080718/1fd61e01/attachment.obj>


More information about the MPlayer-dev-eng mailing list