OBS Studio can use ffmpeg and the cuda version has not been included with mga7.
But it seems OBS studio is not also aware that ffmpeg can be compiled with these different facilities, and so even with ffmpeg selected as the encoder still cant present the right options to
make ffmpeg encode using the graphics card.
had the same issue with ffmpeg as provided
im not sure what your use case for obs studio was , but i can say a similar application shotcut as supplied as an appimage from one of the appimage repos,
does have hevc_nvenc and h264_nvenc as hardware encoder options.
https://sourceforge.net/projects/shotcu ... e/downloadto run, simply make executable and double click it.
alternatively if you just want to convert video formats as i do, then the following will be helpful, as it will provide a nvenc capable ffmpeg, which can change 0.20 frames a second to anything for example 200.
based on 1070ti
- Code: Select all
"make sure the following is installed (or similar versions)"
rpm -qa|egrep 'cuda|nvidia'
dkms-nvidia-current-430.34-1.mga7.nonfree
x11-driver-video-nvidia-current-430.34-1.mga7.nonfree
nvidia-current-utils-430.34-1.mga7.nonfree
nvidia-cuda-toolkit-10.1.168-1.mga7.nonfree
nvidia-cuda-toolkit-devel-10.1.168-1.mga7.nonfree
nvidia-current-cuda-opencl-430.34-1.mga7.nonfree
nvidia-current-doc-html-430.34-1.mga7.nonfree
"you need the following downloaded ."
git clone https://github.com/FFmpeg/nv-codec-headers
wget https://ffmpeg.org/releases/ffmpeg-4.1.4.tar.gz
tar xvf ffmpeg-4.1.4.tar.gz
drwx------ 18 peter peter 4096 Jul 22 16:38 ffmpeg-4.1.4/
-rw-rw-r-- 1 peter peter 10691784 Jul 22 16:35 ffmpeg-4.1.4.tar.bz2
drwxr-xr-x 4 peter peter 4096 Apr 15 16:17 nv-codec-headers/
"now build it (the make installs need to be run as root, unless you choose your home area for install)"
cd nv-codec-headers
make
make install PREFIX=/opt/ffmpeg
cd ../ffmpeg-4.1.4
PKG_CONFIG_PATH="/opt/ffmpeg/lib/pkgconfig" ./configure --prefix=/opt/ffmpeg --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib64/
make -j 10
make install
now either mv /bin/ffmpeg to one side and link the one in /opt/ffmpeg/bin, or prefix your path to /opt/ffmpeg/bin before bin.
either option works, one mayt be better for you.
ive already asked if this could be compiled in like in mga6 and i got back an excuse that some of the stuff needed was not redistributable (did it change since 6?)
also just to make this complete a few examples to test nvenc
- Code: Select all
prepare for blueray playback dolby HD
/opt/ffmpeg/bin/ffmpeg -hwaccel_device 0 -hwaccel cuvid -i input_file.mkv -c:v h264_nvenc -preset slow -rc cbr_hq -b:v 10000k -maxrate 20000k -bufsize 1000k -profile:v high -level:v 4.1 -pix_fmt yuv420p -flags global_header -c:a aac output_file.mkv
prepare for blueray playback dolby 5.1
/opt/ffmpeg/bin/ffmpeg -hwaccel_device 0 -hwaccel cuvid -i input_file.mkv -c:v h264_nvenc -preset slow -rc cbr_hq -b:v 10000k -maxrate 20000k -bufsize 1000k -profile:v high -level:v 4.1 -pix_fmt yuv420p -flags global_header -c:a ac3 output_file.mkv
prepare for 4k blueray playback dolby 5.1
/opt/ffmpeg/bin/ffmpeg -hwaccel_device 0 -hwaccel cuvid -i input_file.mkv -c:v h264_nvenc -preset slow -rc cbr_hq -b:v 10000k -maxrate 20000k -bufsize 1000k -profile:v high -level:v 4.1 -pix_fmt yuv420p -flags global_header -c:a ac3 output_file.mkv
select first video track and second audio track only
/opt/ffmpeg/bin/ffmpeg -hwaccel_device 0 -hwaccel cuvid -i input_file.mkv -c:v h264_nvenc -preset slow -rc cbr_hq -b:v 10000k -maxrate 20000k -bufsize 1000k -profile:v high -level:v 4.1 -pix_fmt yuv420p -flags global_header -map 0:v:0 -map 0:a:1 -c:a ac3 output_file.mkv
downsize from 4k to blueray playback dolby 5.1 untested
/opt/ffmpeg/bin/ffmpeg -hide_banner -hwaccel_device 0 -hwaccel nvdec -c:v hevc_cuvid -resize 1920x1080 -i input_file.mkv -c:v h264_nvenc -preset slow -rc cbr_hq -b:v 10000k -maxrate 20000k -bufsize 1000k -profile:v high -level:v 4.1 -pix_fmt yuv420p -flags global_header -c:a ac3 output_file.mkv
blueray to fit on 8 gig dvd
/opt/ffmpeg/bin/ffmpeg -hwaccel_device 0 -hwaccel cuvid -i input_file.mkv -c:v h264_nvenc -preset slow -rc cbr_hq -b:v 7000k -maxrate 10000k -bufsize 1000k -profile:v high -level:v 4.1 -pix_fmt yuv420p -flags global_header -c:a ac3 output_file.mkv
hope this helps you as well as others, it took me sometime to get it all working (all based on mga7 install)
regards peter