Plex HW Transcoding in TOS 5.1

Discussion on Plex media server and clients
User avatar
outkastm
Posts: 1193
Joined: 29 Dec 2020, 23:52

Re: Plex HW Transcoding in TOS 5.1

Post by outkastm »

I will step in for this.
When someone say that harware transcoding is not working on TOS5, it should also specify the NAS model as we have different situations now.

- For the new models with JasperLake CPU N5095/N4505 (Fx-x23, Tx-x23), hardware transcoding is broken in TOS 5.1 and TM have to fix it probably with a new kernel.
- For the older models, hardware transcoding is broken due to a missing parameter in Plex startup script (to be fixed by plex)

This can also be fixed by users with SSH knowledge, the issue is that the plex user is not added to the video group which have access to video card.
Is a one time change.
In order to fix it, connect with SSH and:

- check if the user plex is already part of the video group

Code: Select all

id "plex" | grep "(video)"
If you don't get a return message, run the command to add the plex user to video group

Code: Select all

usermod -aG video "plex"


Check again if the change was done

Code: Select all

id "plex" | grep "(video)"
An you should get the message below, the group is iportant

Code: Select all

uid=1009(plex) gid=6(media) groups=6(media),28(video)
Restart plex and hardware transcoding should work

Code: Select all

Apr 12, 2023 20:04:59.436 [0x7efd6c042b38] INFO - Plex Media Server v1.31.2.6783-9209b39b4 - TerraMaster TNAS F2-221 x86_64 - build: linux-x86_64 terramaster-tos5 - GMT 08:00
Apr 12, 2023 20:04:59.437 [0x7efd6c042b38] INFO - Linux version: TOS 5.1.31-00348, language: en-US
Apr 12, 2023 20:04:59.437 [0x7efd6c042b38] INFO - Processor: 2-core Intel(R) Celeron(R) CPU J3355 @ 2.00GHz
Apr 12, 2023 20:05:59.567 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] TPU: hardware transcoding: using hardware decode accelerator vaapi
Apr 12, 2023 20:05:59.567 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] TPU: hardware transcoding: zero-copy support present
Apr 12, 2023 20:05:59.567 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] TPU: hardware transcoding: using zero-copy transcoding
Apr 12, 2023 20:05:59.568 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] [Universal] Using local file path instead of URL: /Volume1/Movies/
Apr 12, 2023 20:05:59.568 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] Codecs: hardware transcoding: testing API vaapi
Apr 12, 2023 20:05:59.571 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] [FFMPEG] - Format 0x32315659 -> yuv420p.
Apr 12, 2023 20:05:59.571 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] [FFMPEG] - Format 0x30323449 -> yuv420p.
Apr 12, 2023 20:05:59.571 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] [FFMPEG] - Format 0x3231564e -> nv12.
Apr 12, 2023 20:05:59.571 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] [FFMPEG] - Format 0x32595559 -> yuyv422.
Apr 12, 2023 20:05:59.571 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] [FFMPEG] - Format 0x59565955 -> uyvy422.
Apr 12, 2023 20:05:59.571 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] [FFMPEG] - Format 0x48323234 -> yuv422p.
Apr 12, 2023 20:05:59.571 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] [FFMPEG] - Format 0x58424752 -> rgb0.
Apr 12, 2023 20:05:59.572 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] [FFMPEG] - Format 0x58524742 -> bgr0.
Apr 12, 2023 20:05:59.572 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] [FFMPEG] - Format 0x30313050 -> p010le.
Apr 12, 2023 20:05:59.572 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] [FFMPEG] - Created surface 0x4000000.
Apr 12, 2023 20:05:59.572 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] [FFMPEG] - Direct mapping possible.
Apr 12, 2023 20:05:59.573 [0x7efd691e7b38] DEBUG - [Req#18b/Transcode] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
User avatar
iacutone
Posts: 4
Joined: 09 Apr 2023, 20:02

Re: Plex HW Transcoding in TOS 5.1

Post by iacutone »

Hi,
Model: F2-243
TOS: 5.1.31
Plex Media Server: 1.32.0.6918 with Plex Pass Lifetime

I have followed the steps that you indicate. After execute

Code: Select all

usermod -aG video "user"
id "user" | grep "(video)"
I get these values:

Code: Select all

uid=0(user) gid=0(user) groups=0(user),3(admin),4(allusers),28(video)

If I understand correctly I must set:
PUID=0
PGID=0

Does not work for me
Attachments
Container details
Container details
User avatar
outkastm
Posts: 1193
Joined: 29 Dec 2020, 23:52

Re: Plex HW Transcoding in TOS 5.1

Post by outkastm »

Far as i know there is no model F2-243, so i guess you wanna say F2-423 or F2-223.

Check my post again.
Your model is part of the Fx-x23 series with JasperLake CPU.
Hardware transcoding is currently not working on TOS 5.1 with the current kernel version or the existing kernel parameters.
User avatar
jhalfhide
Posts: 37
Joined: 31 Dec 2020, 01:19

Re: Plex HW Transcoding in TOS 5.1

Post by jhalfhide »

Plex Hardware Transcoding still not working despite adding Plex to the Video group and restarting the Plex application. This is TOS 5.1.29, on a F2-422.
F2-422 running TOS 5.1
Plex/Sonarr/Radarr/Lidarr/SabNZBD
User avatar
iacutone
Posts: 4
Joined: 09 Apr 2023, 20:02

Re: Plex HW Transcoding in TOS 5.1

Post by iacutone »

outkastm wrote: 13 Apr 2023, 03:49 Far as i know there is no model F2-243, so i guess you wanna say F2-423 or F2-223.

Check my post again.
Your model is part of the Fx-x23 series with JasperLake CPU.
Hardware transcoding is currently not working on TOS 5.1 with the current kernel version or the existing kernel parameters.
Yes, my model is F2-223.
Ok, I thought that with the command you indicated it could be activated.
User avatar
jhalfhide
Posts: 37
Joined: 31 Dec 2020, 01:19

Re: Plex HW Transcoding in TOS 5.1

Post by jhalfhide »

Checking the console in Plex, I now do see Hardware transcoding messages since doing the video group add. I see this...

Code: Select all

[Req#11902/Transcode] Codecs: hardware transcoding: testing API vaapi

Code: Select all

[Req#1191c/Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found

Code: Select all

[Req#1191c/Transcode] TPU: hardware transcoding: final decoder: , final encoder:
F2-422 running TOS 5.1
Plex/Sonarr/Radarr/Lidarr/SabNZBD
User avatar
outkastm
Posts: 1193
Joined: 29 Dec 2020, 23:52

Re: Plex HW Transcoding in TOS 5.1

Post by outkastm »

jhalfhide wrote: 13 Apr 2023, 04:02 Plex Hardware Transcoding still not working despite adding Plex to the Video group and restarting the Plex application. This is TOS 5.1.29, on a F2-422.
This definetly should work, your NAS have an Apollo Lake CPU J3455, same family as my testing F2-221 with Apollo lake CPU J3355.
Do you have a Plex Pass ? Enable plex debug log and check for hardware string
User avatar
StephenNaylor
Posts: 34
Joined: 07 May 2023, 00:33

Re: Plex HW Transcoding in TOS 5.1

Post by StephenNaylor »

In case it helps anyone, my plex is showing that new server updates are available with these release notes...

Version 1.32.1.6999
New
(Logging) Transient and per-startup local admin tokens are now fully redacted in logs by default (#13986)
Fixes
(Credits Detection) Detection could sometimes use the incorrect stream information (#14216)
(Downloads) Transcoded downloads counted against per-user streams (#14139)
(Plugins) Secure connection requests would fail to load on Windows machines (#14279)
(TerraMaster) Improve hardware transcoding compatibility on TOS 5 platform
User avatar
spotpuff
Posts: 3
Joined: 10 Dec 2021, 13:28

Re: Plex HW Transcoding in TOS 5.1

Post by spotpuff »

This still seems to be broken on the latest Plex Server as of this date for TOS 5 (Version 1.32.2.7100).

Is it working for everyone else? I am still on TOS 5.0.whatever because the later updates killed my network transfer speeds.
User avatar
StephenNaylor
Posts: 34
Joined: 07 May 2023, 00:33

Re: Plex HW Transcoding in TOS 5.1

Post by StephenNaylor »

Spotted this in the release notes for ToS 5.1.33

"The kernel of TOS 5.1 has been updated to 5.15. Since the Linux kernel has removed the Intel Celeron J1800/J1900 GPU drivers from 5.15, the models of this platform no longer support GPU hardware video acceleration. If you are a user of this series of models and need to use GPU hardware video acceleration, do not update TOS 5.1! Models involved: F2-220/F2-420/F4-220/F4-420/F5-420"

I assume that this will be the cause of the issue if you are on these models: F2-220/F2-420/F4-220/F4-420/F5-420
Locked

Return to “Plex”