[Ffmpeg-devel] Re: I want to know what data set to AVCodecContext for H.264

bond b-o-n-d
Sun Jun 26 12:26:46 CEST 2005

> On Saturday 25 June 2005 11:54, bond wrote:
> [...]
> > its indeed often the case that mpeg-4 part2 encoders outputting to .avi
> > place the vol together with the i-frames, because avi seems to require
> wrong, avi doesnt require it, its just the way divx did it and everyone
> wanting to break compatibility did it that way too

well i assume when you want to easily be able to cut such mpeg4-in-avi files
placing the vol together with the i-frames is maybe not a must, but makes
things easier. and as you said its a defacto "standard" to group the two

> > when placing mpeg-4 part2 in .mp4 you are not allowed to place the vol
> > together with the video data (i-frames),
> hmm, could you quote the relevant part of the spec which forbids that,
> though iam not saying its not true just that iam curious, as such a
> restriction would be very silly

in my copy of the 14496-1 specs (july 1999) it says in chapter 6.2.1 "start
1. Separate Configuration / Elementary Streams (e.g. Inside ISO/IEC 14496-1
When coded visual objects are carried within a Systems bitstream defined by
ISO/IEC 14496-1, configuration information and elementary stream data are
always carried separately. Configuration information and elementary streams
follow the syntax below, subject to the break points between them defined
above. The Systems specification ISO/IEC 14496-1 defines containers that are
used to carry Visual Object and Visual Object Layer configuration
information. A separate container is used for each object. For video
objects, a separate container is also used for each layer.
VisualObjectSequence headers are not carried explicitly, but the information
is contained in other parts of the Systems bitstream.

you can also follow my discussion with bill may from mpeg4ip about that

> > but it has to be stored only once
> > on a seperated place from the video data. ffmpeg doesnt do this, which
> > also one of the problems with its .mp4 muxing
> this is not true, ffmpeg does store the global headers like VOL at the
> place when encoding mpeg4 it just doesnt support extracting these headers
> during stream copy, so .mp4->.mp4 or mpeg4 encoding should be fine
> and mpeg4-es -> .mp4 are not

ok, so my statement is true when doing direct stream copying. would be great
if this could get fixed (copying from .avi also leads to other wierd things,
where for example the fourcc of the .avi is stored in the .mp4 and therefore
a not compliant mpeg4-in-mp4 file is created as i pointed out in my bug
report already)

More information about the ffmpeg-devel mailing list