Cosmologist
Cosmologist

Reputation: 508

How can I determine the bitrate type of mp3 files with Python?

How to determine the type of the bitrate used for an mp3 file, e.g. CBR, VBR or ABR?

Upvotes: 9

Views: 8796

Answers (1)

Martin Tournoij
Martin Tournoij

Reputation: 27852

mutagen works for me. Here is an excerpt from one of my scripts.

from mutagen.mp3 import MP3

f = MP3(musicfile)
bitrate = f.info.bitrate / 1000

Upvotes: 21

Related Questions