Categories: S60 | Python | How To | Code Examples | Music
This page was last modified 22:42, 12 October 2007.
How to get id3 tag from a MP3 file
From Forum Nokia Wiki
There's no function for getting info about a mp3 file. So there's a function to this use.
def getID3(filename): fp = open(filename, 'r') fp.seek(-128, 2) fp.read(3) # TAG iniziale title = fp.read(30) artist = fp.read(30) album = fp.read(30) year = fp.read(4) comment = fp.read(28) fp.close() return {'title':title, 'artist':artist, 'album':album, 'year':year}
If a file name ex.mp3 exists in c:\\others you get the real title not based on the filename !
info = getID3('c:\\ex.mp3') print 'the title is ',info['title']
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| playing midi & mp3. | himsymbian | Symbian Media (Graphics & Sounds) | 1 | 2005-06-07 03:50 |
| CMdaAudioPlayerUtility OpenDesL() | sandopolus | Symbian Media (Graphics & Sounds) | 5 | 2008-03-06 12:53 |
| play mp3 in a position | felixksp | Mobile Java Media (Graphics & Sounds) | 3 | 2007-05-23 10:22 |
| about playing mp3 sound clip | sice | General Symbian C++ | 4 | 2007-05-10 02:47 |
| Playing Mp3 in Feature Pack 1 | rkckolla | Symbian Media (Graphics & Sounds) | 6 | 2005-06-28 07:45 |
