-
Notifications
You must be signed in to change notification settings - Fork 233
Building from source
Build process is same both for Windows & Linux.
- Please see README.md for build instructions. If you're facing any troubles with the installation feel free to open an issue!
The following steps can help to debug common build problems
- Run
pip install . --verbose
in the repository root to get more verbose output about the compilation - If
pip install . --verbose
fails, you can usecmake-gui
/cmake-gui.exe
on the generated_skbuild
folder to inspect CMake cache variables. CMake cache variables can be set during a pip build can be passed using the following environment variables: https://scikit-build.readthedocs.io/en/latest/usage.html#environment-variable-configuration - If the CUDA Toolkit can't be found, please check that
nvcc
/nvcc.exe
are in your$PATH
environment variable - If FFmpeg can't be found please check that you specified, please check that you've set
TC_FFMPEG_ROOT
via the environment variableSKBUILD_CONFIGURE_OPTIONS="-DTC_FFMPEG_ROOT=C:/path/to/your/ffmpeg/installation/ffmpeg/"
. On Linux,PKG_CONFIG_PATH
environment variable can be used to indicatepkg-config
(needs to be installed) where FFmpeg is installed (e.g. https://github.com/NVIDIA/VideoProcessingFramework/blob/ec8caf75c341b9f4a125db59676c6742c8b666fd/docker/Dockerfile.gpu#L51). Also check that your FFmpeg installation has the required header and DLL/LIB files on Windows or*.so
files on Linux.
The following steps can help to debug common problems at runtime
-
If the native extension fails to load, please use
ldd
on Linux ordumpbin /dependents
in a Visual Studio Native Tools Command Prompt to analyze missing dependencies. Missing shared libraries paths can be added toPATH
environment variable on Windows andLD_LOAD_PATH
/LD_LIBRARY_PATH
on Linux. Note that on Windows, the pip installer will copy required DLLs to the pip install location so that all needed DLLs should be already discoverable by Python. On Linux, this step is not performed. Please make sure that ffmpeg shared libraries are in yourLD_LOAD_PATH
/LD_LIBRARY_PATH
-
VPF includes the interface headers of Video Codec SDK 12.0. This implies a certain driver requirement. If you need to use the interface headers of an older Video SDK, please use
TC_VIDEO_CODEC_INTERFACE_DIR
to indicate the location of the alternative interface headers of the older Video Codec SDK.
Detailed instructions can be found at https://trac.ffmpeg.org/wiki/CompilationGuide.
On Ubuntu, ffmpeg can be configured and compiled using the following to produce shared libraries needed by VPF. On Windows, we recommend either cross-compiling on WSL or downloading binary distributions.
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg
mkdir -p $(pwd)/build_x64_release_shared
./configure \
--prefix=$(pwd)/build_x64_release_shared \
--disable-static \
--disable-stripping \
--disable-doc \
--enable-shared
make -j -s && make install
In order to use the compiled FFmepg for VPF, please make sure the library install location is included in your LD_LOAD_PATH
/LD_LIBRARY_PATH
.