Wilan
Wilan

Reputation: 177

FFMPEG 4.2.4, Python 3.9: "ffmpeg: error while loading shared libraries: libopenh264.so.5: cannot open shared object file: No such file or directory"

I'm using ffmpeg 4.2.4 and Python 3.9

Currently getting error:
ffmpeg: error while loading shared libraries: libopenh264.so.5: cannot open shared object file: No such file or directory

Tried the solutions from these links but they didn't work:
ffmpeg: error while loading shared libraries: libopenh264.so.5
Ffmpeg error in linux

If anyone has any idea how to fix it, or needs any more information, please let me know.


Edit: I've noticed that it's been over a year later since I created this post and it's still getting replies - I've created a gist explaining another way I overcame a similar issue

Basically, I uninstalled conda's version of ffmpeg (in the environment that's having issues) using conda uninstall ffmpeg --force and (for Ubuntu), update the system wide version (I think this is what it's called) with sudo apt install ffmpeg

Upvotes: 1

Views: 6075

Answers (2)

Brian Bartoldson
Brian Bartoldson

Reputation: 924

Like Wilan, my issue stemmed from getting ffmpeg with PyTorch. conda update ffmpeg did not work for me, but conda install -c conda-forge ffmpeg (specifying the conda-forge channel) fixed my issue.

Upvotes: 2

Wilan
Wilan

Reputation: 177

Figured out you can conda update ffmpeg, even though you can't install it with conda... Completely fixed the issue. Posting this incase someone else has the same problem. Note: I got (the faulty) ffmpeg from downloading PyTorch with the command via the official site.

Upvotes: 9

Related Questions