[FFmpeg-devel] Handling MPEG-4 Custom User Data

Michael Niedermayer michaelni
Wed Aug 19 01:26:02 CEST 2009

On Tue, Aug 18, 2009 at 06:23:45PM -0400, Isaac Sutherland wrote:
> On Tue, Aug 18, 2009 at 5:03 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> [...]
> > >
> > > However, ffmpeg doesn't appear to allow applications to consume this data,
> > > or at least I can't see how it does. decode_user_data in libavcodec/h263.c
> > > appears to check for a few data strings (xvid, divx, and ffmpeg identifiers)
> > > but throws away unrecognized data. Is providing support for passing custom
> > > user data to the user within the scope of ffmpeg? If so, any suggestions on
> > > how this should be implemented?
> >
> > its sure fine to export user data from the decoder to the user app through
> > a AVCodecContext.user_data if someone submits a clean patch.
> > Though i am not sure how usefull such a feature would be ...
> >
> Thanks for the tip. Unfortunately I do not presently have access to
> the ISO spec for MPEG-4, so I do not know exactly what the intent of
> the inclusion of user data in the standard was. However, since it was
> included, the chances are that somebody would find it useful.
> My particular use case is that I need to associate geodata with each
> frame of a raw mpeg-4 video stream. The most elegant way to do this on
> the encoding end (which does not use ffmpeg) is to send the geodata in
> a GOV header along with each frame.

the corect place for such information is a seperate stream not as part of
the video stream, the geodata applies to the audio stream as well, this
also has the advantage that its fully supported in the current codebase
and works with more than just mpeg4, also its naturally not lost on
transcoding, while user data can at best be preserved on stream copy
but never when reencoding mpeg4->svq3 (bye bye user data)

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090819/6b611766/attachment.pgp>

More information about the ffmpeg-devel mailing list