Hardware Acceleration Issue [Nvidia Windows]

Hi Guys - Did something change with the HW acceleration detection logic?

With the latest DVR release, 2018.03.21.2139, I’m seeing a similar issue to my original post back in December at the top of this thread where SW is the only option for encoding.

Any help or suggestions? Any logs I can provide?

Hmm there were some transcoder updates recently and we added AMD support. The fix for NVIDIA is still in the code though…

Can you grab the HWE logs again?

iwr -usebasicparsing -method post http://127.0.01:8089/hls/hwaccel

Here you go… looks like there are definitely some errors in the log:

2018/03/30 20:12:03 [SYS] Starting Channels DVR v2018.03.21.2139 (windows-x86_64) in C:\ProgramData\ChannelsDVR\data
2018/03/30 20:12:03 [SYS] Running as a Windows system service.
2018/03/30 20:12:04 [HDR] Found 2 devices
2018/03/30 20:12:05 [SYS] Started HTTP Server
2018/03/30 20:12:12 [DVR] Recording engine started in D:\Channels DVR
2018/03/30 20:12:12 [SYS] Bonjour service running for dvr-wmc.local. [192.168.1.5]
2018/03/30 20:12:12 [SYS] Created database snapshot: backup-20180330.201212
2018/03/30 20:12:12 [SYS] Removing old backup backup-20180302.201430
2018/03/30 20:12:18 [HWE] Trying C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -hide_banner -nostats -loglevel warning -loglevel verbose -f lavfi -t 0.1 -i color=black:640x480 -c:v h264_amf -profile:v high -level 42 -b:v 400k -maxrate:v 600k -f null -y nul
[Parsed_color_0 @ 00000000005f7b40] 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_amf))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0000000001a21000] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[h264_amf @ 0000000000a19b00] DLL amfrt64.dll failed to open
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!
2018/03/30 20:12:19 [HWE] Failure: exit status 1
2018/03/30 20:12:19 [HWE] Trying C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -hide_banner -nostats -loglevel warning -loglevel verbose -f lavfi -t 0.1 -i color=black:640x480 -c:v h264_mf -profile:v high -level 42 -b:v 400k -maxrate:v 600k -f null -y nul
[Parsed_color_0 @ 0000000000677b00] 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_mf))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0000000001a70600] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[auto_scaler_0 @ 0000000001a70c00] w:iw h:ih flags:‘bicubic’ interl:0
[format @ 0000000001a70a00] auto-inserting filter ‘auto_scaler_0’ between the filter ‘Parsed_null_0’ and the filter ‘format’
[auto_scaler_0 @ 0000000001a70c00] w:640 h:480 fmt:yuv420p sar:1/1 -> w:640 h:480 fmt:nv12 sar:1/1 flags:0x4
[h264_mf @ 0000000000a69700] could not find any MFT for the given media type
[h264_mf @ 0000000000a69700] could not create MFT
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!
2018/03/30 20:12:19 [HWE] Failure: exit status 1
2018/03/30 20:12:19 [HWE] Trying C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -hide_banner -nostats -loglevel warning -loglevel verbose -f lavfi -t 0.1 -i color=black:640x480 -c:v h264_nvenc -profile:v high -level 42 -b:v 400k -maxrate:v 600k -f null -y nul
[Parsed_color_0 @ 0000000000527b40] 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_nvenc’
2018/03/30 20:12:19 [HWE] Failure: exit status 1
2018/03/30 20:12:19 [HWE] Trying C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -hide_banner -nostats -loglevel warning -loglevel verbose -f lavfi -t 0.1 -i color=black:640x480 -c:v h264_qsv -profile:v high -level 42 -b:v 400k -maxrate:v 600k -f null -y nul
[Parsed_color_0 @ 0000000000427b40] 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_qsv))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0000000001980500] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[auto_scaler_0 @ 0000000001981e00] w:iw h:ih flags:‘bicubic’ interl:0
[format @ 0000000001981300] auto-inserting filter ‘auto_scaler_0’ between the filter ‘Parsed_null_0’ and the filter ‘format’
[auto_scaler_0 @ 0000000001981e00] w:640 h:480 fmt:yuv420p sar:1/1 -> w:640 h:480 fmt:nv12 sar:1/1 flags:0x4
[h264_qsv @ 0000000000979680] Error initializing an internal MFX session: unsupported (-3)
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!
2018/03/30 20:12:19 [HWE] Failure: exit status 1
2018/03/30 20:12:19 [HWE] Trying C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -hide_banner -nostats -loglevel warning -loglevel verbose -f lavfi -t 0.1 -i color=black:640x480 -c:v h264_qsv -profile:v high -level 42 -b:v 400k -maxrate:v 600k -look_ahead 0 -f null -y nul
[Parsed_color_0 @ 0000000000507b80] 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_qsv))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0000000001a01f00] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[auto_scaler_0 @ 0000000001a00600] w:iw h:ih flags:‘bicubic’ interl:0
[format @ 0000000001a00c00] auto-inserting filter ‘auto_scaler_0’ between the filter ‘Parsed_null_0’ and the filter ‘format’
[auto_scaler_0 @ 0000000001a00600] w:640 h:480 fmt:yuv420p sar:1/1 -> w:640 h:480 fmt:nv12 sar:1/1 flags:0x4
[h264_qsv @ 00000000009f9bc0] Error initializing an internal MFX session: unsupported (-3)
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!
2018/03/30 20:12:19 [HWE] Failure: exit status 1
2018/03/30 20:12:22 [IDX] Pruned 0 expired airings from USA-IL68236-X in 2.9704ms.

1 Like

Looks like a regression in New: DVR pre-release with transcoder update (v2018.03.12.0501) that no one else noticed.

Try upgrading to this build for a fix:

iwr -usebasicparsing -method put http://127.0.0.1:8089/updater/check/2018.03.31.0136

Still an issue with the 2018.03.31.0136 version of the DVR. HWE log below…

2018/03/30 21:26:39 [SYS] Starting Channels DVR v2018.03.31.0136 (windows-x86_64) in C:\ProgramData\ChannelsDVR\data
2018/03/30 21:26:39 [SYS] Running as a Windows system service.
2018/03/30 21:26:43 [HDR] Found 2 devices
2018/03/30 21:26:47 [SYS] Started HTTP Server
2018/03/30 21:28:59 [DVR] Recording engine started in D:\Channels DVR
2018/03/30 21:28:59 [SYS] Bonjour service running for dvr-wmc.local. [192.168.1.5]
2018/03/30 21:29:00 [SYS] Created database snapshot: backup-20180330.212900
2018/03/30 21:29:00 [SYS] Removing old backup backup-20180305.021432
2018/03/30 21:29:11 [IDX] Pruned 2 expired airings from USA-IL68236-X in 2.2013754s.
2018/03/30 21:31:08 [NAT] Successfully mapped port 8089 using upnp
2018/03/30 21:31:54 [HWE] Trying C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -hide_banner -nostats -loglevel warning -loglevel verbose -f lavfi -t 0.1 -i color=black:640x480 -c:v h264_amf -profile:v high -level 42 -b:v 400k -maxrate:v 600k -f null -y nul
[Parsed_color_0 @ 0000000000577b40] 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_amf))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0000000001a51600] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[h264_amf @ 0000000000a49b00] DLL amfrt64.dll failed to open
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!
2018/03/30 21:31:54 [HWE] Failure: exit status 1
2018/03/30 21:31:54 [HWE] Trying C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -hide_banner -nostats -loglevel warning -loglevel verbose -f lavfi -t 0.1 -i color=black:640x480 -c:v h264_nvenc -profile:v high -level 42 -b:v 400k -maxrate:v 600k -f null -y nul
[Parsed_color_0 @ 0000000000657b40] 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_nvenc’
2018/03/30 21:31:54 [HWE] Failure: exit status 1
2018/03/30 21:31:54 [HWE] Trying C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -hide_banner -nostats -loglevel warning -loglevel verbose -f lavfi -t 0.1 -i color=black:640x480 -c:v h264_mf -profile:v high -level 42 -b:v 400k -maxrate:v 600k -f null -y nul
[Parsed_color_0 @ 0000000000347b00] 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_mf))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0000000001971700] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[auto_scaler_0 @ 0000000001970d00] w:iw h:ih flags:‘bicubic’ interl:0
[format @ 0000000001971100] auto-inserting filter ‘auto_scaler_0’ between the filter ‘Parsed_null_0’ and the filter ‘format’
[auto_scaler_0 @ 0000000001970d00] w:640 h:480 fmt:yuv420p sar:1/1 -> w:640 h:480 fmt:nv12 sar:1/1 flags:0x4
[h264_mf @ 0000000000969700] could not find any MFT for the given media type
[h264_mf @ 0000000000969700] could not create MFT
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!
2018/03/30 21:31:55 [HWE] Failure: exit status 1
2018/03/30 21:31:55 [HWE] Trying C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -hide_banner -nostats -loglevel warning -loglevel verbose -f lavfi -t 0.1 -i color=black:640x480 -c:v h264_qsv -profile:v high -level 42 -b:v 400k -maxrate:v 600k -f null -y nul
[Parsed_color_0 @ 00000000005b7b40] 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_qsv))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 00000000019e1400] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[auto_scaler_0 @ 00000000019e0900] w:iw h:ih flags:‘bicubic’ interl:0
[format @ 00000000019e0100] auto-inserting filter ‘auto_scaler_0’ between the filter ‘Parsed_null_0’ and the filter ‘format’
[auto_scaler_0 @ 00000000019e0900] w:640 h:480 fmt:yuv420p sar:1/1 -> w:640 h:480 fmt:nv12 sar:1/1 flags:0x4
[h264_qsv @ 00000000009d9680] Error initializing an internal MFX session: unsupported (-3)
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!
2018/03/30 21:31:55 [HWE] Failure: exit status 1
2018/03/30 21:31:55 [HWE] Trying C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -hide_banner -nostats -loglevel warning -loglevel verbose -f lavfi -t 0.1 -i color=black:640x480 -c:v h264_qsv -profile:v high -level 42 -b:v 400k -maxrate:v 600k -look_ahead 0 -f null -y nul
[Parsed_color_0 @ 0000000000457b80] 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_qsv))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0000000001970700] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[auto_scaler_0 @ 0000000001971700] w:iw h:ih flags:‘bicubic’ interl:0
[format @ 0000000001970500] auto-inserting filter ‘auto_scaler_0’ between the filter ‘Parsed_null_0’ and the filter ‘format’
[auto_scaler_0 @ 0000000001971700] w:640 h:480 fmt:yuv420p sar:1/1 -> w:640 h:480 fmt:nv12 sar:1/1 flags:0x4
[h264_qsv @ 0000000000969bc0] Error initializing an internal MFX session: unsupported (-3)
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!
2018/03/30 21:31:55 [HWE] Failure: exit status 1

Oops, try again with 2018.03.31.0220

That fixed it. Thanks!!

1 Like

Actually, I spoke too soon. Now, after a reboot, the channels DVR service does not start automatically, even though the service is set to start. However, if I go into the services console (services.msc) after the reboot, and click on the service to start, it does. I have tried this with “startup type” set to automatic as well as automatic (delayed)

[Edit]: While digging thru the Windows Event View, I see the following errors as two separate entires. There appears to be a timeout occurring during startup which is preventing the service from starting:

First Entry
**The Channels DVR Engine service failed to start due to the following error: **
The service did not respond to the start or control request in a timely fashion.

Second Entry
A timeout was reached (30000 milliseconds) while waiting for the Channels DVR Engine service to connect.

Hmm, what’s the DVR Log say when the service timeout occurs?

Sorry, I should’ve mentioned that as well… there’s actually nothing in the log at all. Here’s the sequence of events:

If you look at the snapshot of the log below, I initiated a restart of the Windows VM at approx 10:11 (DVR service shutting down). Then, after the VM restarted, I noted that the DVR service did not start, so I started digging thru the Windows event logs to see if I could find anything - those were the Windows event log entries that I posted above. They were time stamped from approx 10:18. Lastly, shortly before 11:00, I proceeded to go directly into the services console and clicked on “start” to run the DVR service at which point the service successfully started.

2018/03/31 10:11:47 [SYS] Shutting down…
2018/03/31 10:11:48 [SYS] Bonjour service stopped.
2018/03/31 10:11:49 [DVR] Recording engine stopped.
2018/03/31 10:11:49 [SYS] Goodbye.
2018/03/31 11:00:23 [SYS] Starting Channels DVR v2018.03.31.0220 (windows-x86_64) in C:\ProgramData\ChannelsDVR\data
2018/03/31 11:00:23 [SYS] Running as a Windows system service.
2018/03/31 11:00:26 [ERR] could not look up CPU info: context deadline exceeded
2018/03/31 11:00:26 [HDR] Found 2 devices
2018/03/31 11:00:27 [SYS] Started HTTP Server
2018/03/31 11:01:39 [DVR] Recording engine started in D:\Channels DVR

One option I was considering was to run the DVR as a scheduled task approx 10-15 minutes after login. While not ideal, I think this would potentially be a workaround, since I think during boot something is causing the initiation of the DVR service to time out.

I’ll be happy to keep debugging this though, and won’t try the task schedule idea until we can get to the bottom of this issue.

Seems like the NVIDIA test is so slow that the service is timing out. I can make it async…

cool - i’ll await a new build to test out. thanks again!

Try 2018.03.31.2015

Just tried 2018.03.31.2015, and it looks like making the NVIDIA check async did the trick! I don’t see any new events related to the service in the event viewer. The DVR logs look clean, and most importantly the DVR service started up after a reboot.

Thanks again for your help!!

1 Like

Fantastic. Thanks as always for reporting the issue and testing the fixes!