mp3

F

fabriceS

Hi,

Is anybody know how to get the lenght (in seconds) of a mp3 file ?

I try with pygame.mixer but without success...


Thanks

Fabrice
 
R

Rick Johnson

Is anybody know how to get the lenght (in seconds) of a mp3 file ?

Well Mp3's have a huge header with tons of info stuffed inside. And i remember seeing a nice recipe on the Python cookbook (or maybe SO) for parsing the data. I am sure the duration will be in there somewhere. Hopefully the mp3 is encoded in CBR, if however it was VBR; who the heck knows what to believe!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top