Jump to content

Transcoding - HW Acceleration not working properly


iinthesky73

Recommended Posts

iinthesky73

@@Luke @@softworkz

 

Not the subtitles thing.. i mean overall the fact that my GPU is not being utilized. So i tested it some more .. this time with multiple streams and its as I suspected. One stream sends the CPU to 80%+  -- adding another its 100% pegged across the board. I think adding a third stream, if it happens to transcode all 3 simultaneously, it'll start to choke. No way that should happen with powerful GPU hardware in the system. The work should be almost completely offloaded to the GPU.

 

This is not good obviously. 

Link to comment
Share on other sites

@@Luke @@softworkz

 

Not the subtitles thing.. i mean overall the fact that my GPU is not being utilized. So i tested it some more .. this time with multiple streams and its as I suspected. One stream sends the CPU to 80%+  -- adding another its 100% pegged across the board. I think adding a third stream, if it happens to transcode all 3 simultaneously, it'll start to choke. No way that should happen with powerful GPU hardware in the system. The work should be almost completely offloaded to the GPU.

 

This is not good obviously. 

 

Have you tried connecting a monitor to your Radeon as I had suggested?

Link to comment
Share on other sites

Not to jump the post, but I am experiencing this as well.

I have a premier account, and an AMD gpu. Prior to 4.X the GPU would do all of the transcoding, now only CPU. I do have a monitor connected to the gpu. DVAX2 is set for all transcoding types and set to use my Fury X.

I don't mind jumping on beta if that might help, and can supply logs upon request. Otherwise I am going to keep following to see if there is a solution.

 

Oh, and keep up the great work, Emby has been my choice for media serving since it came out.

Link to comment
Share on other sites

Not to jump the post, but I am experiencing this as well.

 

I have a premier account, and an AMD gpu. Prior to 4.X the GPU would do all of the transcoding, now only CPU. I do have a monitor connected to the gpu. DVAX2 is set for all transcoding types and set to use my Fury X.

 

I don't mind jumping on beta if that might help, and can supply logs upon request. Otherwise I am going to keep following to see if there is a solution.

 

Oh, and keep up the great work, Emby has been my choice for media serving since it came out.

 

 

Hi there, what exactly is happening? Can you please attach a hardware detect log as well as ffmpeg log example? Thanks !

Link to comment
Share on other sites

Howdy, My GPU is no longer doing any transcoding, neither encoding or decoding, which is the same thing as iinthesky73. While there may also be an issue with a particulat srt file in their instance, the fact that the GPU is being ignored is the issue.. It is now solely being handled by my CPU, which is kinda against the whole point of adding the GPU in to the box...

ffmpeg-transcode-915953b6-0aba-49bb-abf5-728406ad2d58_1.txt

hardware_detection-63683784309.txt

post-2502-0-52601000-1548254685_thumb.jpg

Edited by Nibble
Link to comment
Share on other sites

Howdy, My GPU is no longer doing any transcoding, neither encoding or decoding, which is the same thing as iinthesky73. While there may also be an issue with a particulat srt file in their instance, the fact that the GPU is being ignored is the issue.. It is now solely being handled by my CPU, which is kinda against the whole point of adding the GPU in to the box...

 

Can you also attach the emby server log? thanks.

Link to comment
Share on other sites

Here go, edited to remove Outside IP address

I also realize that on the Emby dashboard, HW decoding is set for the GPU, but encoding doesn't have anything specific. I would assume that something needs to be set there, but there doesn't seem to be an option for that.

 

Thanks for the assistance so far.

embyserver.txt

Link to comment
Share on other sites

iinthesky73

Howdy, My GPU is no longer doing any transcoding, neither encoding or decoding, which is the same thing as iinthesky73. While there may also be an issue with a particulat srt file in their instance, the fact that the GPU is being ignored is the issue.. It is now solely being handled by my CPU, which is kinda against the whole point of adding the GPU in to the box...

 

Hey @@Nibble --

 

Glad to see I'm not the only one having this problem. I noticed a new patch was release 4.0.1.0 but I see no change in the GPU issue. Hopefully we'll see this fixed soon. Just out of curiosity, what is the make and model of your GPU? Mine is an AMD Radeon Sapphire RX 570 Nitro+  

Link to comment
Share on other sites

Not to side track the thread but just to clarify a few things that come up over and over again. To help diagnose HW transcode issues:

 

* If running as a service (on windows), shut down Emby and start it as a normal user.

 

* Make sure you have a monitor attached if using Intel QuickSync or AMD Graphics.  Nvidia does not have this requirement but it doesn't hurt to plugin a monitor.

 

* Make sure you are sitting at the console and not using RDP to access the server. This is for diagnostic purposes and can be worked around with console login but KISS (keep it simple stupid) while diagnosing issues.

 

* If you have multiple GPUs like QuickSync and AMD make sure the monitor is plugged into the correct video card you are testing.

 

* Check your BIOS settings to see if you have the ability to select the output being used and select appropriately. Mention this in a post here in the forums as it could be important (if set wrong).

 

* If you just plugged in a monitor reboot the computer.

 

* If you have multiple GPUs available make sure the options you choose in HW Transcoding Advanced setup matches the correct GPU being used.

 

Doing those steps upfront will either fix your problem or greatly speed up diagnosing the issue!

Edited by cayars
Link to comment
Share on other sites

PenkethBoy

* If running as a service (on windows), shut down Plex and start it as a normal user.

 

​LOL - freudian slip?

  • Like 2
Link to comment
Share on other sites

Not to side track the thread but just to clarify a few things that come up over and over again. To help diagnose HW transcode issues:

 

* If running as a service (on windows), shut down Plex and start it as a normal user.

 

* Make sure you have a monitor attached if using Intel QuickSync or AMD Graphics.  Nvidia does not have this requirement but it doesn't hurt to plugin a monitor.

 

* Make sure you are sitting at the console and not using RDP to access the server. This is for diagnostic purposes and can be worked around with console login but KISS (keep it simple stupid) while diagnosing issues.

 

* If you have multiple GPUs like QuickSync and AMD make sure the monitor is plugged into the correct video card you are testing.

 

* Check your BIOS settings to see if you have the ability to select the output being used and select appropriately. Mention this in a post here in the forums as it could be important (if set wrong).

 

* If you just plugged in a monitor reboot the computer.

 

* If you have multiple GPUs available make sure the options you choose in HW Transcoding Advanced setup matches the correct GPU being used.

 

Doing those steps upfront will either fix your problem or greatly speed up diagnosing the issue!

 

A set of things to try first is always a great thing, I do approve a list like that being sticky'd for General troubleshooting and I mean no disrespect, but in the thread we, iinthesky73 and I, have confirmed most of the following;

 

1. We are running Emby, not Plex, and it is being run as a local user, :P

2. We have monitors attached to the GPU desired to be used for transcoding,

3. We are logged in directly, no RDP, or SSH or anything like that,

4. See 2.

5. My motherboard does not have onboard graphics, nor does my CPU have integrated graphics,

6. The three monitors I have connected to my system that Emby is running on are always connected, while iinthesky73 was running headless they have attached a monitor and rebooted, so that isn't it,

7. This is interesting, from screen shots that we both posted, the desired GPU was selected for DECODING, and it does look like it works for DECODING, but for ENCODING, there aren't any options to select. THAT looks like it may be the issue.

 

This isn't a show stopping issue, and I am still VERY happy with Emby, it's just that before 4.x my GPU can handle a transcode WHILE I was gaming on the same box, but now, if there is a transcode going on it will hiccup the game as it puts CPU to at least 80%

 

I imagine that I am one of the few that uses my PC as a Workstation / Gaming Rig / Emby server all rolled in to one, someday I will have a rack mounted, Xeon powered  , 12 bay Synology that is for Emby, but for now I have a rig that I have pieced together with a Ryzen 2 2700x, 32bg DDR 4, a Fury-X, a few SSDs for OS, Emby transcoding, Games etc, and 16x1tb in RAID 50 for Emby (Yes I have an external backup as RAID is never an excuse for a backup)

post-2502-0-79705300-1548797994_thumb.jpg

Edited by Nibble
Link to comment
Share on other sites

I am confident that the issue is being worked on. There are always going to be issues, but overall I feel that Emby is a superior media server than others I have tried.

Link to comment
Share on other sites

iinthesky73

Have you gone through our wiki to learn about user required setup for hardware acceleration?

 

https://github.com/MediaBrowser/Wiki/wiki/Hardware-Acceleration-Overview

 

i think we've tried everything.. it's not working as it should be working. In my initial posting I also mentioned that the prior version actually did utilize the GPU for encoding/transcoding as I was able to monitor the immediate jump in GPU power and memory frequency as soon as encoding begins. Now, nothing! Only the CPU takes its place and it cranks up to 100% -- i can only run 1 encoded stream before I see 100% pegged and slowdowns with another stream.. Obviously, this can't be the intent of the devs.

 

At this point I've seen numerous posts from various users experiencing the exact same problem with AMD GPUs (I'm not sure about nVidia). I would put some serious doubt on the possibility that we all have our systems misconfigured.

Link to comment
Share on other sites

@@iinthesky73

 

Sorry for responding late. I've reviewed your logs and the recent posts and I think the actual problem is a failure in hardware detection of the AMD GPU.

 

Could you please run the following from a command prompt (ffdetect.exe is located in the 'system' folder of the Emby installation)

ffdetect.exe -hide_banner -show_program_version -loglevel 99 -show_error -show_log 99 -print_format json amfenc

Thanks 

Link to comment
Share on other sites

BrettDioson

This is my output.  I'll try it out.

{
    "ProgramVersion": {
        "Version": "4.0.2-emby_2018_12_09-g5abbb1430d+238",
        "Copyright": "Copyright (c) 2018-2018 softworkz for Emby Llc",
        "Compiler": "gcc 8.2.1 (Rev1, Built by MSYS2 project) 20181207",
        "Configuration": " --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --disable-debug --enable-ffnvcodec --enable-nvdec --enable-gmp --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwavpack --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libaom --enable-version3 --enable-libzvbi --enable-gnutls --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv"
    },
    "Device": {
        "DeviceIndex": 0,
        "DeviceInfo": {
            "Description": "Radeon (TM) RX 480 Graphics",
            "DirectXType": "DX11_1",
            "DeviceId": 26591,
            "VendorId": 4098,
            "SubSysId": 873796706,
            "AdapterLuidHigh": 0,
            "AdapterLuidLow": 80507
        },
        "Encoders": [
            {
                "CodecName": "h264",
                "CodecComponentId": "AMFVideoEncoderVCE_AVC",
                "AccelerationType": "AMF_ACCEL_HARDWARE",
                "AccelerationTypeInt": 0,
                "MaxProfile": 100,
                "MaxLevel": 52,
                "MaxNumOfStreams": 16,
                "MaxBitRate": 100000000,
                "MaxTemporalLayers": 1,
                "MaxInstanceCount": 1,
                "Input_MinWidth": 64,
                "Input_MaxWidth": 4096,
                "Input_MinHeight": 64,
                "Input_MaxHeight": 2160,
                "Input_WidthAlignment": 1,
                "Input_HeightAlignment": 32,
                "Input_SupportsInterlaced": 0,
                "MinWidth": 64,
                "MaxWidth": 4096,
                "MinHeight": 64,
                "MaxHeight": 2160,
                "WidthAlignment": 1,
                "HeightAlignment": 32,
                "SupportsInterlaced": 0
            },
            {
                "CodecName": "hevc",
                "CodecComponentId": "AMFVideoEncoder_HEVC",
                "AccelerationType": "AMF_ACCEL_HARDWARE",
                "AccelerationTypeInt": 0,
                "MaxProfile": 1,
                "MaxLevel": 186,
                "MaxNumOfStreams": 16,
                "MaxBitRate": 2147483647,
                "MaxTier": 1,
                "MaxInstanceCount": 1,
                "Input_MinWidth": 192,
                "Input_MaxWidth": 4096,
                "Input_MinHeight": 128,
                "Input_MaxHeight": 2176,
                "Input_WidthAlignment": 1,
                "Input_HeightAlignment": 32,
                "Input_SupportsInterlaced": 0,
                "MinWidth": 192,
                "MaxWidth": 4096,
                "MinHeight": 128,
                "MaxHeight": 2176,
                "WidthAlignment": 1,
                "HeightAlignment": 32,
                "SupportsInterlaced": 0
            }
        ]
    }
Link to comment
Share on other sites

BrettDioson

well on mine I have preferred hardware decoders listed in the transcode page on Emby but no encoders so I assumed it's not using the RX480 to encode.

 

Seeing this in the log I assume it's using software to transcode:

>>>>>>  FindVideoDecoder - MediaType: hevc, Mode: 2
Info    FindVideoDecoder - Checking: 'DXVA2 Radeon (TM) RX 480 Graphics - H.265 (HEVC)' (Priority: 100)
Info    FindVideoDecoder - Check successful - selecting 'DXVA2 Radeon (TM) RX 480 Graphics - H.265 (HEVC)'

>>>>>>  FindVideoEncoder - Media: h264, UseHardwareCodecs: True, Mode: 2
Info    FindVideoEncoder - Checking: 'libx264 Software Encoder' (Priority: 0)
Info    Encoder supports input stream
Info    FindVideoEncoder - Check successful - selecting 'libx264 Software Encoder'

>>>>>>  FindVideoDecoder - MediaType: hevc, Mode: 2
Info    FindVideoDecoder - Checking: 'DXVA2 Radeon (TM) RX 480 Graphics - H.265 (HEVC)' (Priority: 100)
Info    FindVideoDecoder - Check successful - selecting 'DXVA2 Radeon (TM) RX 480 Graphics - H.265 (HEVC)'

>>>>>>  FindVideoEncoder - Media: h264, UseHardwareCodecs: True, Mode: 2
Info    FindVideoEncoder - Checking: 'libx264 Software Encoder' (Priority: 0)
Info    Encoder supports input stream
Info    FindVideoEncoder - Check successful - selecting 'libx264 Software Encoder'

I currently don't have a monitor plugged into the card but I have a dongle on order for Monday.

 

 

Emby Transcode Log.txt

Link to comment
Share on other sites

The manual AMF detection seems to work, so we'd need to look at what Emby sees.

 

Could you please post your hardware detection log?

Link to comment
Share on other sites

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...