(Apologies for cross-posting, I only just found this subforum, initially posted in the CUDA Setup And Installation subforum).
I’ve been trying to run the examples in the NVIDIA FFmpeg Transcoding Guide.
I’m running Ubuntu 18.04 on a Dell G7 laptop with a GEFORCE 1060 card.
What I’ve tried:
ffmpeg -vsync 0 -hwaccel cuvid -c:v h264_cuvid -i input.MOV -c:a copy -c:v h264_nvenc -b:v 5M output.mkv
Resut:
ffmpeg version N-96090-gfb705e4073 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.5.0 (Ubuntu 6.5.0-2ubuntu1~18.04) 20181026
configuration: --pkg-config-flags=--static --extra-libs='-lpthread -lm' --enable-gpl --enable-libvidstab --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-cuda-nvcc --enable-cuvid --enable-nvenc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --enable-nonfree
libavutil 56. 36.101 / 56. 36.101
libavcodec 58. 65.100 / 58. 65.100
libavformat 58. 35.101 / 58. 35.101
libavdevice 58. 9.101 / 58. 9.101
libavfilter 7. 69.101 / 7. 69.101
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.MOV':
Metadata:
major_brand : qt
minor_version : 537331968
compatible_brands: qt niko
creation_time : 2019-12-10T16:32:33.000000Z
Duration: 00:01:10.07, start: 0.000000, bitrate: 29869 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 28318 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)
Metadata:
creation_time : 2019-12-10T16:32:33.000000Z
encoder : AVC Coding
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
Metadata:
creation_time : 2019-12-10T16:32:33.000000Z
Stream mapping:
Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> h264 (h264_nvenc))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[h264_nvenc @ 0x55b875d5a500] Driver does not support the required nvenc API version. Required: 9.1 Found: 9.0
[h264_nvenc @ 0x55b875d5a500] The minimum required Nvidia driver for nvenc is 435.21 or newer
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
Output of nvidia-smi:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.64 Driver Version: 430.64 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 106... Off | 00000000:01:00.0 Off | N/A |
| N/A 58C P0 24W / N/A | 184MiB / 6078MiB | 2% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1615 G /usr/lib/xorg/Xorg 97MiB |
| 0 2159 G /usr/bin/gnome-shell 84MiB |
+-----------------------------------------------------------------------------+
I installed the NVIDIA drivers through
sudo apt install nvidia-prime
Updated to the latest version of NVIDIA drivers available through the apt system.
As it says in the error message,
The minimum required Nvidia driver for nvenc is 435.21 or newer
, whereas I have 430.64 installed.
I found this thread, in which the issue was resolved by downgrading FFMPEG.
Which version of FFMPEG should I downgrade to, so as to resolve this issue? Or is there a better way?
Thanks in advance.