jorrit
Joined: 02 Feb 2011 Posts: 1
|
Posted: Wed Feb 02, 2011 7:19 am Post subject: getMetaData returning bogus information? |
|
|
Hi, I'm trying to use pymedia to play my mp3 files. It works great (they play with good quality) however I have a problem with getMetaData(). Here is the code I use:
self.player.startPlayback(open(file,'rb'),file.split('.')[-1].lower())
time.sleep(3)
print self.player.getMetaData()
sys.stdout.flush()
This causes the sound to play (which it does fine) and then I wait 3 seconds to ensure the metadata is ready. But it prints out as:
{'album': '\xff\xfeN', 'title': '\xff\xfeB', 'track': '\xff\xfe1', 'artist': '\xff\xfeK', 'year': '\xff\xfe1', 'genre': '\xff\xfeV'}
It doesn't help if I use other mp3 files. Players like winamp can correctly get this information out of the mp3's so I think the mp3 itself is fine.
What am I doing wrong? How can I get useful information (like tags and so on) out of an mp3 file?
Thanks |
|