GPU Support

I’ve got a NVidia GeForce GT710 installed in a Ubuntu box running 20.04 with the proprietary NVidia drivers loaded but no hardware transcoding option is available.

From what I can see this card can and ca’t do transcoding (different sites / different results).

Wondering if anyone can say that it should work. If not can someone recommend a card that will?

Thanks!

Have you checked that the use Channels is running as has access to the card? Is it a member of the video or render group?

Yes, should have mentioned that...

id
uid=1000(john) gid=1000(john) groups=1000(john),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lxd),115(render)

ls -alh /dev/dri
total 0
drwxr-xr-x 3 root root 140 Oct 2 13:36 .
drwxr-xr-x 19 root root 4.2K Oct 2 13:36 ..
drwxr-xr-x 2 root root 120 Oct 2 13:36 by-path
crw-rw----+ 1 root video 226, 0 Oct 2 13:36 card0
crw-rw----+ 1 root video 226, 1 Oct 2 13:36 card1
crw-rw----+ 1 root render 226, 128 Oct 2 13:36 renderD128
crw-rw----+ 1 root render 226, 129 Oct 2 13:36 renderD129

Run a HWE check as outlined in the FAQ

2021/10/02 15:00:50.543939 [HWE] Trying nvenc: /usr/local/Channels-DVR/channels-dvr/2021.10.01.0607/ffmpeg-dl /usr/local/Channels-DVR/channels-dvr/2021.10.01.0607/ffmpeg-dl -hide_banner -nostats -loglevel warning -loglevel verbose -f lavfi -t 0.1 -i color=black:640x480 -f null -c:v h264_nvenc -profile:v high -level 42 -b:v 400k -maxrate:v 600k -y /dev/null
[Parsed_color_0 @ 0x2e8e9c0] size:640x480 rate:25/1 duration:-1.000000 sar:1/1
Input #0, lavfi, from 'color=black:640x480':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo, 1 reference frame (I420 / 0x30323449), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0x2ed9a80] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[h264_nvenc @ 0x2ebbac0] Cannot load libnvidia-encode.so.1
[h264_nvenc @ 0x2ebbac0] The minimum required Nvidia driver for nvenc is 418.30 or newer
[h264_nvenc @ 0x2ebbac0] Nvenc unloaded
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!
2021/10/02 15:00:50.550919 [HWE] Failure: exit status 1
2021/10/02 15:00:50.550933 [HWE] Trying amf: /usr/local/Channels-DVR/channels-dvr/2021.10.01.0607/ffmpeg-dl /usr/local/Channels-DVR/channels-dvr/2021.10.01.0607/ffmpeg-dl -hide_banner -nostats -loglevel warning -loglevel verbose -f lavfi -t 0.1 -i color=black:640x480 -f null -c:v h264_amf -profile:v high -level 42 -b:v 400k -maxrate:v 600k -y /dev/null
[Parsed_color_0 @ 0x32dc9c0] size:640x480 rate:25/1 duration:-1.000000 sar:1/1
Input #0, lavfi, from 'color=black:640x480':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo, 1 reference frame (I420 / 0x30323449), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Unknown encoder 'h264_amf'
2021/10/02 15:00:50.554346 [HWE] Failure: exit status 1
2021/10/02 15:00:50.554367 [HWE] Trying vaapi@/dev/dri/renderD129: /usr/local/Channels-DVR/channels-dvr/2021.10.01.0607/ffmpeg /usr/local/Channels-DVR/channels-dvr/2021.10.01.0607/ffmpeg -hide_banner -nostats -loglevel warning -loglevel verbose -init_hw_device vaapi=intel:/dev/dri/renderD129 -f lavfi -t 0.1 -i color=black:640x480 -f null -y /dev/null
[AVHWDeviceContext @ 0x680d700] libva: VA-API version 1.11.0
[AVHWDeviceContext @ 0x680d700] libva: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[AVHWDeviceContext @ 0x680d700] Failed to initialise VAAPI connection: -1 (unknown libva error).
2021/10/02 15:00:50.801229 [HWE] Failure: signal: segmentation fault (core dumped)
2021/10/02 15:00:50.801270 [HWE] Trying vaapi@/dev/dri/renderD128: /usr/local/Channels-DVR/channels-dvr/2021.10.01.0607/ffmpeg /usr/local/Channels-DVR/channels-dvr/2021.10.01.0607/ffmpeg -hide_banner -nostats -loglevel warning -loglevel verbose -init_hw_device vaapi=intel:/dev/dri/renderD128 -f lavfi -t 0.1 -i color=black:640x480 -f null -y /dev/null
[AVHWDeviceContext @ 0x74a1700] libva: VA-API version 1.11.0
[AVHWDeviceContext @ 0x74a1700] libva: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[AVHWDeviceContext @ 0x74a1700] Failed to initialise VAAPI connection: -1 (unknown libva error).
2021/10/02 15:00:51.030478 [HWE] Failure: signal: segmentation fault (core dumped)
2021/10/02 15:00:51.030520 [HWE] Cannot access /dev/renderD128: no such file or directory
2021/10/02 15:00:51.030531 [HWE] Cannot access /dev/dri/card0: permission denied

Some drivers are missing it seems.

[h264_nvenc @ 0x2ebbac0] Cannot load libnvidia-encode.so.1
[h264_nvenc @ 0x2ebbac0] The minimum required Nvidia driver for nvenc is 418.30 or newer

Got it...

I needed to install nvidia-driver-470 and not nvidia-headless-470-server. I incorrectly assumed since I am running a headless server that the latter would be the one to choose.

@tmm1 Aman, Non-ATSC 3.0 recordings play fine in the web UI using hardware transcoding but that ATSC 3.0 don't. I think I recall that this is expected or a known issue. Is that still the case?

Thanks!

Yes that's a known issue with some hardware modes. Please submit diagnostics after attempting playback.

IIRC it's because ffmpeg can't transcode the AC-4 audio in the ATSC 3.0 broadcasts.

Diags submitted: b26484f4-0958-4d21-88f4-7aad6e94339a

Logs:

2021/10/02 16:13:57.860269 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-11-152898023 at 11 (10.994289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:00.391308 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-11-152898023 after starting from 11 without encoding any segments
2021/10/02 16:14:00.391862 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-11-2034140636 at 11 (10.994289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:00.797762 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-11-2034140636 after starting from 11 without encoding any segments. Marked segment as failed.
2021/10/02 16:14:00.798462 [ENC] Next segment to pre-encode of 127 is 1m56.116000001s from the last request of 11
2021/10/02 16:14:00.798841 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-127-4132313055 at 127 (127.110289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:01.991138 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-127-4132313055 after starting from 127 without encoding any segments
2021/10/02 16:14:01.991186 [ENC] Next segment to pre-encode of 127 is 3.003s from the last request of 124
2021/10/02 16:14:01.991628 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-127-335034455 at 127 (127.110289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:02.391414 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-127-335034455 after starting from 127 without encoding any segments. Marked segment as failed.
2021/10/02 16:14:02.391464 [ENC] Next segment to pre-encode of 128 is 1.001s from the last request of 127
2021/10/02 16:14:02.391874 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-128-2347076758 at 128 (128.111289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:03.791825 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-128-2347076758 after starting from 128 without encoding any segments
2021/10/02 16:14:03.792382 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-128-675637784 at 128 (128.111289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:04.191526 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-128-675637784 after starting from 128 without encoding any segments. Marked segment as failed.
2021/10/02 16:14:04.191576 [ENC] Next segment to pre-encode of 129 is 1.001s from the last request of 128
2021/10/02 16:14:04.192050 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-129-969092401 at 129 (129.112289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:05.791582 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-129-969092401 after starting from 129 without encoding any segments
2021/10/02 16:14:05.792109 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-129-2006779824 at 129 (129.112289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:06.192270 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-129-2006779824 after starting from 129 without encoding any segments. Marked segment as failed.
2021/10/02 16:14:06.192321 [ENC] Next segment to pre-encode of 130 is 1.001s from the last request of 129
2021/10/02 16:14:06.192876 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-130-4026209982 at 130 (130.113289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:08.391846 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-130-4026209982 after starting from 130 without encoding any segments
2021/10/02 16:14:08.392372 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-130-2343207958 at 130 (130.113289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:08.791707 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-130-2343207958 after starting from 130 without encoding any segments. Marked segment as failed.
2021/10/02 16:14:08.791769 [ENC] Next segment to pre-encode of 131 is 1.001s from the last request of 130
2021/10/02 16:14:08.792395 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-131-2682721595 at 131 (131.114289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:10.391645 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-131-2682721595 after starting from 131 without encoding any segments
2021/10/02 16:14:10.392159 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-131-4223522914 at 131 (131.114289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:10.791495 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-131-4223522914 after starting from 131 without encoding any segments. Marked segment as failed.
2021/10/02 16:14:10.791549 [ENC] Next segment to pre-encode of 132 is 1.001s from the last request of 131
2021/10/02 16:14:10.791978 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-132-1898687974 at 132 (132.115289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:11.991446 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-132-1898687974 after starting from 132 without encoding any segments
2021/10/02 16:14:11.992009 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-132-285428052 at 132 (132.115289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:12.391831 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-132-285428052 after starting from 132 without encoding any segments. Marked segment as failed.
2021/10/02 16:14:12.391920 [ENC] Next segment to pre-encode of 133 is 1.001s from the last request of 132
2021/10/02 16:14:12.392405 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-133-1532562902 at 133 (133.116289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:13.391627 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-133-1532562902 after starting from 133 without encoding any segments
2021/10/02 16:14:13.392036 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-133-2857812126 at 133 (133.116289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:13.792212 [ENC] Encoder stopped for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-133-2857812126 after starting from 133 without encoding any segments. Marked segment as failed.
2021/10/02 16:14:13.792266 [ENC] Next segment to pre-encode of 134 is 1.001s from the last request of 133
2021/10/02 16:14:13.792806 [ENC] Starting encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-134-1935198419 at 134 (134.117289) (encoder=h264_nvenc, resolution=720, deinterlacer=linear, bitrate=6000 segment_size=0.01)
2021/10/02 16:14:15.274314 [ENC] Stopped encoder for ABC World News Tonight With David Muir S2021E274 2021-10-01-1830.mpg in /var/Channels-DVR/Streaming/file16442-ip192.168.1.100-863498129/encoder-134-1935198419 after encoding 134 to 0

@tmm1 Did the diagnostics help any? Is there a chance you can get this card to transcode ATSC 3.0? If not can you recommend a card that I can switch to that would work?

Thanks!

@tmm1 Aman, any update on this? Curious, we're abut to be remote for a bit and would like it to work if possible.

Thanks!

Not really sure what's going on. I don't have an nvidia gpu on hand for testing.

Simplest solution would be to switch to software transcoding.

Ok, thanks. Can you recommend a GOU that works well?

We have not tested transcoding of ATSC3 with any GPUs yet.

Ok, thanks.