[FFmpeg-devel] [PATCH] add 'yuvs' to tags list
Michael Niedermayer
michaelni
Tue Nov 30 00:09:16 CET 2010
On Mon, Nov 29, 2010 at 12:48:38PM -0500, Andrew Wason wrote:
> Currently mencoder fails when encoding raw video with format=yuy2
> (PIX_FMT_YUYV422) with fourcc 'yuvs' because 'yuvs' is not in the
> libavformat/riff.c ff_codec_bmp_tags list and so mencoder uses
> CODEC_ID_NONE(0) instead of CODEC_ID_RAWVIDEO(14) for the output
> codec.
>
> Attached patch adds 'yuvs' to the list in libavformat. An alternative
> is to add it to mp_bmp_tags in mplayer libmpdemux/mp_taglists.c
> instead.
>
> $ mencoder test.avi -nosound -of lavf -lavfopts format=mov -ovc raw
> -vf format=yuy2,scale -ffourcc yuvs -o out.mov
> [...]
> VIDEO CODEC ID: 0
> Writing header...
> [mov @ 0x825de0]Tag yuvs/0x73767579 incompatible with output codec id '0'
> Floating point exception
>
>
>
> With the patch, it maps 'yuvs' to CODEC_ID_RAWVIDEO(14) and does the encode.
>
> $ mencoder test.avi -nosound -of lavf -lavfopts format=mov -ovc raw
> -vf format=yuy2,scale -ffourcc yuvs -o out.mov
> [...]
> VIDEO CODEC ID: 14
> Writing header...
> [mov @ 0x825de0]Codec for stream 0 does not use global headers but
> container format requires global headers
>
> Pos: 30.0s 900f (99%) 223.60fps Trem: 0min 131mb A-V:0.000 [36864:0]
>
> Flushing video frames.
> Writing index...
>
> Video stream: 36864.000 kbit/s (4608000 B/s) size: 138240000 bytes
> 30.000 secs 900 frames
> Index: libavformat/riff.c
> ===================================================================
> --- libavformat/riff.c (revision 25838)
> +++ libavformat/riff.c (working copy)
should be ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101130/b80eac16/attachment.pgp>
More information about the ffmpeg-devel
mailing list