Reference link - I: https://github.com/NVIDIA/VideoProcessingFramework
Reference link - II: https://github.com/NVIDIA/VideoProcessingFramework/wiki/Building-from-source
Ubuntu 18.04
Nvidia Graphic Driver 460
CUDA 11.0
CuDNN 8.0.5
Pytorch 1.7
Python 3.7
Install NVIDIA Driver 460, CUDA 11.0, CuDNN 8.0.5, Pytorch1.7
You can follow this link : https://sites.google.com/site/sehwanki1004/pytorch-install
System Requirements
NVIDIA Driver ver 455 or higer
CUDA 11.0 or higher
X11, OpenGL, GLUT, GLEW
FFMPEG 4.3.1 or higher
Vulkan SDK
1) Install X11, OpenGL, GLUT, GLEW
sudo apt-get install freeglut3-dev
sudo apt-get install -y libglew-dev
sudo apt-get install mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev
sudo apt-get install mesa-utils
2) Install Vulkan SDK
Reference link: aslike.tistory.com/24
sudo apt-get install libvulkan-dev
3) Install FFMPEG
sudo apt install ffmpeg x264 x265
sudo apt-get install libavcodec-dev
sudo apt-get install libavfilter-dev
sudo apt-get install libavformat-dev
sudo apt-get install libavutil-dev
4) Download NVIDIA Video Codec SDK
Download link: https://developer.nvidia.com/nvidia-video-codec-sdk
Extract the contents of the SDK into a folder.
Create a subfolder named "build" in Video_Codec_SDK_x.y.z/Samples
Use the following command to build samples in release mode.
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make install
If "url" error is occur, check this
"FFmpegStreamer.h" in Video_Codec_SDK_x.y.z/Samples/utils/
Modify this file as like "FFmpegStreamer.h" in github.com/NVIDIA/video-sdk-samples/blob/master/Samples/utils
export PATH_TO_SDK=~/Video_Codec_SDK_x.y.z
export PATH_TO_FFMPEG=/usr/bin
Find FFMPEG path
which ffmpeg
export CUDACXX=/usr/local/cuda/bin/nvcc
Download files
mkdir -p Git
cd ~/Git
git clone https://github.com/NVIDIA/VideoProcessingFramework.git
cd VideoProcessingFramework
export INSTALL_PREFIX=$(pwd)/install
mkdir -p install
mkdir -p build
cd build
Run CMAKE
cmake .. \
-DFFMPEG_DIR:PATH="$PATH_TO_FFMPEG" \
-DVIDEO_CODEC_SDK_DIR:PATH="$PATH_TO_SDK" \
-DGENERATE_PYTHON_BINDINGS:BOOL="1" \
-DGENERATE_PYTORCH_EXTENSION:BOOL="1" \
-DPYTHON_INCLUDE_DIR=/home/kaist/anaconda3/envs/pytorch1.7/include/python3.7m \
-DPYTHON_LIBRARY=/home/kaist/anaconda3/envs/pytorch1.7/lib/libpython3.7m.so \
-DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_PREFIX"
make && make install
PyNvCodec.cpython-37m-x86_64-linux-gnu.so
PytorchNvCodec.cpython-37m-x86_64-linux-gnu.so
libTC.so
libTC_CORE.so