PMS HW Transcoding on QNAP TVS-472XT

Server Version#: 1.20.1.3252
Player Version#: 4.34.4

I have a QNAP TVS-472XT. I have a Plex pass and I’m trying to use HW transcoding to transcode a 4k file to 1080p for the kids tv.

I’ve tried the following, with the stock Pentium Gold CPU, I purchased an MSI GTX 1050 TI which is on the list of approved add-in video cards. I couldn’t get the QNAP to utilize the NVIDIA GPU. I even submitted a ticket with QNAP and they were unable to resolve my issue.

I purchased a Core i5-9500T and swapped the CPUs. I see CPU utilization at 25% when I’m transcoding a stream (i’m testing on Chrome web browser) but it keeps pausing.

Using Tuatulli it shows that PMS is using HW Transcoding, but keeps pausing/buffering the streaming. The test computer is on ethernet and on the same hub as the QNAP to eliminate network bandwidth issues.

Where else can I start to troubleshoot the transcoding issues?

Additional info. I’m able to transcode from 4k down to 1080p or 720p by disabling HW transcoding. It shoots CPU utilization up to 80% but it does appear to have no issues with maintaining transcoding speed. If I enable HW transcoding, it struggles to keep up. Where should I start looking to find a solution to my HW transcoding problems?

May I see a DEBUG (not VERBOSE) logfile ZIP set which captures this happening?

first, I see the decision: Foreign Language film, subtitles selected.

Sep 27, 2020 10:39:18.040 [0x7f454fa23700] DEBUG - Downloading document http://127.0.0.1:32400/library/metadata/41150?checkFiles=1&includeBandwidths=1&offset=-1&X-Plex-Incomplete-Segments=1&X-Plex-Session-Identifier=6icbd8emrgwou5iqjxt6srz0
Sep 27, 2020 10:39:18.044 [0x7f454fa23700] DEBUG - We're going to try to auto-select a subtitle.
Sep 27, 2020 10:39:18.044 [0x7f454fa23700] DEBUG - Subtitles: Found a candidate subtitle language [eng] for a foreign film
---> Sep 27, 2020 10:39:18.044 [0x7f454fa23700] DEBUG - Audio Stream: 220589, Subtitle Stream: 220590
Sep 27, 2020 10:39:18.044 [0x7f454fa23700] DEBUG - Found session GUID of pghsywvb786xc2eaz5dlj5c1 in session start.
Sep 27, 2020 10:39:18.045 [0x7f454fa23700] DEBUG - Cleaning directory for session pghsywvb786xc2eaz5dlj5c1 ()
Sep 27, 2020 10:39:18.045 [0x7f454fa23700] DEBUG - Starting a transcode session pghsywvb786xc2eaz5dlj5c1 at offset -1.0 (state=3)
Sep 27, 2020 10:39:18.045 [0x7f454fa23700] DEBUG - TPU: hardware transcoding: using hardware decode accelerator vaapi
Sep 27, 2020 10:39:18.045 [0x7f454fa23700] DEBUG - TPU: hardware transcoding: zero-copy support present
----> Sep 27, 2020 10:39:18.045 [0x7f454fa23700] DEBUG - TPU: hardware transcoding: not using zero-copy because subtitle burning is required
Sep 27, 2020 10:39:18.045 [0x7f454fa23700] DEBUG - [Universal] Using local file path instead of URL: /share/NFSv=4/SharedData/Video/4k/Kids Movies/Spies in Disguise 2019.mkv
Sep 27, 2020 10:39:18.045 [0x7f454fa23700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Sep 27, 2020 10:39:18.046 [0x7f454fa23700] DEBUG - [FFMPEG] - Format 0x41524742 -> bgra.
Sep 27, 2020 10:39:18.046 [0x7f454fa23700] DEBUG - [FFMPEG] - Format 0x42475241 -> argb.

What else is happening on the machine when this is occurring. It’s behaving as if there are insufficient CPU resources (cores to burn subtitles)

The QNAP sits at nearly 0% CPU all day. This movie does have some forced subtitles due to parts of the movie that is not in English.
Interestingly the QNAP is able to transcode the movie without buffering if it’s transcoding purely in CPU mode. When I enable HW transcoding that’s when it struggles to keep up. I couldn’t get it to work with the Nvidia 1050 either (QTS was enabled) which is why I returned the video card and bought the i5.

Please detail the CPU exchange / customization you performed on the NAS.

I suspect your choice of CPU here is headed to the root problem.

(help me understand the migration of CPUs? Did you change that which was in the NAS?)

The QNAP came with a Pentium G5400T cpu. HW transcoding with this cpu couldn’t keep up for 4k.

I added an NVIDIA GTX 1050 when I had the Pentium G5400T cpu. I couldn’t get the HW transcoding to work with the NVIDIA card so I returned it.

I purchased the Core i5-9500T processor based on recommendations from other Plex users.

Transcoding works perfectly with HW transcoding disabled, but since it seems to use 70-80 CPU i’d be limited to 1 stream

With HW transcoding enabled, cpu utilization is around 24-26% but the transcoding can’t keep up.
I was under the impression that the UHD630 onboard GPU was better than the Nvidia GPU for transcoding anyways.

Thanks.

It seems you got some mixed and confusing suggestions there.

  1. The “630” series QSV ASIC (in all 8000 & 9000 CPUs) is a powerhouse. I’ve hit it with 6x 250 MB/sec 2160p HEVC -> 1080p H.264 and it is fine.

  2. The 1050 is the lowest end card which can peform hardware transcoding.
    https://developer.nvidia.com/video-encode-decode-gpu-support-matrix

  3. Independent of the two above
    a. Audio is always performed by the CPU
    b. While you might get the hardware decoding assist when using subtitles ----
    c. Final subtitle burning is always performed by the CPU (Intel never provided a library API for that)

Theoretically, the -9xxx CPUs are better.

Personally, I’ve seen more trouble with them in Linux than they’re worth.

  1. The Intel iHD_drv_video (their new, required, driver for the -9xxx) is flawed
    a. - doesn’t support all the Intel CPU chips that it should.
  2. It’s new software and just not as stable / ‘kinks worked out’ as the i965.
    a. - problems like what you describe here.
  3. It might be possible to customize your config but is 100% CPU dependent.

In the video you showed me.

  1. HW transcoding
  2. Converting audio
  3. Burning subtitles

A load of 24-26% is about right for the CPU.

“Video keeping up” needs to be clarified and objectified. “Keep up” is too subjective and vague.

How do you define that?

The Core i5-9500T works great for software transcoding (transcoding speed stays above 1.0), but does use approximately 70-80% cpu.

When I enable HW transcoding, it uses 24-26% cpu, but the transcoding speed hovers around 0.7 (according to Tautulli) which I’m assuming is what contributes to the the video constantly pausing.

I’m more than happy to get my hands dirty in configuring the QNAP or PMS, I’m just lost as to where to begin with *nix.

The 9500T doesnt work properly with the 472XT. The kernel doesnt support your chip fully, and while it will detect it, it will not support the igpu (uhd 630). The best 35w TDP chip this NAS supports right now, while also supporting its igpu, is the 8700T. If you decide to stick with your current cpu, you will need a nvidia card in order to enable hw transcoding.

There are several threads regarding this topic in qnaps own forum. Here is one:

I’ve not tried this but it might work. (a ESWAG … emphasis on ‘educated’ haha)

add VaapiDriver="i965" to your Preferences.xml.

One of two things will happen.

  1. It will work because that i5 does have an i965 in it still
  2. It will fail because it doesn’t have one.

It will redirect the transcoder to use the i965 driver instead of the Intel Media Driver (iHD)

EDIT: amendment after the simul-post, The -8xxx CPU does have an i965 in it but if that kernel doesn’t support the -9xxx then absolutely get it out of there.

Thanks @ChuckPa, I added it to my Preferences.xml, restarted the service, and now Tautulli shows my transcoding speed between .9 - 1.2. It appears to keep up with the video now. Thanks so much for all your help, the kids will be stoked!

The -9xxx CPU should be removed in favor of one which is properly supported by that Linux kernel. (it’s only a 3.10 kernel)

This is a stop-gap measure.

Thanks so much! You are an amazing resource on the forum!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.