Posted By

whitetiger on 11/09/06


Tagged

database sql start python open repeat music audio mp3 record series60 hello sound id3 sms phonebook app


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

anayhk
vvarp
urandom
fukami
chrisaiv


Python - Get id3 from MP3 File


 / Published in: Python
 

  1. def getID3(filename):
  2. fp = open(filename, 'r')
  3. fp.seek(-128, 2)
  4.  
  5. fp.read(3) # TAG iniziale
  6. title = fp.read(30)
  7. artist = fp.read(30)
  8. album = fp.read(30)
  9. anno = fp.read(4)
  10. comment = fp.read(28)
  11.  
  12. fp.close()
  13.  
  14. return {'title':title, 'artist':artist, 'album':album, 'anno':anno}

Report this snippet  

You need to login to post a comment.