question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mp3 loading fails

See original GitHub issue

y, 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

23reactions
lostanlencommented, Aug 12, 2019

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

conda install -c conda-forge ffmpeg

If you are not using Anaconda, here are some common commands for different operating systems:

  • Linux (apt-get): apt-get install ffmpeg or apt-get install gstreamer1.0-plugins-base gstreamer1.0-plugins-ugly
  • Linux (yum): yum install ffmpeg or yum install gstreamer1.0-plugins-base gstreamer1.0-plugins-ugly
  • Mac: brew install ffmpeg or brew install gstreamer
  • Windows: download binaries from this website

For GStreamer, you also need to install the Python bindings with

pip install pygobject
12reactions
its-just-jocommented, Jan 17, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MP3 error in loading - magix.info
I have a problem with loading MP3 files in Version 14. It comes up saying "this file format not supported. This file cannot...
Read more >
Failure Sound Effects - Wav Mp3 Download
Free failure sound effects in wav and mp3 formats.
Read more >
The Best Solution to Solve YouTube to MP3 not Working ...
Now YouTube-MP3.org is not accessible. How to fix this YouTube to MP3 not working problem? Don't worry! This article provides the top ...
Read more >
Unable to load MP3 files in FL Studio
Troubleshoot Importing MP3 FIles · Open Windows Media Player · Make sure you can see the menu bar (Ctrl+M will toggle it) ·...
Read more >
Load Error while Importing .mp3 audio file - FXhome Forum
I'm receiving a Load Error with a Yellow triangle with exclamation point when importing an MP3 file.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found