[FFmpeg-devel] [PATCH] Make FFmpeg recognize rawvideo fourCC code issued by FFmpeg

Stefano Sabatini stefano.sabatini-lala
Sun Feb 7 17:38:19 CET 2010


On date Monday 2010-01-04 14:42:01 +0100, Michael Niedermayer encoded:
> On Sun, Jan 03, 2010 at 10:56:14PM +0100, Stefano Sabatini wrote:
> > Hi,
> > 
> > $ ffmpeg -i toon.avi -pix_fmt pal8 -vcodec rawvideo -y toon-rawvideo.avi
> > [...]
> > Input #0, avi, from 'toon.avi':
> >   Duration: 00:05:52.75, start: 0.000000, bitrate: 23 kb/s
> >     Stream #0.0: Video: msvideo1, pal8, 200x100, 8 tbr, 8 tbn, 8 tbc
> >     Stream #0.1: Audio: pcm_u8, 22050 Hz, 1 channels, u8, 176 kb/s
> > Output #0, avi, to 'toon-rawvideo.avi':
> >     Stream #0.0: Video: rawvideo, pal8, 200x100, q=2-31, 200 kb/s, 8 tbn, 8 tbc
> >     Stream #0.1: Audio: mp2, 22050 Hz, 1 channels, s16, 64 kb/s
> > Stream mapping:
> >   Stream #0.0 -> #0.0
> >   Stream #0.1 -> #0.1
> > [...]
> > 
> > $ ffmpeg -i toon-rawvideo.avi
> > [avi @ 0x98b5390]max_analyze_duration reached
> > Input #0, avi, from 'toon-rawvideo.avi':
> >   Duration: 00:00:15.25, start: 0.000000, bitrate: 1353 kb/s
> >     Stream #0.0: Video: WRAW / 0x57415257, 200x100, 8 fps, 8 tbr, 8 tbn, 8 tbc
> >     Stream #0.1: Audio: mp2, 22050 Hz, 1 channels, s16, 64 kb/s
> > At least one output file must be specified
> > 
> > The rawvideo encoder (libavcodec/rawenc.c:raw_init_encoder) writes the
> > WRAW fourCC read from:
> > libavcodec/raw.c:ff_raw_pixelFormatTags
> > 
> > in the codec context, then the avi demuxer cannot recognize the fourCC
> > tag 'WRAW' as it is not defined in:
> > libavformat/riff.c:ff_codec_bmp_tags.
> 
> fix the muxer or encoder!
> 
> > 
> > The result is that the ff* tools cannot correctly recognize the format
> > of the video stream issued by FFmpeg.
> > 
> > Patch adds all the fourCC codes defined in libavcodec/raw.c missing
> > from libavformat/riff.c.
> 
> this is completely unacceptable
> 
> read teh avi spec and the lists of fourccs that are valid in avi
> storing anything else than that is a bug

Well, let's start from "WRAW". This is set by the encoder, using
avcodec_pix_fmt_to_codec_tag(avctx->pix_fmt), which uses the
table in ff_raw_pixelFormatTags, for which PIX_FMT_PAL8 means 'WRAW'.

I couldn't find any "WRAW" mentioned in the mess of fourcc.org.

Hints?
-- 
FFmpeg = Foolish and Freak MultiPurpose Educated Gigant



More information about the ffmpeg-devel mailing list