Cannot find installation of real FFmpeg (which comes with ffprobe)
Solution 1
FYI it is best to share a minimal notebook that reproduces the entire issue you see to clarify what exactly you're trying to do and how it's going wrong. In this case you might be looking for the following:
!apt-get install --no-install-recommends ffmpeg && pip install ffmpeg scikit-video
import skvideo.io
import skvideo.datasets
bbb = skvideo.datasets.bigbuckbunny()
print('bigbuckbunny is in: {}'.format(bbb))
v = skvideo.io.vread(filename)
print('shape is: {}'.format(v.shape))
(if you've already apt/pip-installed a lot of things, esp. if you've "forced" installation of various packages, you might want to "Reset all runtimes" in colab to get a clean VM to run the above in)
Solution 2
For windows10 users
import skvideo
skvideo.setFFmpegPath('C:\ProgramData\Anaconda3\Lib\site-packages\skvideo\io')
Solution 3
Shortcut Way
ffmpeg link and unzip You can do this in your code. Make sure you put up to bin path of unzipped file
import skvideo
skvideo.setFFmpegPath("D:/ffmpeg-20170125-2080bc3-win64-static/ffmpeg-
20170125-2080bc3-win64-static/bin")
Permanent Way
One of the reasons might be that ffmpeg is not configured correctly,(its not always the case).
Step1:
Check ffmpeg is accessible from cmd
, type ffmpeg
in command line and see if it recognizes the command, if not download link and unzip and add it to the environment variable path Eg:
D:\ffmpeg-20170125-2080bc3-win64-static\ffmpeg-20170125-2080bc3-win64-static\bin
Step 2:
Use where ffmpeg
in command line sometimes it could be pointing to wrong file, in my case imageMagick
was installed, and system was referring to that
C:\Program Files\ImageMagick-7.0.8-Q16\ffmpeg.exe
,
either delete imageMagick
path or put it after
D:\ffmpeg-20170125-2080bc3-win64-static\ffmpeg-20170125-2080bc3-win64-static\bin
in path environment variable
Step 3.
Close the terminal and reopen and check where ffmpeg
, dont worry if it shows two path, but the first path should be of our installation
ffmpeg-20170125-2080bc3-win64-static\ffmpeg-20170125-2080bc3-win64-static\bin
if its okay, you are good to go
Solution 4
Do as follows:
import skvideo
skvideo.setFFmpegPath('your_environment/bin/')
import skvideo.io
videodata = skvideo.io.vread('your_video')
It is important to follow the sequence without mixing the steps.
Admin
Updated on June 19, 2022Comments
-
Admin almost 2 years
I was trying to fit a generator into a model and I got this error:
AssertionError: Cannot find installation of real FFmpeg (which comes with ffprobe).
I have looked over many of the solutions on GitHub and other questions on Stack Overflow but none of them worked for me.
Here is one of the commands I ran:
sudo add-apt-repository ppa:mc3man/trusty-media sudo apt-get update sudo apt-get install ffmpeg sudo apt-get install frei0r-plugins
pip list
also indicates the presence offfmpeg-1.4
In addition, I tried force reinstalling and updating ffmpeg just in case any dependencies were not installed properly.
I also set the skvideo's path for ffmpeg manually:
skvideo.setFFmpegPath('/usr/local/lib/python3.6/dist-packages/ffmpeg/')
This returns:
/usr/local/lib/python3.6/dist-packages/skvideo/__init__.py:306: UserWarning: ffmpeg/ffprobe not found in path: /usr/local/lib/python3.6/dist-packages/ffmpeg/ warnings.warn("ffmpeg/ffprobe not found in path: " + str(path), UserWarning)
By the way, when I try installing, it also returns this error, I don't know what to do about this:
Get:127 http://archive.ubuntu.com/ubuntu bionic/main amd64 vdpau-driver-all amd64 1.1.1-3ubuntu1 [4,674 B] Fetched 60.4 MB in 7s (8,769 kB/s) E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/w/wavpack/libwavpack1_5.1.0-2ubuntu1.1_amd64.deb 404 Not Found [IP: 91.189.88.149 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I ran
apt-get update --fix-missing
and that didn't make anything better.Is there a solution to this?
-
Admin over 5 yearsI found out that in some situations that doesn't work, in which case this worked for me:
apt-get update && apt-get install ffmpeg
-
Ami F over 5 yearsUpdate should not be necessary, and suggests to me that apt has been misconfigured by earlier notebook code (in other words, I'd suggest you try to figure out what caused the "situation" you describe)
-
Olli over 2 yearsit's C:\Users\"user"\Anaconda3\Lib\site-packages\skvideo\io for me
-
root over 2 yearsI get
C:\Python27\lib\site-packages\skvideo\__init__.py:306: UserWarning: ffmpeg/ffprobe not found in path: C:\Python27\Lib\site-packages\skvideo\io
even though that directory contains ffmpeg.py, ffmpeg.pyc, ffprobe.py, ffprobe.pyc. What might be the problem? CallingsetFFmpegPath
a second time doesn't yield the warning anymore, but I still getCannot find installation of real FFmpeg (which comes with ffprobe)
when callingskvideo.io.vread
. -
root over 2 yearsSolution to my problem: stackoverflow.com/a/65994349/5231110 (
import skvideo
, thenskvideo.setFFmpegPath('your_environment/bin/')
, thenimport skvideo.io
in this order!)