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

Stefano Sabatini stefano.sabatini-lala
Sun Jan 3 22:56:14 CET 2010


$ 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:

in the codec context, then the avi demuxer cannot recognize the fourCC
tag 'WRAW' as it is not defined in:

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.

BTW I added the missing tags in the same order as I found them in
raw.c, is OK to sort them (as a separate patch)?

FFmpeg = Faboulous & Foolish Martial Pitiless Elastic Game
-------------- next part --------------
A non-text attachment was scrubbed...
Name: complete-riff-tags.patch
Type: text/x-diff
Size: 1616 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100103/4f932b41/attachment.patch>

More information about the ffmpeg-devel mailing list