Jump to content

Hardware decoding not working on TS-464


markand

Recommended Posts

I've been running Emby on my QNAP TVS-872XT for the past 3 years and it's been great. Unfortunately it died and I just replaced it with a TS-464, which got great reviews. I have it with 16GB of Memory taken from the old unit. 

After migrating the drives over and re-installing Emby I began doing some tests. Playing a single video in my browser causes server CPU to be about 97%. Hardware acceleration is on. Note the Emby process is using 88% CPU

.image.png.cc320de3507e45211ddfd5ebd608d54a.png

 

I also have Plex set up to point to the same libraries and playing the same video yields CPU utilization of 12%. Note Plex is using 0.14% even while playing back.

image.png.67a9a3da4c47416db24401f3e78a45c2.png

Any idea what's wrong? Emby used to use barely any CPU on the old config.

image.png

image.png

Link to comment
Share on other sites

GrimReaper

Not familiar with QNAPs, but could you post hardware detection log and ffmpeg log for that high-CPU playback, as I suspect subtitles?

Link to comment
Share on other sites

One update of good news. For some reason, I thought to try playing back the video using my iPhone. Then the CPU usage is even less that Plex! I also played from my Android TV and the CPU usage was also low.  So it seems like playing in Safari doesn't use hardware acceleration but on the devices it works. I'm not sure how it worked with the old NAS as I never use the browser, but did for this test. Note: Emby server CPU isn't visible but is around 0.13%.

image.png.0307f29d1768659e6fede16091f50450.png

 

Link to comment
Share on other sites

GrimReaper
5 minutes ago, markand said:

So it seems like playing in Safari doesn't use hardware acceleration but on the devices it works.

Without logs noone can tell you exactly is transcoding being hardware accelerated or not, as those items might just have been DirectPlayed in which case it means nothing in respect to your original query.

Edited by GrimReaper
Typo
  • Agree 1
Link to comment
Share on other sites

Happy2Play
7 minutes ago, markand said:

Attached are the logs after a reboot. Interestingly, I do not see any ffmpeg logs being produced when playing from my phone or TV. 

MarkAnd_Emby_Logs_1_28_2023.zip 116.44 kB · 1 download

That suggest direct play.

As for Safari

&TranscodeReasons=ContainerNotSupported,DirectPlayError

Hard to say why there was a direct play error though.

Do you have Emby Premiere?

What is your Transcode setting as it appears HWA is disabled?  But do not know this device.

>>>>>>  FindVideoEncoder - MediaType: h264, UseHardwareCodecs: True, HWA-Mode: Disabled
Info    Checking: 'x264 Software Encoder'
Info    Check successful - selecting 'x264 Software Encoder'

>>>>>>  FindVideoDecoder - MediaType: hevc, UseHardwareCodecs: True, HWA-Mode: Disabled
Info    Checking: 'Automatic software decoder'
Info    Check successful - selecting 'Automatic software decoder'

 

  • Agree 1
Link to comment
Share on other sites

GrimReaper
13 minutes ago, markand said:

Interestingly, I do not see any ffmpeg logs being produced when playing from my phone or TV. 

Because those items are DirectPlaying.

Do you have HA disabled in your Settings>Transcoding?

>>>>>>  FindVideoEncoder - MediaType: h264, UseHardwareCodecs: True, HWA-Mode: Disabled
>>>>>>  FindVideoDecoder - MediaType: hevc, UseHardwareCodecs: True, HWA-Mode: Disabled

As your UHD graphics is visible to the system:

"VideoDecoders":{"1: VAAPI JasperLake UHD Graphics - MPEG-2":{"IsEnabledByDefault":true,"DefaultPriority":60,"VaapiCodecInfo":{"Name":"VAAPI JasperLake UHD Graphics - MPEG-2","Description":"Adapter #0: 'JasperLake UHD Graphics' Id:20065 (Driver: Intel iHD driver for Intel(R) Gen Graphics - 21.2.2 (27b773b2), Vendor: Intel Corporation)","DeviceInfo":{"IsActive":true,"HardwareContextFramework":"VaApi","Capabilities":{"SupportsHwUpload":true,"SupportsHwDownload":true,"SupportsStandaloneDeviceInit":true,"Supports10BitProcessing":true,"SupportsNativeToneMapping":true}

 

Edited by GrimReaper
Cross-posted.
  • Like 1
Link to comment
Share on other sites

Ok, sorry for the one error that might have caused confusion. HWA was OFF on the run that I sent. It was initially on, so I was toggling it. I've toggled a few times and now have a run where the following is set:

 
>>>>> FindVideoEncoder - MediaType: h264, UseHardwareCodecs: True, HWA-Mode: Automatic
Info Checking: 'QuickSync JasperLake UHD Graphics - H.264 (AVC)'
Info Check successful - selecting 'QuickSync JasperLake UHD Graphics - H.264 (AVC)'

>>>>>> FindVideoDecoder - MediaType: hevc, UseHardwareCodecs: True, HWA-Mode: Automatic
Info Checking: 'VAAPI JasperLake UHD Graphics - H.265 (HEVC)'
Info Check successful - selecting 'VAAPI JasperLake UHD Graphics - H.265 (HEVC)'
 
 
 

Sorry for the confusion! However, I'm still getting the same high CPU usage. Attached is a new log file. Btw, subtitles are OFF.

Oh, and THANK YOU all for your help!

ffmpeg-transcode-14133008-9c31-4b36-9ec8-01f50c5854cb_1.txt

Edited by markand
Link to comment
Share on other sites

GrimReaper

Your QSV HWA is failing:

09:58:48.429 Stream mapping:
09:58:48.429   Stream #0:0 (hevc) -> hwmap:default (graph 0)
09:58:48.429   vpp_qsv:default (graph 0) -> Stream #0:0 (h264_qsv)
09:58:48.429   Stream #0:1 -> #0:1 (opus (native) -> mp3 (libmp3lame))
09:58:48.429 Press [q] to stop, [?] for help
09:58:48.462 [vpp_qsv@f2 @ 0x7f8cf86ef7c0] Failed to create a qsvvpp: invalid video parameters (-15)
09:58:48.462 [vpp_qsv@f2 @ 0x7f8cf86ef7c0] Failed to configure output pad on vpp_qsv@f2
*** Error in `/share/CACHEDEV1_DATA/.qpkg/EmbyServer/bin/ffmpeg': munmap_chunk(): invalid pointer: 0x00007f8cf870dd40 ***

so it's falling back to software:

Info    Previous transcoding attempt failed. Falling back to software transcoding.

>>>>>>  FindVideoEncoder - MediaType: h264, UseHardwareCodecs: False, HWA-Mode: Automatic
Info    Checking: 'x264 Software Encoder'
Info    Check successful - selecting 'x264 Software Encoder'

>>>>>>  FindVideoDecoder - MediaType: hevc, UseHardwareCodecs: False, HWA-Mode: Automatic
Info    Checking: 'Automatic software decoder'
Info    Check successful - selecting 'Automatic software decoder'

>>>>>>  Processing Plan
        Name                                        CanDoInHW  WillDoInHW  Reason                                                 
        Automatic software decoder               >> False      False       Software Codec                                          
        VideoInput                               >> False      False       Not a hardware decoder                                  
        ColorConversion                          >> False      False                                                               
        VideoOutput                              >> False      False       Not a hardware encoder                                  
        x264 Software Encoder                    >> False      False       Software Codec                                          

>>>>>>  Video Processing Steps for [0:0]: H.265 (HEVC)
        Step                    HW-Context   Format       SW-Format           Size   Next
        HEVC                 >> -            yuv420p10    yuv420p10       1280x960 >> format
        format               >> -            yuv420p      yuv420p         1280x960 >> 

resulting in high CPU usage. 

@softworkz

Link to comment
Share on other sites

So is that something for Luke & Co to look into? Or something I need to do? Or could it be related to QNAP issue?

Thanks for tracking that down!

Mark

Link to comment
Share on other sites

GrimReaper

I'd wait for Softworkz to comment. In the meantime, you can try setting VAAPI for AVC Encoder under Settings>Transcoding>Advanced and see how does that compare. 

Link to comment
Share on other sites

Interesting. So I went to Transcoding->Advanced and VAAPI was checked for the H.264 (AVC) section. However, for Preferred Hardware Encoders, there was only the QuickSync listed and it was checked. When I unchecked it, the CPU usage was a bit lower - like 72% instead of 95%, but that is an improvement. Here are the settings. Note: Not sure whey QS is off for MPG-2.

 

image.thumb.png.6aae2f96634872b281e50e38991e0d85.png

Link to comment
Share on other sites

There will be QuickSync improvements in the upcoming 4.8 server release that should help with this.

Link to comment
Share on other sites

Super! As I said, it doesn't really affect me much as it's only happening in the browser and that's not how I typically watch. I was just testing out the new NAS and wanted to make sure it was ok.

  • Thanks 1
Link to comment
Share on other sites

  • 4 weeks later...
4 hours ago, markand said:

Happy to try. If I run into problems with 4.8, can I go back to the previous version?

Unfortunately no, that's not safe. If you want to roll back then it needs to be a fresh install. Sorry, I know that might make it difficult to jump in, which I understand.

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