[FFmpeg-devel] [PATCH] metadata conversion API

Aurelien Jacobs aurel
Sat Feb 28 01:30:06 CET 2009

Baptiste Coudurier wrote:

> On 2/25/2009 5:13 PM, Aurelien Jacobs wrote:
> > Hi,
> > 
> > There is one last and important issue I want to address with the new
> > metadata API.
> > Old API allowed client apps and muxers to get a few select well known
> > tags (title, author...). With the new API, there is no simple way to
> > do that, right now. For example, if you demux an ASF file, and want to
> > get the name of the album, av_metadata_get(..., "album", ...) won't
> > give you any results, because ASF stores this information in a tag
> > named "AlbumTitle". There are lots of examples with various demuxers,
> > even for simple common tags. This also prevent correct remuxing between
> > different containers.
> First, thanks for your work Aurel, this is greatly appreciated.

You're welcome :-)

> I have a few ideas:
> Would it be possible to also export container information as "metadata" ?

This is definitely possible.

> Like aspect ratio, width, height. This would avoid duplicating fields
> from AVCodecContext, and make this information available as a simple way
> to user wanting for example to use libavformat to retrieve media
> information.

I think it highly depends on the target usage of the various fields you
want to export. If those fields are mostly targeted for textual user
information, using metadata is probably the way to go. But if the fields
are mostly targeted for numerical parameters to the software, then
metadata may not be the most practical way go.

> Then I might think it could be great to also enable AVMetadata for
> libavcodec and let codecs export some metadata in a generic way, instead
> of adding a field to AVCodecContext for each item.

Could be possible, but I wonder what kind of data you would export this
way. Do you have examples ?
Also, would you use this to pass data (parameters?) to encoders ?


More information about the ffmpeg-devel mailing list