Skip to content

Instantly share code, notes, and snippets.

@tcg
Created May 17, 2013 15:51
Show Gist options
  • Save tcg/5600003 to your computer and use it in GitHub Desktop.
Save tcg/5600003 to your computer and use it in GitHub Desktop.
Use eyed3 in python to get audio encoding information (bitrate, sample rate, channel mode)
# pip install eyeD3
import eyed3
from eyed3 import mp3
f = mp3.Mp3AudioFile('2-297a587f40fdc0064c44f2e5247d7bf7.mp3')
# Now:
# >>> f.info.sample_freq
# 24000
# >>> f.info.bit_rate
# (False, 64)
# >>> f.info.mode
# 'Mono'
@tcg
Copy link
Author

tcg commented Jan 8, 2021

Years later, I see this comment!

For the record: Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment