Posts: 44
Joined: Fri Apr 05, 2013 10:42 pm

Mp3 MetaData

Wed Aug 20, 2014 6:25 pm


Im currently working on developing a music player and library, similar to iTunes or windows media player, or banshee. In order to store music in directories dependent on artist, then album I need to extract the meta data, e.g Album name, and artist at a minimum.

I have tried with various packages (eyeD3, eyed3, ID3, mutagen, songdetails) and yes I have put in some considerable google hours and I have hit a dead end. I have heard good things about eyed3 however there is a serious lack of documentation everything is on eyeD3, and I have had no joy with it. All I get is errors!

Please somebody help me!

You could say my love for Linux is terminal ;)

Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: Mp3 MetaData

Thu Sep 04, 2014 12:43 am

command line solution:


Code: Select all

apt-get install -y libid3-tools
Example usage:

Code: Select all

id3info test.mp3
Example output:

Code: Select all

*** Tag information for test.mp3
=== TALB (Album/Movie/Show title): Single
=== TPE1 (Lead performer(s)/Soloist(s)): Flux Pavilion
=== TPE2 (Band/orchestra/accompaniment): Flux Pavilion
=== TPOS (Part of a set): 1/1
=== TCON (Content type): Dance
=== TIT2 (Title/songname/content description): Daydreamer (feat. Example)
=== TRCK (Track number/Position in set): 1
=== TYER (Year): 2012
=== APIC (Attached picture): ()[, 3]: image/jpg, 174851 bytes
=== TRCK (Track number/Position in set): 1/1
=== TIT2 (Title/songname/content description): Daydreamer (Radio Edit)
=== TPE1 (Lead performer(s)/Soloist(s)): Flux Pavilion ft. Example
=== TALB (Album/Movie/Show title): Daydreamer (Remixes) [feat. Example] - EP
=== TYER (Year): 2012-03-14T07:00:00Z
=== TCON (Content type): Dance
=== USLT (Unsynchronized lyric/text transcription): (Converted from Lyrics3 v2.00)[XXX]:  
*** mp3 info
MPEG1/layer III
Bitrate: 320KBps
Frequency: 44KHz
Example Author:

Code: Select all

AUTHOR=$(id3info test.mp3  | grep TPE1 | head -n 1 | perl -pe 's/.*: //g');
echo $AUTHOR;
Example Author output:

Code: Select all

Flux Pavilion
jaudiotagger is a nice java library for this sort of thing, I'm sure there are a libraries for other languages but I have not used them.
SBC with 32GB RAM:



Return to “General discussion”