spleeter
spleeter copied to clipboard
<class 'spleeter.SpleeterError'>, message: ffmpeg binary not found
from spleeter.separator import Separator
separator = Separator('spleeter:2stems')
separator.separate_to_file(temp_file, '/var/www/myproject/')
above code rise below error
<class 'spleeter.SpleeterError'>, message: ffmpeg binary not found
ffmpeg is installed correctly at /usr/bin/
spleeter version = 1.5.4 python version = 3.6.5 os : ubuntu 20.0.4 nginx + uwsgi
Hi @AnkitKundariya
This is weird since this error is raised after a call to the exact same command. Are you executing your python in a similar shell ?
@mmoussallam
when i try to do this in my python shell it's work fine, but same when i try to use with my flask app on a web server with nginx + uwsgi it's throwing me an error <class 'spleeter.SpleeterError'>, message: ffmpeg binary not found
if ffmpeg binary is not present the it should not work with Python shell too. but in our case it working in python shell but when we do this on webapp it's not working.
does spleeter require any special configuration?
i have tried to set FFMPEG_PATH in my server. but still no help.
Hi @AnkitKundariya, spleeter does not require any special configuration. ffmpeg needs to be installed in the shell where spleeter is run so you should make sure the directory where the ffmpeg binary is located is in the PATH of the shell your server is running in.
hi @romi1502
here i'm sharing list of executables path in my system.
where is my ffmpeg in system.
which ffmpeg.
@romi1502 please check all of the above items and please try to help me out if anything is wrong or misconfigured.
UWSGI LOG :
2021-01-24 06:31:59.277154: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA 2021-01-24 06:31:59.291768: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2294600000 Hz 2021-01-24 06:31:59.292326: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x555753b54500 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2021-01-24 06:31:59.292381: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version Error while processing file with spleeter : ffmpeg binary not found [pid: 170053|app: 0|req: 1/2] 106.213.254.187 () {44 vars in 762 bytes} [Sun Jan 24 06:31:59 2021] POST /api/file_upload => generated 83 bytes in 272 msecs (HTTP/1.1 200) 3 headers in 103 bytes (3 switches on core 0)
I can't see anything wrong in this configuration. ffmpeg seems to be properly installed and accessible. But you said:
when i try to do this in my python shell it's work fine
So it seems that the environment where your flask server is run may not be the same. ffmpeg
as to be accessible from it and it seems not to be.
Maybe you already solved it but I just ran sudo pkcon install ffmpeg
in my terminal and then pip3 install ffmpeg
in my project venv
.
This gave me AttributeError: module 'ffmpeg' has no attribute '_run'
Which I found the solution to in this
Solution:
pip install ffmpeg-python instead of pip install ffmpeg
But wait. There's more.
I'm guessing this happens if you've installed both, ffmpeg and ffmpeg-python. uninstall both with: pip uninstall ffmpeg pip uninstall ffmpeg-python and install ffmpeg-python again with : pip install ffmpeg-python This solved the problem in my system :)
Now I have a working spleeter lib in my project.
I was stuck at the same step, eventually followed @DanielHammerin's answer. But installed "ffmpeg" manually using the following wikihow link before installing "spleeter" using the PIP command. https://www.wikihow.com/Install-FFmpeg-on-Windows
Then did the steps that @DanielHammerin mentioned viz. -
pip uninstall ffmpeg
pip uninstall ffmpeg-python
pip install ffmpeg-python
And voila, it worked. :)
I think you also need to install ffmpeg with your package manager, e.g.:
sudo apt install ffmpeg
I was stuck at the same step, eventually followed @DanielHammerin's answer. But installed "ffmpeg" manually using the following wikihow link before installing "spleeter" using the PIP command. https://www.wikihow.com/Install-FFmpeg-on-Windows
Then did the steps that @DanielHammerin mentioned viz. - pip uninstall ffmpeg pip uninstall ffmpeg-python pip install ffmpeg-python
And voila, it worked. :)
I've followed your steps but my spleeter doesn't work yet. It still says: ERROR:spleeter:ffmpeg binary not found
I was stuck at the same step, eventually followed @DanielHammerin's answer. But installed "ffmpeg" manually using the following wikihow link before installing "spleeter" using the PIP command. https://www.wikihow.com/Install-FFmpeg-on-Windows Then did the steps that @DanielHammerin mentioned viz. - pip uninstall ffmpeg pip uninstall ffmpeg-python pip install ffmpeg-python And voila, it worked. :)
I've followed your steps but my spleeter doesn't work yet. It still says: ERROR:spleeter:ffmpeg binary not found
Ok, I've solved it. You have to make shure that ffmpeg is installed in the system evironmant variables. For Windows users just follow this tutorial: https://www.youtube.com/watch?v=qjtmgCb8NcE&ab_channel=LinuxLeech
no it dose not work for mee
I the whole process again from beginning , but the result is same "ERROR:spleeter:ffmpeg binary not found" I stuck here ...............................
For Windows 10 users.
- download FFmpeg from: http://ffmpeg.org/download.html#build-windows
- extract the binaries: FFmpeg and FFprobe
- add the path to these binaries to environment variables
I got same issue on windows 11.
@Diego92Ita Solution doesn't worked for me although ffmpeg is install and I have pointed it the correct path. I was getting error of ModuleNotFoundError: No module named 'ffmpeg'
Solved by installing ffmpeg using pip3
pip3 install ffmpeg-python
https://github.com/deezer/spleeter/issues/672#issuecomment-1162924661 Here is the solution.
sudo apt install ffmpeg
works for me in Debian linux
in your service file for fastapi please add ffmpeg environment like if your ffmpeg path = /usr/bin/ffmpeg then add
Environment="PATH=/root/project/venv/bin:/usr/bin/ffmpeg" restart daemon restart fastapi services 100% working.
Thanks
On windows:
- Install ffmpeg using this tutorial: https://www.youtube.com/watch?v=qjtmgCb8NcE&ab_channel=LinuxLeech
- pip uninstall ffmpeg
- pip install ffmpeg-python