pabloromeo / clusterplex

ClusterPlex is an extended version of Plex, which supports distributed Workers across a cluster to handle transcoding requests.
MIT License
452 stars 35 forks source link

Transcoding help for Synology DS418+ worker #267

Closed paytah232 closed 9 months ago

paytah232 commented 10 months ago

Hi, I'm having some trouble trying to access the Intel Quick Sync functionality from a Synology NAS with a worker deployed. I believe all the configuration is correct, as if I remove FFMPEG_HWACCEL, the transcoding works, but obviously, isn't hw transcoding. When I enable it, I get the following issue:

plex_worker | **** Changing ownership for /codecs **** plex_worker | **** Server is unclaimed, but no claim token has been set **** plex_worker | **** permissions for /dev/dri/renderD128 are good **** plex_worker | **** The device /dev/dri/card0 does not have group read/write permissions, attempting to fix inside the container. **** plex_worker | Docker is used for versioning skip update check plex_worker | [custom-init] No custom files found, skipping... plex_worker | Starting Plex Media Server. . . (you can ignore the libusb_init error) plex_worker | no crontab for abc plex_worker | no crontab for root plex_worker | CLUSTERPLEX_PLEX_VERSION => '1.32.7.7621-871adbd44' plex_worker | CLUSTERPLEX_PLEX_CODECS_VERSION => 'a31c019-4614' plex_worker | CLUSTERPLEX_PLEX_EAE_VERSION (extracted) => 'eae-69c1de6-42' plex_worker | PLEX_ARCH => 'amd64' plex_worker | EAE_VERSION => '1983' plex_worker | CLUSTERPLEX_PLEX_CODEC_ARCH => linux-x86_64-standard plex_worker | Codec location => /codecs/a31c019-4614-linux-x86_64-standard plex_worker | Found EAE_VERSION.txt => 1983 plex_worker | EAE is up to date

and then eventually:

plex_worker | [Parsed_scale_0 @ 0x7f3bd122b640] w:1920 h:818 flags:'' interl:0 plex_worker | [AVHWDeviceContext @ 0x7f3bcc7f79c0] Trying to use DRM render node for device 0. plex_worker | [AVHWDeviceContext @ 0x7f3bcc7f79c0] libva: VA-API version 1.18.0 plex_worker | [AVHWDeviceContext @ 0x7f3bcc7f79c0] libva: Trying to open /config/Library/Appli cation Support/Plex Media Server/Cache/va-dri-linux-x86_64/iHD_drv_video.so plex_worker | [AVHWDeviceContext @ 0x7f3bcc7f79c0] libva: va_openDriver() returns -1 plex_worker | [AVHWDeviceContext @ 0x7f3bcc7f79c0] libva: Trying to open /config/Library/Appli cation Support/Plex Media Server/Cache/va-dri-linux-x86_64/i965_drv_video.so plex_worker | [AVHWDeviceContext @ 0x7f3bcc7f79c0] libva: va_openDriver() returns -1 plex_worker | [AVHWDeviceContext @ 0x7f3bcc7f79c0] Failed to initialise VAAPI connection: -1 ( unknown libva error). plex_worker | Device creation failed: -5. plex_worker | [h264 @ 0x7f3bcfbd9b00] No device available for decoder: device type vaapi neede d for codec h264. plex_worker | Stream mapping: plex_worker | Stream #0:0 (h264) -> scale:default (graph 0) plex_worker | Stream #0:1 (dca) -> aresample:default (graph 1) plex_worker | format:default (graph 0) -> Stream #0:0 (libx264) plex_worker | aresample:default (graph 1) -> Stream #0:1 (aac) plex_worker | Stream #0:2 -> #1:0 (subrip (native) -> ass (native)) plex_worker | Device setup failed for decoder on input stream #0:0 : I/O error plex_worker | [AVIOContext @ 0x7f3bd0a72340] Statistics: 258447 bytes read, 5 seeks plex_worker | Completed transcode plex_worker | Removing process from taskMap

I followed some checks in another post https://github.com/linuxserver/docker-plex/issues/359, so maybe that is an issue as my card0 device is user:group root:root. I tried manually changing the group, but it didn't work. I am also just assuming that the worker is trying to use card0, which is why it fails to initialise, but I don't know for sure.

Any thoughts or suggestions?

github-actions[bot] commented 9 months ago

This issue is stale because it has been open for 30 days with no activity.

paytah232 commented 9 months ago

I thought I'd jump back on here, as it took me a hot minute to find some help and get it done. I think, mostly, it just stems from making sure your orchestrator and workers have the same PUID and PGID. Otherwise, everything seems to break. But I can confirm, everything is now working on Synology NAS.

For anyone who gets stuck with the same, here are my orchestrator/worker files for the Synology NAS pair: Plex Cluster on Synology.zip Note: Replace 192.168.0.2 with your orchestrator local IP, and the PUID and PGID per your user.

I do occassionally have trouble with port 1900 in the orchestrator, in which case, I just comment out that line (or change the external port to 1901), it's for DLNA, which I don't use anyway. This blog post may help though.