InDashPC.org Forum Index InDashPC.org
In Dash Car PC forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

getMetaData returning bogus information?

 
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software
View previous topic :: View next topic  
Author Message
jorrit



Joined: 02 Feb 2011
Posts: 1

PostPosted: Wed Feb 02, 2011 7:19 am    Post subject: getMetaData returning bogus information? Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group