[Ffmpeg-devel] mpeg4 avi, corrupted frames when CODEC_FLAG_TRUNCATED is set

Rich Felker dalias
Fri Oct 21 08:11:36 CEST 2005


On Fri, Oct 21, 2005 at 07:21:39AM +0200, Stefan Lucke wrote:
> On Freitag, 21. Oktober 2005 01:53, Rich Felker wrote:
> > On Thu, Oct 20, 2005 at 11:16:09PM +0200, Stefan Lucke wrote:
> > > Hi,
> > > 
> > > decoding "star_wreck_in_the_pirkinning_subtitled_xvid.avi" with 
> > > CODEC_FLAG_TRUNCATED set, results in corrupted frames.
> > > 
> > > Is it not allowed to set this flag when frames are not truncated ?
> > > Currently we set this in softdevice allways when CODEC_CAP_TRUNCATED
> > > is set.
> > 
> > Using CODEC_FLAG_TRUNCATED is almost always incorrect, and definitely
> > correct whenever your input is "framed" (i.e. in a container that
> > distinguishes frame boundaries). It should ONLY be used for raw video
> > streams with no container, or extremely broken containers when no
> > external framer exists to repair the video before sending it to the
> > codec. Enabling CODEC_FLAG_TRUNCATED when it's not needed can lead to
> > problems in some cases, as you have found. :)
> 
> Looks like: ffmpegs internal framer is _incorrect_ as it cannot detect
> frameboundaries on complete frames, and that is _correct_ behaviour.
> 
> Broken argumentation anyway.

Actually I think the issue is that XVID is incompliant with mpeg4,
probably using packed B frames or something idiotic like that..
Anyway, never use CODEC_FLAG_TRUNCATED with avi or any other frame
based container.

Rich





More information about the ffmpeg-devel mailing list