Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find installation of real FFmpeg (which comes with ffprobe)

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 of ffmpeg-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?

like image 475
Asm Goni Avatar asked Dec 08 '18 16:12

Asm Goni


2 Answers

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)

like image 185
Ami F Avatar answered Sep 20 '22 11:09

Ami F


For windows10 users

import skvideo
skvideo.setFFmpegPath('C:\ProgramData\Anaconda3\Lib\site-packages\skvideo\io')
like image 43
Ezra Avatar answered Sep 22 '22 11:09

Ezra