[FFmpeg-devel] [PATCH 3/3] libxvid: encode a dummy frame to get the extradata.

Nicolas George nicolas.george at normalesup.org
Sun Apr 8 01:05:04 CEST 2012


Le decadi 20 germinal, an CCXX, Nicolas George a écrit :
> +    /* Encode a dummy frame to get the extradata immediately */

For reference, without this patch, the following command:

./ffmpeg_g -f lavfi -i testsrc=d=10 -vcodec libxvid -y /tmp/lap.mkv

will produce the following bunch of errors:

[mpeg4 @ 0x1e809c0] hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x1e809c0] my guess is 5 bits ;)

The reason is that the header of the I-frames is moved from the packet to
the extradata (see xvid_strip_vol_header), but the Matroska muxer, unlike
the MOV muxer, is not able to write extradata after write_header.

As a side note, this does not happen in AVI, as the AVI muxer does not have
the GLOBAL_HEADER flag. Matroska files produced from AVI by mkvmerge play
just fine. Dropping the xvid_strip_vol_header stuff completely has the same
effect. I do not know if it has avert effects apart from increasing the size
of each I-frame of about 43 bytes.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120408/1acdb2b8/attachment.asc>


More information about the ffmpeg-devel mailing list