[FFmpeg-devel] Adding MPEG user data on encode.

Daniel Kristjansson danielk
Fri Dec 18 18:17:00 CET 2009


On Wed, 2009-12-16 at 14:52 -0800, Baptiste Coudurier wrote:
> Hi,

> On 12/16/2009 09:00 AM, Daniel Kristjansson wrote:
> >
> > I'm adding MPEG user data encoding to ffmpeg for my own app, but
> > I'd like to do it in a way that allows it to be integrated upstream.

> I believe storing user data in AVFrame makes sense if it's per frame 
> data. If it's global data it makes sense to put it in AVCodecContext, so 
> the approach seems ok.
k

> The pictures (AVFrame) are given in presentation order to the encoder, 
> so will be user_data. I'm not sure about the reordering.
> What does the user data contain ? Is it relative to the presented 
> picture ? I guess so since CEA-708 is closed captions, then you should 
> not need to reorder the data, assuming the decoder will reorder 
> user_data when decoding.

Well EIA-708A was ambiguous on whether the caption packets were in
decode or presentation order. The workaround was to only send those
packets in the user data of frames where both decode and presentation
order was the same. I need to lookup CEA-708D and SMPTE EG 43 to see
if and when that ambiguity was fixed and what the guideline on it is.

The other things I'm planning to insert, like ISO 13818-1 AFD, are
well defined and are part of the frame they are sent on.

-- Daniel




More information about the ffmpeg-devel mailing list