[FFmpeg-devel] [PATCH][RFC] add a list of generic tag names

Michael Niedermayer michaelni
Mon Dec 14 21:18:48 CET 2009


On Mon, Dec 14, 2009 at 11:25:47AM +0100, Anton Khirnov wrote:
> On Thu, Oct 22, 2009 at 11:00:20PM +0200, Michael Niedermayer wrote:
> > 
> > hmm, this is not correct i think, at least on the muxer side unless
> > we have some code that extracts the year from a more generic date
> > 
> commented out for now, i'll add date->year conversion later when i have
> some time.
> > 
> > this needs to be written so its clear if muxer or codec is meant
> > 
> i'd just assume muxer for AVFormatContext metadata, codec for AVStream
> metadata
> > 
> > person/group
> > 
> done
> > 
> > there are standards for language codes, see the nut spec, some of the
> > metadata stuff from there can likely be borrowed
> > 
> done
> 

> I've also changed author->artist (was that really necessary?)

does it work otherwise? if not it was necessary (thats pretty much the
definition of necessary)

[...]
> diff --git a/libavformat/asf.c b/libavformat/asf.c
> index cf01e07..3bdbbf7 100644
> --- a/libavformat/asf.c
> +++ b/libavformat/asf.c
> @@ -129,12 +129,11 @@ const ff_asf_guid ff_asf_digital_signature = {
>  };
>  
>  const AVMetadataConv ff_asf_metadata_conv[] = {
> -    { "AlbumArtist", "artist"    },
>      { "AlbumTitle" , "album"     },
> -    { "Author"     , "author"    },
> +    { "Author"     , "artist"    },
>      { "Genre"      , "genre"     },

why can AlbumArtist be remove but genre need an entry?


>      { "Copyright"  , "copyright" },
>      { "TrackNumber", "track"     },
> -    { "Year"       , "year"      },
> +//  { "Year"       , "date"      }, TODO: conversion year<->date
>      { 0 }
>  };

> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index 4cc2fa6..5124cd3 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -121,7 +121,32 @@ int av_metadata_set2(AVMetadata **pm, const char *key, const char *value, int fl
>  
>  /**
>   * Converts all the metadata sets from ctx according to the source and
> - * destination conversion tables.
> + * destination conversion tables. If one of the tables is NULL, then
> + * tags are converted to/from ffmpeg generic tag names. Currently defined

is NULL or is not NULL ?


> + * generic tag names are:
> + * album        -- name of the set this work belongs to
> + * albumartist  -- main author of the set/album, if different from artist.
> + *                 e.g. 'Various Artists' for compilation albums.
> + * artist       -- main author of the work
> + * comment      -- any additional description of the file
> + * composer     -- who composed the work, if different from artist
> + * copyright    -- name of copyright holder
> + * date         -- date when the work was created, preferably in ISO 8601
> + * disc         -- number of a subset, e.g. disc in a multi-disc collection
> + * encoder      -- name/settings of the software/hardware that produced the file
> + * encodedby    -- person/group who created the file
> + * filename     -- original name of the file
> + * genre        -- <self-evident>
> + * language     -- main language in which the work is performed, preferably
> + *                 in ISO 639-2 format
> + * performer    -- artist who performed the work, if different from artist.
> + *                 e.g for 'Also sprach Zarathustra', artist would be 'Richard
> + *                 Strauss' and performer 'London Philharmonic Orchestra'.
> + * publisher    -- name of the label/publisher
> + * title        -- name of the work
> + * track        -- number of this work in the set, can be in form current/total
> + * Each tag type can also have a -sort variant, which contains a version of the
> + * tag that should be used for sorting.

This text probably belongs closer to:
/*
 * Public Metadata API.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- 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/20091214/0c2a1508/attachment.pgp>



More information about the ffmpeg-devel mailing list