gavinljj / mp4v2

Automatically exported from code.google.com/p/mp4v2
Other
0 stars 0 forks source link

Expand iTunes metadata #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The existing *ID iTunes metadata is not very descriptive.  Also, mp4tags is
a bit inconsistent in the order of its parameters.

This patch renames items, e.g. cnID, to contentID, etc.  It also adds two
missing atoms, cmID and xid.  Parameters to mp4tags and its output are
adjusted as well.

This is based on revision r372.

Original issue reported on code.google.com by kevin.ru...@gmail.com on 28 Jan 2010 at 4:07

Attachments:

GoogleCodeExporter commented 9 years ago
This would be very hand for those of us wanting to make iTunes Extra/ iTunes LP 
files....

Original comment by gundam.r...@gmail.com on 31 Jan 2010 at 4:31

GoogleCodeExporter commented 9 years ago
If you can supply a file that would test out this patch (so I can make sure
everything works okay) then I can give it a try.

Original comment by kid...@gmail.com on 3 Apr 2010 at 12:43

GoogleCodeExporter commented 9 years ago
I presume you have some MP4 files lying about. :)

This renames parameters to their proper iTunes meaning (cnID is the content ID) 
and
supports two missing atoms.  You can use any existing m4a/m4v (I assume you 
have some
...) and try to add, remove, or replace the parameters.  The full list I have
updated/added is:

content ID
artist ID
playlist ID
genre ID
composer ID
XID (a globally unique identifier)

These items are in Apple's documentation.  Some freely available docs are 
located at:
http://www.apple.com/itunes/lp-and-extras/
XID is documented in the DevelopmentGuide.

If I could update the iTunesMetadata in the wiki and correct the tags myself, I
would.  I'm just glad that two months after I submitted some trial patches - and
spent much of that time looking for signs of life on IRC - someone is taking a 
look!

Original comment by kevin.ru...@gmail.com on 5 Apr 2010 at 8:01

GoogleCodeExporter commented 9 years ago
yeah, sorry--the project has been a little quiet lately, but I'm slowly working
through the backlog of issues/enhancements/etc.  

I'll try applying your patch, and yes I have MP4 files but I was hoping you 
maybe had
a file that would exercise the new atom types, but maybe I'm not understanding
something.  Mostly I'm concerned with regression, so if you could provide any 
test to
ensure your patch works correctly (either using the existing command line 
tools, or
code you wrote), that'd help me get it in quicker.

Original comment by kid...@gmail.com on 5 Apr 2010 at 10:33

GoogleCodeExporter commented 9 years ago
The following would set the tags for a song, including title, artist, album 
artist,
album title, writers, content ID, artist ID, composer ID, playlist ID, genre 
ID, and
XID to match up with metadata from iTMS (US).

$ mp4tags -s 'All Secrets Known' -a 'Alice In Chains' -R 'Alice In Chains' -A 
'Black
Gives Way to Blue (Bonus Track Version)' -w 'Sean Kinney, Mike Inez, Jerry 
Cantrell &
William Duvall' -I 331440750 -z 462221 -Z 14936983 -p 331440747 -j 21 -x
EMI:isrc:USVI20900292 -d 1 -D 1 -t 1 -T 13 song.m4a

The following would remove the metadata added by this patch:

$ mp4tags -r IzZpjx song.m4a

The biggest change to the code (aside from correcting method names, etc.) is 
probably
having to deal with 64-bit numbers as parameters.  The playlist ID is a 64-bit
number, and so I had to change integer handling for all parameters.

I also arranged the parameter processing order to be consistent between two 
areas of
the code.  It was all done inside of existing case/switch statements with no
fall-throughs; there were no dependencies.

Original comment by kevin.ru...@gmail.com on 5 Apr 2010 at 11:59

GoogleCodeExporter commented 9 years ago
Okay, I gave this a whirl and it seems to work well.  Code looked good to me as 
well.
 this should be in r380

Original comment by kid...@gmail.com on 6 Apr 2010 at 3:09