Hi @paulcarroty,
I like very much to archive/deprecate the ffmpeg-on-clear-linux project. Unfortunately, the ffmpeg
binary in Clear Fraction lacks nvdec (cuda)
support.
Basically, it requires one tiny dependency to be able to pass the --enable-nvdec
option to the ffmpeg
configure script. The great news is that one can build ffmpeg
with nvdec
support without NVIDIA driver / CUDA Toolkit.
Dependency needed / package name: nv-codec-headers
nvver="11.1.5.1"
url="https://github.com/FFmpeg/nv-codec-headers/releases/download/n${nvver}/nv-codec-headers-${nvver}.tar.gz"
curl -LO ${url}
cd nv-codec-headers-${nvver}
# build
make PREFIX=/usr LIBDIR=lib64
# install
make PREFIX=/usr LIBDIR=lib64 install
Add option to ffmpeg
configure.
--enable-nvdec
Before - Clear Fraction without nvdec support
Enabled hwaccels: (from ./configure output)
av1_vaapi mpeg1_xvmc vp8_vaapi
h263_vaapi mpeg2_vaapi vp9_vaapi
h264_vaapi mpeg2_xvmc wmv3_vaapi
hevc_vaapi mpeg4_vaapi
mjpeg_vaapi vc1_vaapi
Hardware acceleration methods: (from ffmpeg -hwaccels)
vaapi
qsv
drm
vulkan
After - Clear Fraction with nvdec support
Enabled hwaccels: (from ./configure output)
av1_nvdec mjpeg_vaapi vc1_nvdec
av1_vaapi mpeg1_nvdec vc1_vaapi
h263_vaapi mpeg1_xvmc vp8_nvdec
h264_nvdec mpeg2_nvdec vp8_vaapi
h264_vaapi mpeg2_vaapi vp9_nvdec
hevc_nvdec mpeg2_xvmc vp9_vaapi
hevc_vaapi mpeg4_nvdec wmv3_nvdec
mjpeg_nvdec mpeg4_vaapi wmv3_vaapi
Hardware acceleration methods: (from ffmpeg -hwaccels)
cuda
vaapi
qsv
drm
vulkan
Currently (using Clear Fraction’s FFmpeg), folks using NVIDIA graphics can decode using VA-API.
ffmpeg -y -hwaccel vaapi -c:v vp9 -i input_vp9.webm -f null -
ffmpeg -y -hwaccel vaapi -c:v av1 -i input_av1.mp4 -f null -
Wish List - Summary
Please add the nv-codec-headers
build dependency and the ffmpeg
configure option --enable-nvdec
. That will allow folks using NVIDIA graphics to select nvdec
acceleration. The -c:v av1_cuvid
selection for AV1 content is noticeably faster.
ffmpeg -y -hwaccel nvdec -c:v vp9_cuvid -i input_vp9.webm -f null - # 1436 fps
ffmpeg -y -hwaccel nvdec -c:v vp9 -i input_vp9.webm -f null - # 1428 fps
ffmpeg -y -hwaccel nvdec -c:v av1_cuvid -i input_av1.mp4 -f null - # 1629 fps
ffmpeg -y -hwaccel nvdec -c:v av1 -i input_av1.mp4 -f null - # 895 fps
See also, Fedora Koji URL.
Thank you.