-
Notifications
You must be signed in to change notification settings - Fork 35
Allow to specify a path for ffmpeg binary #265
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
Comments
There are multiple .so files that libtorchcodec.so needs. avutil, avcodec, etc. are all libraries that libtorchcodec.so needs. You could probably try LD_PRELOAD= python <script that uses torchcodec> to test out different versions of specific .so files. Let me know if that doesn't work. Torchcodec dynamically links against ffmpeg .so files because of licensing reasons. You could probably change the build rules in CMakeLists.txt to statically link against your ffmpeg archives if you want to do that. |
Seconded that LD_PRELOAD is probably the best option here. TorchCodec itself is not looking for FFmpeg in specific locations. Rather, TorchCodec is dynamically loading its C++ code from a shared library that itself was linked against a specific version of FFmpeg at compile time. Which FFmpeg libraries to use at runtime is determined by the system calls that load our library. These system calls have a predetermined set of locations it's going to look for libraries on your system that match what our library was compiled for. The standard way to make a particular library file to be loaded instead of what's installed in the standard locations on your system is LD_PRELOAD. |
Closing as I believe LD_PRELOAD solves the problem. |
🚀 The feature
Hello! Thanks for the project.
It would be nice to be able to specify a different path for the ffmpeg binary that will be loaded by torchcodec. If a different binary is provided we could perhaps avoid some system checks to
libavutil
to also allow users to use static builds of ffmpeg.Motivation, pitch
I think this feature will provide the following benefit:
The text was updated successfully, but these errors were encountered: