Originally posted by DanL
View Post
You'll find the supported hardware feature list at the bottom (Codec Support Matrix). For H.265/HEVC encoding does it need a Maxwell GM 20x chip or better. You will need the Nvidia proprietary driver (367.35 with kernel 4.6 or 370.23 with kernel 4.7), Nvidia Video SDK 7.0.1 and Nvidia CUDA 7.5. The Video SDK and CUDA stuff should you install into /usr/local/. Then you'll need to get the latest ffmpeg (i.e. 3.1.2). It's then just a matter of compiling ffmpeg with the paths all pointing into the right places.
Code:
export CFLAGS="$(cat $HOME/.cflags) -fipa-pta" export LDFLAGS="$(cat $HOME/.ldflags)" rm -rf objdir; mkdir objdir; pushd objdir export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH export LD_RUN_PATH=$LD_LIBRARY_PATH ../ffmpeg-3.1.2/configure --prefix=$HOME/av \ --enable-gpl --enable-version3 --enable-nonfree \ --arch=x86_64 --cpu=native \ --disable-debug --disable-stripping \ --enable-opengl --enable-opencl \ --enable-vaapi --enable-vdpau \ --enable-cuda --enable-cuvid --enable-nvenc \ --enable-libnpp \ --extra-cflags="-I/usr/local/cuda/include -I/usr/local/Video_Codec_SDK_7.0.1/Samples/common/inc" \ --extra-ldflags="-L/usr/local/cuda/lib64" \ --ar=gcc-ar --nm=gcc-nm --ranlib=true make -j16 && make install popd ln -s /usr/local/cuda/lib64/libnpp[csi].so* $HOME/av/lib
Once it's compiled can you run ffmpeg like this for example:
Code:
ffmpeg -i "$*" -v error \ -map_metadata -1 -sn \ -c:a aac -ac 2 -b:a 128k \ -filter:v "hwupload_cuda,scale_npp=w=852:h=480:format=nv12:interp_algo=lanczos,hwdownload,format=nv12" \ -c:v hevc_nvenc -b:v 768k \ -preset slow -level 6.2 -tier high \ -y "$out"
Hope this gives you a quick intro to it. It's definitely worth it.
Comment