Answer the question
In order to leave comments, you need to log in
How to find the duration of a track in python?
How do I get the duration of an .mp3 track using python?
Answer the question
In order to leave comments, you need to log in
You can use the https://bitbucket.org/lazka/mutagen
library .
Example for mp3:
from mutagen.mp3 import MP3
f = MP3('test.mp3')
print(f.info.length)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question