[FFmpeg-devel] [PATCH] mp3 muxer: write all metadata

Michael Niedermayer michaelni
Sun Sep 27 01:23:06 CEST 2009


On Fri, Sep 25, 2009 at 05:54:36PM -0400, Justin Ruggles wrote:
> Michael Niedermayer wrote:
> 
> > On Fri, Sep 25, 2009 at 06:03:19AM -0400, Justin Ruggles wrote:
> >> Anton Khirnov wrote:
> >>
> >>> Hi,
> >>> with attached patch the mp3 muxer will write all available metadata, not
> >>> just a few selected as it does now.
> >>>
> >>> btw shouldn't there be a list of standard ffmpeg tag names somewhere?
> >>
> >> I agree that we should have a list of generic tag names (and their
> >> formats if applicable).
> >>
> >>> From ced4fae2478201b70b417f8a10c6be5d6d4404b6 Mon Sep 17 00:00:00 2001
> >>> From: Anton Khirnov <wyskas at gmail.com>
> >>> Date: Fri, 25 Sep 2009 09:04:42 +0200
> >>> Subject: [PATCH] mp3 muxer: write all metadata
> >>>
> >>> ---
> >>>  libavformat/mp3.c |   86 ++++++++++++++++++++++++++++++++---------------------
> >>>  1 files changed, 52 insertions(+), 34 deletions(-)
> >>>
> >>> [...]
> >>> +        if      (!strcmp(t->key, "album"))    tag = MKBETAG('T', 'A', 'L', 'B');
> >>> +        else if (!strcmp(t->key, "composer")) tag = MKBETAG('T', 'C', 'O', 'M');
> >>> +        else if (!strcmp(t->key, "genre"))    tag = MKBETAG('T', 'C', 'O', 'N');
> >>> +        else if (!strcmp(t->key, "copyright"))tag = MKBETAG('T', 'C', 'O', 'P');
> >>> +        else if (!strcmp(t->key, "date"))     tag = MKBETAG('T', 'D', 'R', 'L');
> >>
> >> Using "date" is not compatible with other metadata readers/writers,
> >> which all use "year".  Personally I think that all the readers/writers
> >> should be changed to use "date" instead, in ISO format so that the year
> >> would be the first 4 chars.  That way it would be usable for those
> >> formats that only support the year.  An alternative would be to have a
> >> fallback to use "year" for TDRL if "date" does not exist.
> > 
> > is either of you aware of AVMetadataConv ?
> > what can we do to make it more clear how the metadata api works?
> > that is demuxers export the metadata that is stored in the file,
> > muxers store it as it is provided to the muxer. There are some
> > specific rules how trees and multiple tags are exportet but i dont
> > see why one would rename all tag keys explixitly or reformat values in
> > the demuxer
> > That is what AVMetadataConv is for ...
> 
> AVMetadataConv does not solve the problem because it does not convert
> from one metadata format to another.  It converts the key names to/from
> a generic value.  All the formats still have to agree on what those
> generic values are in order for the conversions to work properly.  For
> example, we use "author" as the generic value for either artist or
> author.  That is not documented anywhere, and it only works because it
> is used by all of the metadata formats.  It needs to be specified
> somewhere.  For other fields it is not as clear.
> 
> Also, it does nothing about differences in values that are not quite
> compatible as-is but could be with some processing.  That is where date
> vs. year comes in.  The current metadata formats and AVMetadataConv are
> using "year" as the generic value for year or date.  This is not
> accurate and can lead to problems in conversion.

what you say is just "it doesnt work currently", we know that, thats
why we have a patch changeing some code. noone stops you from chaging
AVMetadataConv and the code using it ...


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

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- 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/20090927/5f609941/attachment.pgp>



More information about the ffmpeg-devel mailing list