-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
torchvision's ffmpeg
build has version incompatibility with openh264
#7508
Comments
I encountered the same problem on my mamba envs. It appears that I have a hack to get everything working togheter, but it isnt nice... ffmpeg appears to work sometimes if after i install it, I install torchvision without the
I set channel_priority strict since otherwise some of the pytorch packages ( i think pytorch 3d ) and some github repos overwrite the cuda enabled pytorch with pytorch w/o cuda from the forge channel I built a series of docker images trying to install ffmpeg in all sorts of ways. I then But if I install torchvision after this, ffmpeg reverts to ffmpeg 4.3 with its broken lib... which I cant remove without removing torchvision. I can force installing
I can finally make it work when I |
Actually... it can be made to work together quite simply by installing in this order...
I just did the pytorch and torchvision steps manually on top of an image with ffmpeg - Corrections to the comment:
|
I get the same problem. Solved it by overwriting the torchvison
|
🚀 The feature
I want pytorch/torchvision's
ffmpeg
build to supporth264
coding.This, perhaps, could be achieved by bumping up the
openh264
version (assuming it will fix the error, see below) or compiling it withlibx264
.Motivation, pitch
I am working with videos on a daily basis and use
ffmpeg
a lot. I like usingconda
environments and installingtorch/torchvision
in them.torchvision
comes withffmpeg
that I would like to use in CLI as well. This would allow sharing a single environment for projects that requireffmpeg
in pre-processing.Alternatives
Transcoding can be done by relying on another
ffmpeg
installation on a machine by turning off the environment withtorchvision
.Additional context
One may think that the
torchvision
'sffmpeg
is built withlibopenh264
(--enable-libopenh264
) and transcoding toh264
should be supported. However, when I attempt to transcode a video withffmpeg
as a CLI, it fails.Here is an MWE (a video):
I tried to install
libx264
in theconda
environment but it didn't work (becauseffmpeg
was not compiled with it?).I also tried to do
read_video() --> write_video(, video_codec='libx264')
but it didn't fail:Interesting, why?
I also tried to update
openh264
to the latest version byconda install openh264=2.3.1 -c conda-forge
butconda
downgradestorchvision
to 0.13.1 from themain
conda
channel and removeffmpeg
. Doing this with--no_deps
makesffmpeg
fails withlibopenh264.so.5: cannot open shared object file: No such file or directory
.Versions:
Also
ffmpeg
header:The text was updated successfully, but these errors were encountered: