Jump to content

Emby failing to use Hardware Transcoding


Recommended Posts

agottschling
Posted

Hi All,

I've been having an issue recently where my server seems unable to use Intel QuickSync to transcode content and this system previously would transcode using QS.

This occurs after multiple reboots, on multiple different files, and on both the web app, and the Roku app as far as I have tested.

I've applied the server 2019 Group Policy patch to no avail.

Log files are attached below.  Please let me know if I can provide more info. Cheers!

 

System Specs:

Mac Mini Server 2012 (i7-3615qm, HD Graphics 4000, Server 2019 Standard)

16GB of ram

NO display connected (running headless)

 Files are stored on a Synology DS1618+ connected using a 2Gb trunk, Mini has a 1Gb connectio n

 hardware_detection-63735370536.txt

ffmpeg-transcode-323e494f-db0f-48b6-91e8-24ca2ab0f760_1.txt

embyserver.txt

Happy2Play
Posted

Don't know if this is driver or device/OS related but the decoding process is failing.  If you disabled decoding and only enable encoding does it work.

21:35:57.913 qsv hwaccel requested for input stream #0:0, but cannot be initialized.
21:35:57.913 Error while decoding stream #0:0: No such device or address
21:35:57.913 [AVHWDeviceContext @ 000002717c1b6a80] Using D3D11 device 8086:0166 (Intel(R) HD Graphics 4000).
21:35:57.913 [AVHWDeviceContext @ 000002717c1b6a80] Failed to create Direct3D11 device (887a0004)

 

agottschling
Posted

I haven't disabled anything AFAIK. Transcoding settings page below: image.thumb.png.c9104b8f7f8cc2cf0221fbae5f642628.png

Happy2Play
Posted
6 minutes ago, agottschling said:

I haven't disabled anything AFAIK. Transcoding settings page below: image.thumb.png.c9104b8f7f8cc2cf0221fbae5f642628.png

Please toggle from Yes to Advanced.

Happy2Play
Posted

If you disable h264 decoding do you get HWA encoding.

But our ffmpeg god may have to explain why decoding is not working.

You do have Emby Premiere, correct?

agottschling
Posted
Just now, Happy2Play said:

If you disable h264 decoding do you get HWA encoding.

But our ffmpeg god may have to explain why decoding is not working.

You do have Emby Premiere, correct?

Yes, I have a lifetime Premiere license

No HW encoding w/ decoding disabled:

image.png.f85db702369d3daa4b8272a3fa4abbf7.png

image.thumb.png.1b02b3877e7eb2843ae44efeda630170.png

Happy2Play
Posted
1 minute ago, agottschling said:

Yes, I have a lifetime Premiere license

No HW encoding w/ decoding disabled:

image.png.f85db702369d3daa4b8272a3fa4abbf7.png

image.thumb.png.1b02b3877e7eb2843ae44efeda630170.png

Can you post the ffmpeg log for this playback.

Happy2Play
Posted

This one shows encoding error.  Tagged devs for more insight.

22:09:43.005 Stream mapping:
22:09:43.005   Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
22:09:43.020   Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))
22:09:43.020   Stream #0:2 -> #1:0 (subrip (srt) -> webvtt (native))
22:09:43.020   Stream #0:0 -> #1:1 (copy)
22:09:43.020 Press [q] to stop, [?] for help
22:09:43.286 [h264_qsv @ 0000018b7565f040] Error initializing an internal MFX session: unsupported (-3)
22:09:43.286 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
22:09:43.286 [aac @ 0000018b756607c0] Qavg: 63279.512
22:09:43.286 [aac @ 0000018b756607c0] 2 frames left in the queue on closing
22:09:43.302 Conversion failed!

@Luke @softworkz

Happy2Play
Posted

What driver version is installed for "Intel(R) HD Graphics 4000"?

agottschling
Posted

I updated to the latest from Intel's site last night. I can get you the exact version in an hour or so

Posted

Try just selecting yes and going with the defaults and see how that compares.

Happy2Play
Posted
2 minutes ago, Luke said:

Try just selecting yes and going with the defaults and see how that compares.

That is what is in the first post showing Error While Decoding.

21:35:57.913 Error while decoding stream #0:0: No such device or address

 

Posted

@agottschling 

  • This is a very old 3rd gen CPU which doesn't fully support D3D11 (especially not hardware filtering)
  • When you say it had worked previously, are you sure that it was without having a monitor connected?
agottschling
Posted (edited)
7 minutes ago, softworkz said:

@agottschling 

  • This is a very old 3rd gen CPU which doesn't fully support D3D11 (especially not hardware filtering)
  • When you say it had worked previously, are you sure that it was without having a monitor connected?

I used to have a monitor connected to it but I didn't at the time these screenshots were taken, however, I've connected a dummy adapter and it doesn't seem to help, but let me know if there's a test of some kind I can run. I'll also try connecting a monitor and see if that helps

Cheers!

Edited by agottschling
Posted

You can make the following tests:

  • Check whether D3D11 works at all
    • Disable all hw encoders and decoders
    • Enable only DX11VA H264 Decoder
      .
  • Check whether QSV D3D11 decoder works standalone
    (only when test above would work)
    • Disable all hw encoders and decoders
    • Enable only QSV H264 D3D11VA Decoder

When this doesn't work, then you should focus on the group policy setting and also try not to run Emby as a service and also not to launch Emby from an RDP session.

agottschling
Posted (edited)
20 minutes ago, softworkz said:

You can make the following tests:

  • Check whether D3D11 works at all
    • Disable all hw encoders and decoders
    • Enable only DX11VA H264 Decoder
      .
  • Check whether QSV D3D11 decoder works standalone
    (only when test above would work)
    • Disable all hw encoders and decoders
    • Enable only QSV H264 D3D11VA Decoder

When this doesn't work, then you should focus on the group policy setting and also try not to run Emby as a service and also not to launch Emby from an RDP session.

As a few other points, When I DEFINATELY had HW transcoding working on this system, there was a monitor connected to the HDMI port on the Mini but it wasn't active (meaning the mini could see a display but the display had a different port selected). Also, emby was running as a service under an account of it's own: 'MEDIASERVER\media'. Finally, Emby would launch automatically on boot, as a service, and HW transcoding would work.

EDIT: the group policy settings were NOT Configured at the time as well.

Edit2: The currently installed graphics driver version is 10.18.10.5146, released on 5/15/2020. I downloaded the driver directly from Intel's site and installed it when I noticed that the system was reporting the driver as "Microsoft Basic Display Adapter". Would running DDU help at all?

Dunno if that makes a difference at all, but I'm going to connect a display, reboot once or twice, and see if that makes a difference running those tests. Cheers!

Edited by agottschling
corrected some details
Posted
15 minutes ago, agottschling said:

EDIT: the group policy settings were NOT Configured at the time as well.

It hadn't always been required. There has been a change in the OS.

16 minutes ago, agottschling said:

The currently installed graphics driver version is 10.18.10.5146, released on 5/15/2020. I downloaded the driver directly from Intel's site and installed it when I noticed that the system was reporting the driver as "Microsoft Basic Display Adapter". Would running DDU help at all?

No. "Microsoft Basic Display Adapter" typically means that you're inside an RDP session.  

I would start from the other side:

  • Connect Real Monitor 
  • Don't login via RDP
  • Don't run as service

 

 

 

 

agottschling
Posted
5 minutes ago, softworkz said:

It hadn't always been required. There has been a change in the OS.

No. "Microsoft Basic Display Adapter" typically means that you're inside an RDP session.  

I would start from the other side:

  • Connect Real Monitor 
  • Don't login via RDP
  • Don't run as service

 

 

 

 

Correct, However, after applying the GPO it now says Intel HD Graphics 4000 no matter if I log on locally or over RDP

agottschling
Posted

So, an update:

No matter what I try, I still can't get HW transcoding to work properly. I've rebooted several times, restarted emby numerous times, and even tried local login. I can't launch emby as a local user as the user that runs emby cannot log in (it's a service only user) and I need to be able to log in to that user so that the connection to the NAS can happen. That all said, trying with ffmpeg does seem to work, but when I try to make it use d3d11, it falls flat. Using the standard h264_qsv decoder/encoder works fine though, and produces a file that is watchable (this also worked over RDP).

 

Any thoughts?

  • 1 month later...
Posted
On 9/12/2020 at 5:05 AM, agottschling said:

I can't launch emby as a local user as the user that runs emby cannot log in (it's a service only user)

You could turn the user into a real user and log in with those credentials and run Emby normally (for testing).

That could even be the problem: when a service user has never logged in to a regular user session, then there are a lot of registry entries missing (these get created on first login).
When the user doesn't have a full user profile, it's very well possible that this affects hw acceleration and RDP session behavior.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...