QNAP TS-853BU, plex server in container and HW Acceleration

Server Version#: latest
Player Version#: latest

Hello, I have tried both the official plex qpkg as well as plex-server in a container (linuxserver/plex:latest). HW acceleration seems to be working with the qpkg, but not in the container.

I would like to get plex-server with hw acceleration working in a container as it provides better & clearer storage controls.

TS-863BU is: Intel® Celeron® J3455, so it has quicksync (and of course this is working in the qpkg).

I tried using the driver setting to map:
/dev/dri/renderD128:/dev/dri/renderD128
/dev/dri/card0:/dev/dri/card0

However, I’m getting these errors (may or may not be related) - logs (below)

Any help appreciated.

==
Mar 04, 2019 03:10:38.412 [0x7f7667fff700] ERROR - [FFMPEG] - Cannot load libcuda.so.1
Mar 04, 2019 03:10:38.412 [0x7f7667fff700] VERBOSE - [FFMPEG] - Nvenc unloaded
Mar 04, 2019 03:10:38.412 [0x7f7667fff700] WARN - avcodec_open2 returned -1313558101 for encoder ‘h264_nvenc’
Mar 04, 2019 03:10:38.412 [0x7f7667fff700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Mar 04, 2019 03:10:38.447 [0x7f7667fff700] VERBOSE - [FFMPEG] - Opened VA display via DRM device /dev/dri/renderD128.
Mar 04, 2019 03:10:38.459 [0x7f7667fff700] VERBOSE - [FFMPEG] - libva: VA-API version 1.1.0
Mar 04, 2019 03:10:38.459 [0x7f7667fff700] VERBOSE - [FFMPEG] - libva: va_getDriverName() returns 0
Mar 04, 2019 03:10:38.741 [0x7f7667fff700] VERBOSE - [FFMPEG] - libva: Trying to open /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so
Mar 04, 2019 03:10:39.589 [0x7f76ca7fc700] VERBOSE - WebSocket: processed 1 frame(s)
Mar 04, 2019 03:10:39.903 [0x7f7667fff700] VERBOSE - [FFMPEG] - libva: Found init function __vaDriverInit_1_1
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] VERBOSE - [FFMPEG] - libva: va_openDriver() returns 0
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] VERBOSE - [FFMPEG] - Initialised VAAPI connection: version 1.1
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] DEBUG - [FFMPEG] - Format 0x32315659 -> yuv420p.
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] DEBUG - [FFMPEG] - Format 0x30323449 -> yuv420p.
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] DEBUG - [FFMPEG] - Format 0x3231564e -> nv12.
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] DEBUG - [FFMPEG] - Format 0x32595559 -> yuyv422.
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] DEBUG - [FFMPEG] - Format 0x59565955 -> uyvy422.
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] DEBUG - [FFMPEG] - Format 0x48323234 -> yuv422p.
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] DEBUG - [FFMPEG] - Format 0x58424752 -> rgb0.
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] DEBUG - [FFMPEG] - Format 0x58524742 -> bgr0.
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] DEBUG - [FFMPEG] - Format 0x30313050 -> p010le.
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] VERBOSE - [FFMPEG] - Matched “Intel i965 driver for Intel® Broxton - 2.1.0” as known driver “Intel i965 (Quick Sync)”.
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] DEBUG - [FFMPEG] - Created surface 0x4000000.
Mar 04, 2019 03:10:39.904 [0x7f7667fff700] DEBUG - [FFMPEG] - Direct mapping possible.
Mar 04, 2019 03:10:39.905 [0x7f7667fff700] DEBUG - Scaled up video bitrate to 44301Kbps based on 1.500000x fudge factor.
Mar 04, 2019 03:10:39.991 [0x7f7667fff700] DEBUG - MDE: Selected protocol hls; container: mpegts
Mar 04, 2019 03:10:39.991 [0x7f7667fff700] DEBUG - MDE: analyzing media item 104
Mar 04, 2019 03:10:39.992 [0x7f7667fff700] DEBUG - Codecs: testing h264_nvenc (encoder)
Mar 04, 2019 03:10:39.992 [0x7f7667fff700] ERROR - [FFMPEG] - Cannot load libcuda.so.1
Mar 04, 2019 03:10:39.992 [0x7f7667fff700] VERBOSE - [FFMPEG] - Nvenc unloaded
Mar 04, 2019 03:10:39.992 [0x7f7667fff700] WARN - avcodec_open2 returned -1313558101 for encoder ‘h264_nvenc’

I don’t support the nVidia in containers on QNAP.
The QNAP drivers are intended to work only with the natively installed app.

Is there a reason you want it in a container?

Hi Chuck,

The ‘why container’ vs ‘native qpkg’:

  • container data is more portable. I couldn’t find a way to configure the qpkg file to store metadata/library in a particular directory.

  • container allows for easier updating to latest.

less important ones:

  • clear demark of what storage areas are being used by plex (goes back to larger portability)

If you look at the “api’s” supported for in the debug logs, they are either Nvidia, or Libvaa.

IF you have a beefier/newer NAS in the TS-x77 family for example, then there maybe a way to have GPU passthrough from an NVidia card work. Again could it work, maybe, would Plex/QNAP likely be able to support it… very limited at best.

With a couple basic linux commands, the library/metadata can be easily stored in a shared folder.

Updating version to the latest is basically download qpkg, click manual install and point to downloaded qpkg.

I don’t see anything onerous about either.

Thanks Mwc,

  1. I did a few searches, and was only able to find a way to backup/restore to a fixed place… are you thinking of softlinks? My worry there would be when/if qnap randomly decides to change how app stores are organized behind the scenes. My hope was that there was a way to configure the qpkg explicitly to use a particular folder for config (like in the container case, and regular install cases). Please share!

  2. Given that there is an entire feature in plex related to self-update. I suspect other’s pain points might differ.

Containers should be more portable.

It’s my experience that QNAP’s containers, both inbound and outbound lack that robustness.

I have a Linux desktop and a Synology NAS. I am not able to transfer containers to either.
The only thing I have been able to successfully import into QNAP is an OVA VM.

Storage areas used by Plex are currently in the QPKG directory. I am working right now on changing that. When complete, you will be able to make a ZIP file of your data and take it anywhere you want. How’s that for maximum portability ?

Chuck: love it!

  1. does UI for export to zip, imply import function also?
  2. Wouldn’t the zip be huge? (ie http download would just be annoying-- but it would be universal)

What I am :crossed_fingers: hoping to achieve:

  1. Create a PlexData share which, by default, is on the same volume you install Plex on.
  2. By being a visible share, you have access to it in FileStation.
  3. You will see the “Library” directory at the top. Under it you see “Plex Media Server”. Between these two, you can pick the starting point and grab from that point down.
  4. Should you wish to move the share, just move it and update the share definition to point to it.
  5. This is idependent of QNAP “Migrate”. I can’t help that. QNAP “migrate to” still leaves everyone vulnerable to data loss should they uninstall by accident. What I am doing prevents that.
  6. Should PMS fail to start, manual log retrieval (a ZIP of the Logs directory) is all that’s needed.

Chuck,

Both Nvida and Qnap are certainly passing access to coda cores through to containers. I think you recommendation in not using a container is ludicrous. I’ve been using a containerised version of plex for about 2 years now. There are loads of benefits to this model and it’s the way modern software has worked for at least a year now. Asking us to revert to really lame QPKG installs is definitely a step backward.

I am following what QNAP has requested and instructed.
My responsibility is to propose what works for everyone, however ludicrous someone might think it is.

If you want to do it another way, by all means help yourself.

Should it not work, it is of course your responsibility.

Hi Chuck-- any updates on the above PlexData share?

It is on my To Do list.

Right now I’m finishing new installers for Linux (Debian & Redhat).

The new installer is sufficiently intelligent enough that it works on both system types.
The only requirements will be a) compatible package manager, b) glibc minimum version and c) the OS version hasn’t been EOL’d / discontinued by the vendor.

After that is QNAP, which is a lot easier to work with plus will have some of this installer’s core in it.

It’s sad that we have to use .qpkg to get compatibility :frowning: My experience with those that think native apps are better than containers or those that think VM’s are better the containers, is that they haven’t tried containers yet (not all but a vast majority). Native and VM’s have their place but not for these kinds of apps. That being said, QNAP haven’t implemented a vanila docker instance and may require some QNAP magic to make it work which defeats the purpose of containers!

That’s your opinion and you’re entitled to it.

  1. Docker requires manual passthrough of devices from /dev to use hardware transcoding because the VFS in the container has no contextual reference to the real host unless manually specified (like when defining -v volume references)
  2. None of the docker implementations I’ve used to date are portable to each other. That includes Redhat/Fedora, Ubuntu, Synology, or QNAP.
  3. I will give Synology credit for having the best, by far, management UI. It is, simply put, stellar.
  4. Docker isn’t for everyone, please accept this. They are content with the default and simplest to maintian for their use case. Not everyone likes to make things complicated just because they can regardless whether they’ll ever actually move the app in question to another host or not.
  5. The magic happens because someone like myself has looked at the need (counted the requests), determined where the need is greatest, then wrote that magic.
  6. Lastly, to put HW acceleration into a Docker and having it work auto-magically requires, by definition, it be capable of operating in ALL possible environments. This is an unrealistic expectation.

I have to admit, after using docker, that I would never ever go back to native apps again as it no longer made sense. However, then I put an nvidia P2000 in my nas and then found out why it breaks once you want to access hardware directly. I may not agree with all your comments but you do make a good point.

@Nader_1

May I ask which points we differ on? I am always wanting to learn. If I’m mistaken on any points, please help me learn by explaining? The more I learn, the better an engineer I am.

Thanks

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