您的位置:首页 > 其它

Getting Started with FFmpeg/libav using NVIDIA GPUs

2018-01-05 16:33 1141 查看
Using NVIDIA hardware acceleration in FFmpeg/libav requires the following steps

Download the latest FFmpeg or libav source code, by cloning the corresponding GIT repositories
FFmpeg: https://git.ffmpeg.org/ffmpeg.git Libav: https://github.com/libav/libav Download and install the compatible driver from NVIDIA web site
Downoad and install the CUDA Toolkit CUDA toolkit
Use the following configure command (Use correct CUDA library path in config command below)
./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp
--extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
Use following command for build: make -j 10
Use FFmpeg/libav binary as required. To start with FFmpeg, try the below sample command line for 1:2 transcoding
ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -vsync 0 -i <input.mp4> -vf scale_npp=1920:1072
-vcodec h264_nvenc <output0.264> -vf scale_npp=1280:720 -vcodec h264_nvenc <output1.264>
For more information on FFmpeg licensing, please see this page.
https://developer.nvidia.com/ffmpeg
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: