mp3 loading fails
See original GitHub issuey, sr = librosa.load(“my.mp3”)
Traceback (most recent call last): File “/home/esperanto/anaconda3/lib/python3.6/site-packages/librosa/core/audio.py”, line 127, in load with sf.SoundFile(path) as sf_desc: File “/home/esperanto/anaconda3/lib/python3.6/site-packages/soundfile.py”, line 627, in init self._file = self._open(file, mode_int, closefd) File “/home/esperanto/anaconda3/lib/python3.6/site-packages/soundfile.py”, line 1182, in _open "Error opening {0!r}: ".format(self.name)) File “/home/esperanto/anaconda3/lib/python3.6/site-packages/soundfile.py”, line 1355, in _error_check raise RuntimeError(prefix + _ffi.string(err_str).decode(‘utf-8’, ‘replace’)) RuntimeError: Error opening ‘my.mp3’: File contains data in an unknown format.
Description
Steps/Code to Reproduce
Expected Results
Actual Results
Versions
Linux-4.4.0-17763-Microsoft-x86_64-with-debian-jessie-sid Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56) [GCC 7.2.0] NumPy 1.16.4 SciPy 1.1.0 librosa 0.7.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top GitHub Comments
Hello @nomota, please read this: https://github.com/librosa/librosa#audioread-and-mp3-support
To fuel
audioread
with more audio-decoding power (e.g., for reading MP3 files), you may need to install either ffmpeg or GStreamer.Note that on some platforms,
audioread
needs at least one of the programs to work properly.If you are using Anaconda, install ffmpeg by calling
If you are not using Anaconda, here are some common commands for different operating systems:
apt-get install ffmpeg
orapt-get install gstreamer1.0-plugins-base gstreamer1.0-plugins-ugly
yum install ffmpeg
oryum install gstreamer1.0-plugins-base gstreamer1.0-plugins-ugly
brew install ffmpeg
orbrew install gstreamer
For GStreamer, you also need to install the Python bindings with
I’m getting this error even with ffmpeg installed via anaconda.
Are there any other solutions?
RuntimeError: Error opening '/path/000002.mp3': Format not recognised.