[mythtv] FAO Thor, Metadata question prior to Album Artist repatch.
Colin Guthrie
myth at colin.guthr.ie
Tue Sep 7 14:39:27 EDT 2004
Yo,
OK, I've given up any possibility of it being in 0.16!! I use CVS
version anyway.... ;)
I was just thinking about how best to change the lameencoder.cpp file to
do the tag writing correctly with the TPE4 id3v2 field for album artist
stuff and wondered if it was worth standardising a little.
The flacencoder.cpp file actually uses the flacdecoder class to
commitMetadata. (and I've just realised I didn't patch this method for
my stuff - oops!)
But anyways, maddecoder, avfdecoder and vorbisdecoder do not implement
their commitMetadata methods.
So here is the question.... should I try and standardise how this works?
Here is my thoughts on the pros/cons.
Scenario: Move all file metadata writes to the decoder's commitMetadata.
Pros:
* Keeps everything in one place.
* As MAD's libid3tag stuff is used, it keeps this out of lamedecoder.cpp
* FLAC doesn't change (this is how it's done already).
* AVF doesn't change (we don't do the any metadata writing on this at
the moment anyway ;)
Cons:
* Metadata writing in a decoder class? It's just a bit "odd"!!
* ID3 tagging is done by opening the file twice (although if libid3tag
is going to be used then this will be the case anyway!)
* Tagging of Vorbis files will have to happen after the file has been
encoded.
To me the last Con above may be the biggie as IIRC you have to rewrite
the whole file to get a Vorbis Comment into it. Tho' I'm guessing the
same problem may be true for a Vorbis Comment in a FLAC file??
What are your thoughts?
Oh, and I was thinking that I'll also add a "compilation=0|1" vorbis
comment field. The problem being, I can't think of a good id3v2 frame to
indicate the fact it is a compilation. The only one that is close is
"--TPOS Part of a set" but this isn't really correct, just the best I
can get from running "id3v2 -f"
Of course I don't really need to store the fact that the album is a
compiliation in the metadata of the file at all, I can just use the same
logic as is currently in place in the isMultiArtist() method when
reading the metadata from the file and inserting it into the database in
the first instance? What do you think?
As for your last comment about TPE4 not being a "standard" field and
that easytag etc. wouldn't do anything with it, I agree that this is a
shortcoming. What I don't understand is how can I be the only person
that thinks this is a necessary bit of metadata to store??? I've got
loads of "Soundtrack" and "Various Artists" albums not to mention DJ
mixed albums that I think make the concept of an album artist a really
useful feature. Surely others feel the same??
I can't remember what program it was, perhaps Winamp in Windoze or XMMS
maybe where the OggVoris plugin was able to have simple "if" statements
in the tag formatting. This was a godsend to me when I still used that
program as I was able to get my master playlist looking the way I wanted
it to!!
OK, I'm starting to ramble on, so I'll sign off for now.
Cheerio!
Col.
--
+------------------------+
| Colin Guthrie |
+------------------------+
| myth at colin.guthr.ie |
| http://colin.guthr.ie/ |
+------------------------+
More information about the mythtv-dev
mailing list