NoBackendError despite a backend (specifically FFmpeg) being installed
See original GitHub issueHello!
This is my first time posting an issue, so please cut me some slack if I’m not following some protocol!
I was trying to use python’s librosa
package on Windows 10 and encountered the following issue.
After running x, _ = librosa.load('data/fma_small/000/000002.mp3', sr = None)
I receive this stack trace:
---------------------------------------------------------------------------
NoBackendError Traceback (most recent call last)
<ipython-input-2-15a8daa0e7fd> in <module>()
1 start, end = 7, 17
2 filename = utils.get_audio_path(AUDIO_DIR, 2)
----> 3 x, sr = librosa.load(filename, sr = None, mono = True)
Q:\Program Files\Anaconda3\lib\site-packages\librosa\core\audio.py in load(path, sr, mono, offset, duration, dtype, res_type)
105
106 y = []
--> 107 with audioread.audio_open(os.path.realpath(path)) as input_file:
108 sr_native = input_file.samplerate
109 n_channels = input_file.channels
Q:\Program Files\Anaconda3\lib\site-packages\audioread\__init__.py in audio_open(path)
112
113 # All backends failed!
--> 114 raise NoBackendError()
NoBackendError:
Out of curiosity, I also tried to run audioread.ffdec.FFmpegAudioFile('data/fma_small/000/000002.mp3')
(since I know that FFmpeg is installed) but I received:
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Q:\Program Files\Anaconda3\lib\site-packages\audioread\ffdec.py in __init__(self, filename, block_size)
126 stderr=subprocess.PIPE,
--> 127 stdin=self.devnull,
128 )
Q:\Program Files\Anaconda3\lib\site-packages\audioread\ffdec.py in popen_multiple(commands, command_args, *args, **kwargs)
88 try:
---> 89 return subprocess.Popen(cmd, *args, **kwargs)
90 except OSError:
Q:\Program Files\Anaconda3\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds)
946 errread, errwrite,
--> 947 restore_signals, start_new_session)
948 except:
Q:\Program Files\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
1223 cwd,
-> 1224 startupinfo)
1225 finally:
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
NotInstalledError Traceback (most recent call last)
<ipython-input-6-be3b460211e8> in <module>()
----> 1 audioread.ffdec.FFmpegAudioFile(filename)
Q:\Program Files\Anaconda3\lib\site-packages\audioread\ffdec.py in __init__(self, filename, block_size)
129
130 except OSError:
--> 131 raise NotInstalledError()
132
133 finally:
NotInstalledError:
Again, I have FFmpeg installed, and ffmpeg
works as a command in cmd.
Is anyone able to spot the problem?
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:39 (13 by maintainers)
Top Results From Across the Web
No Backend error despite of downloading ffmpeg and setting ...
I am getting this error with .mp3 extension, with wav it is working properly . import librosa as lib t,s_r=lib.load(r ...
Read more >NoBackendError despite a backend (specifically FFmpeg) being ...
Hello! This is my first time posting an issue, so please cut me some slack if I'm not following some protocol! I was...
Read more >audioread.exceptions.NoBackendError in librosa - CodeAntenna
Problem: NoBackendError; Solution; This is the real solution to NoBackendError despite a backend (specifically FFmpeg) being installed. Method 1; Method 2.
Read more >librosa打开文件是显示NoBackendError - CSDN博客
在conda环境里面,conda install ffmpeg -c conda -forge 即可。 ... solution to NoBackendError despite a backend (specifically FFmpeg) being ...
Read more >Python librosa NoBackendError even though ffmpeg is installed
You have this line of code: audio = issues librosa.load(pathToJson). It seems to me that you are accidentally trying trying to load JSON ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not really, no. I eventually started calling ffmpeg via
subprocess.Popen
and am pretty happy with more explicit control for my purposes.If you’re having trouble with audioread you could of course try libsoundfile and see if that works:
NoBackendError Traceback (most recent call last) <ipython-input-6-91f60cabb456> in <module> 1 D = [] # Dataset 2 for row in valid_data.itertuples(): ----> 3 y, sr = librosa.load(‘F:\paper\Bangla ASR\segmented/augmented 1/’ + (row.path)) 4 ps = librosa.feature.mfcc(y=y, sr=sr, n_mfcc=52) 5 if ps.shape != (52, 130): continue
~.conda\envs\RaffaelEnv\lib\site-packages\librosa\core\audio.py in load(path, sr, mono, offset, duration, dtype, res_type) 117 118 y = [] –> 119 with audioread.audio_open(os.path.realpath(path)) as input_file: 120 sr_native = input_file.samplerate 121 n_channels = input_file.channels
~.conda\envs\RaffaelEnv\lib\site-packages\audioread_init_.py in audio_open(path) 114 115 # All backends failed! –> 116 raise NoBackendError()
NoBackendError:
N.B: I restarted jupyter notebook so many times but still problem exists