Discussion HW transcoding from Docker - solution for Hetzner dedicated and info for other servers

timekills

Legendary Member
Original poster
Staff
Donor
Local time
2:31 AM
Sep 12, 2018
351
168
Every time I try and set this up I don’t find the file for the drivers so I gave up
A Xeon E3 1245 is Sandy Bridge era with an iGPU that is capable of Intel Quick Sync Video according to their specs page: http://ark.intel.com/products/52274

It won't be very good quality hardware encoding, and only h.264, but it should work.
 

sukmidik

Junior Member
Local time
11:31 PM
Sep 11, 2018
5
2
  • Like
Reactions: timekills

timekills

Legendary Member
Original poster
Staff
Donor
Local time
2:31 AM
Sep 12, 2018
351
168
Thanks for this quality, in-depth write-up! I've one quick question for the OP, or anyone else who can help...

Where do I find this plex.yml file!!?!?!?

Thanks in advance for any assistance ??

EDIT - found what I was looking for in this thread: https://plexguide.com/threads/plex-pass-and-hardware-transcoding-support.2547/
Just for situational awareness, the plex.yml has had the /dev/dri/ folder mounted in the default setting for a few weeks now, so that step is probably no longer necessary. You technically don't have to update the Plex Docker container with the dirver install either - but it does allow for more HW capabilities if you do.
 
  • Like
Reactions: sukmidik

kamos69

Senior Member
Donor
Local time
1:31 AM
Apr 22, 2018
123
67
Hey. I'm hoping you can help me. I've been running this setup for a while but twice now HW transcoding just stopped working. It would load up the video but then as soon as it needs start transcoding it just hangs forever. No time out, no errors in the Plex logs, it just hangs. Direct streams still work. The weird / bizarre thing is that it works for Roku, iOS and Android clients but stops working for anyone using a browser or windows plex client. The only way to resovle the issue is to either disable HW transcoding or reboot the server.

I'm running a Hetzner EX61-NVMe. I double checked my config because I thought I might have missed a step but everything looks good. What do you think the issue could be?
 

kamos69

Senior Member
Donor
Local time
1:31 AM
Apr 22, 2018
123
67
Thanks for the reply. I tried the solution in the thread you linked to but I still haven't resolved this issue.

This is an extract of the error in the logs:

Code:
Mar 11, 2019 14:00:18.154 [0x7fc9637fe700] DEBUG - Request: [172.18.0.10:57202 (WAN)] GET /video/:/transcode/universal/session/AE525F55-BA41-47B7-BB4E-8E14F68F1718/vtt-base/00000.vtt (49 live) TLS GZIP Signed-in
Mar 11, 2019 14:00:18.154 [0x7fc9637fe700] DEBUG - Asked for segment 0 from session.
Mar 11, 2019 14:00:18.156 [0x7fc9997fa700] DEBUG - Sending back blank VTT segment for 0 due to timeout
Mar 11, 2019 14:00:18.156 [0x7fc9997fa700] DEBUG - Returning segment 0 from session: "/usr/lib/plexmediaserver/Resources/empty.vtt"
Mar 11, 2019 14:00:18.156 [0x7fc9997fa700] DEBUG - Content-Length of /usr/lib/plexmediaserver/Resources/empty.vtt is 7.
Mar 11, 2019 14:00:18.156 [0x7fc9997fa700] ERROR - Caught exception trying to stream file: /usr/lib/plexmediaserver/Resources/empty.vtt: write: Broken pipe
What's bizarre about this issue is that it ONLY affects web clients and TV clients. iOS, Android, Roku and windows Plex app aren't affected.
 
M

MrDoob

Guest
Do you own a Plex_Pass ?
And the next is ..
What for an Plex remote edition do you install
Public or PlexPass ?

pgupdate > v8.5base

plexguide >
9 > 4 > 4 and post the output
 

kamos69

Senior Member
Donor
Local time
1:31 AM
Apr 22, 2018
123
67
I do have Plex Pass and I have the PlexPass version installed. I'm still on version 7.2.4 and I won't be upgrading anytime soon. It's a schlep and there's nothing in 8.* that I need right now.

What I've done is setup a cronjob to reboot every morning, it's a temporary solution but it's working for now.
 

timekills

Legendary Member
Original poster
Staff
Donor
Local time
2:31 AM
Sep 12, 2018
351
168
Hey. I'm hoping you can help me. I've been running this setup for a while but twice now HW transcoding just stopped working. It would load up the video but then as soon as it needs start transcoding it just hangs forever. No time out, no errors in the Plex logs, it just hangs. Direct streams still work. The weird / bizarre thing is that it works for Roku, iOS and Android clients but stops working for anyone using a browser or windows plex client. The only way to resovle the issue is to either disable HW transcoding or reboot the server.

I'm running a Hetzner EX61-NVMe. I double checked my config because I thought I might have missed a step but everything looks good. What do you think the issue could be?
That sounds more like a Plex issue than a config issue. None of the symptoms you've described sound like server side as it works for other client side setups.
 

Spoonsy1480

Legendary Member
Local time
11:31 PM
Feb 23, 2018
356
58
When I run ls -la/dev/dri
I get ls: invalid operation
 

nachobel

Senior Member
Staff
Donor
Local time
3:31 PM
Feb 2, 2019
140
33
it's "ls -la /dev/dri" with a space. In Linux, the first grouping is the command "ls, mv, cp, sudo, rm, cd, grep, cat, etc.) and then anything with a hash mark is an option for that command. The last bits are the filepath of whatever you're acting upon. Think about it like a sentence where the format is [Verb] [Adverb] [Subject]
 
  • Like
Reactions: MrDoob

TFArchive

Junior Member
Local time
6:31 PM
Aug 24, 2018
11
8
I tried to get this to work on my EX42-NVMe server with a 7700 but it still won't work.

Does anyone have any clues on what else I can check? I checked the plex.yml and it has the /dev/dri path and all GPU checks show the i965 driver is loaded. I don't know how the add the parameter to the docker container but has it wasn't mentioned in the original post I assume it shouldn't be needed.

Thanks
 

nocturne1

Full Member
Donor
Local time
3:31 PM
Feb 19, 2019
29
13
Wait, don't the EX42-NVMEs have a i7-6700? (not that it would change your process - just been considering these....)
 

TFArchive

Junior Member
Local time
6:31 PM
Aug 24, 2018
11
8
Yes, supposed to come with 6700 but I and many have received 7700s instead, nice little bonus. This thing is a beast, no problems getting 100 MB/s from nntp, and unrars are super quick.
 
  • Like
Reactions: nocturne1

nocturne1

Full Member
Donor
Local time
3:31 PM
Feb 19, 2019
29
13
Any particular datacenter opinion? Still debating Helsinki vs Falkenstein (+$5).
 

TFArchive

Junior Member
Local time
6:31 PM
Aug 24, 2018
11
8
I choose FSN as I got good results on the speed test I found and so far so good. Couldn't find much of a speed test for Finland but I would imagine it would be fine for most uses.
 
  • Like
Reactions: nocturne1

Maslygan

Respected Member
Donor
Local time
12:31 AM
Dec 1, 2018
87
18
I just jumped the gun on that server too, also got a 7700, although its based in finland.

also i cant get hw transcode to work either
 

Maslygan

Respected Member
Donor
Local time
12:31 AM
Dec 1, 2018
87
18
Nice, hope you will like it. i've noticed a few things over the past day ive had the server. when running ubuntu, others(including me) saw that the upload only hit 500mb/sec. there is a forum post about that, but tl:dr you should be able to use this commandline and get full speed.

ethtool -K enp0s31f6 tso off gso off.

note that enp0s331f6 is my network device, and yours might be different. i copied this exact line from the other post, and mine was named the same way, so might be the case for yours too.


I saw a increase from 500mbit/sec to about 800mbit/sec after that.

other than that, s*hit its fast. i switched from a xeon e3-1246v3, 32gb ram and 2x2tb HDD. nvme seems to make a big difference in nzbget etc. with HW transcode, i can also transcode 4k movie without any hassle (other than the HDR >SDR looking s*hit). im hitting 110mb/sec on nzbget from newsgroup.ninja, so pretty much maxing out the line
 

nocturne1

Full Member
Donor
Local time
3:31 PM
Feb 19, 2019
29
13
Still setting things up, but it seems like the server itself is screaming compared to the (CX21, then CX31, then CX41) I've been working with. But I'm gonna miss the 300MB/s that I was getting here and there from those! But I guess overall, the tortoise beats the hare....
 

timekills

Legendary Member
Original poster
Staff
Donor
Local time
2:31 AM
Sep 12, 2018
351
168
@Maslygan For you, or others, considering the ethtool patch, you can determine the correct network device by running the ifconfig command.

You'll likely see a couple pages of ethernet devices, almost all will be virtual devices for your Docker containers.
Look for the one (should be near the top of the list) that starts with "en".
The others will likely be a bridge (brxxxx), docker, or virtual (vethxxxx).

When you find the one that begins "en" use that in place, for example:
sudo ethtool -K enp2s0 tso off gso off

Note that this will also re-enable IPV6, which is disabled during the pgblitz install script, as it can cause some conflicts. I haven't found any issues yet, so didn't disable IPV6 again, but if I do, I'll update.
 

Maslygan

Respected Member
Donor
Local time
12:31 AM
Dec 1, 2018
87
18
Make sure you are using the plex pass container :) Sub7even just told me so on discord, and now it works for me :D so you gotta reinstall plex and chose plex pass there, then it should work
 

timekills

Legendary Member
Original poster
Staff
Donor
Local time
2:31 AM
Sep 12, 2018
351
168

Maslygan

Respected Member
Donor
Local time
12:31 AM
Dec 1, 2018
87
18
yes, thats not what i was saying. I did have plex pass, im not stupid. but i stated that you would have to install another container.
 

timekills

Legendary Member
Original poster
Staff
Donor
Local time
2:31 AM
Sep 12, 2018
351
168
Ok...so you had Plex Pass, but didn't install the Plex Pass version?
Maybe I'm the stupid one, because I'm not sure what you're trying to advise people on. That if they have Plex Pass, but don't install that version initially, then they'll have to reinstall?
Why would you not install the Plex Pass version during the install when it asks? If you already know it's required for HW acceleration, I'd think you'd install it, especially if you'd already paid for it.

Just trying to see if I missed a critical point when I wrote the install and wiki, but so far I'm not seeing anything.
 

Maslygan

Respected Member
Donor
Local time
12:31 AM
Dec 1, 2018
87
18
well its because when i originally installed the server with pgblitz, i did not have plex pass. so i installed the normal one. i then got plex pass after that. That's what i was trying to tell :)
 
  • Like
Reactions: timekills

skijbal

Respected Member
Local time
5:31 PM
Oct 4, 2018
50
11
What two lines where originally needed to be added to the yml for the volumes.
 

timekills

Legendary Member
Original poster
Staff
Donor
Local time
2:31 AM
Sep 12, 2018
351
168
- "/dev/dri/card0:/dev/dri/card0"
- "/dev/dri/renderD128:/dev/dri/renderD128"


Although just passing through the /dev/dri/ directory is fine - which is now included in the Plex YAML file, so those two lines no longer need to be manually added.
 

nachobel

Senior Member
Staff
Donor
Local time
3:31 PM
Feb 2, 2019
140
33
If we open a shell within the Plex docker should we see the permissions on /dev/dri as 775?
 

timekills

Legendary Member
Original poster
Staff
Donor
Local time
2:31 AM
Sep 12, 2018
351
168
By default the /dev/dri permission is 755 but the two important files in it are 660.
The folder does need to have the correct permissions set in the base OS (not the Plex docker container, although those are also important) in order for the Docker container(s) to get correct access.
I recommended the extreme example of setting /dev/dri to 777 however 755 is (so far) enough. Write access hasn't been required.
 
M

MrDoob

Guest
give me 1 or 2 weeks and i build a installer for this one,
im to busy at the moment ,

i have the code for this actually .. but i need some pr00f for this and tests



3103
 
Last edited by a moderator:

tjc516

Junior Member
Donor
Local time
6:31 PM
Feb 26, 2019
3
0
HI all, would love to get this working on my but seem to be having issues. Running Debian 9 with kernel
4.19.0-0.bpo.2-amd64. The server has been rebooted and i do have the plex pass version installed. Any advice or suggestions would be greatly appreciated, as of now i never see "hw" during a transcode and i've tried a few.


Also switching to PGBlitz is the best thing i've done, thank you for all the hard work everyone has put in to make it easier for the rest of us.

3187

3188

3189

3190
 

Attachments

Assists Greatly with Development Costs

doggy28

Junior Member
Donor
Local time
11:31 PM
Mar 30, 2019
12
1
Thank you for your guide to set up hw transcoding. I have managed to set it up and verified that hw transcoding is working on tautulli and plex dashboard

However,

I noticed that in portainer, the plex container is "healthy" and not "running"
I checked the logs
Connection to 139.162.158.15 closed by remote host.
,
[cont-finish.d] executing container finish scripts...,
[cont-finish.d] done.,
[s6-finish] syncing disks.,
[s6-finish] sending all processes the TERM signal.,
Critical: libusb_init failed,
[s6-finish] sending all processes the KILL signal and exiting.,
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
[s6-init] ensuring user provided files have correct perms...exited 0.,
[fix-attrs.d] applying ownership & permissions fixes...,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts...,
[cont-init.d] 40-plex-first-run: executing... ,
[cont-init.d] 40-plex-first-run: exited 0.,
[cont-init.d] 50-plex-update: executing... ,
[cont-init.d] 50-plex-update: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,
Starting Plex Media Server.,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
Connection to 176.58.97.243 closed by remote host.
,
Connection to 139.162.158.15 closed by remote host.
,
Connection to 139.162.158.105 closed by remote host.
,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
Connection to 139.162.141.10 closed by remote host.
,
Connection to 139.162.158.15 closed by remote host.
,
Connection to 139.162.175.123 closed by remote host.
,
[cont-finish.d] executing container finish scripts...,
[cont-finish.d] done.,
[s6-finish] syncing disks.,
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
[s6-init] ensuring user provided files have correct perms...exited 0.,
[fix-attrs.d] applying ownership & permissions fixes...,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts...,
[cont-init.d] 40-plex-first-run: executing... ,
[cont-init.d] 40-plex-first-run: exited 0.,
[cont-init.d] 50-plex-update: executing... ,
[cont-init.d] 50-plex-update: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,
Starting Plex Media Server.,
Plex Media Server is already running. Will not start...,
Starting Plex Media Server.,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,
failed to open /data/jenkins/conan_build/290592611/conan/.conan/data/libva/2.1.0-37/plex/stable/package/81a2df5e16044d97d1b088b0e6c9598b5b17f233/lib/dri/hybrid_drv_video.so,
Failed to wrapper hybrid_drv_video.so,

Why do I have this error ? I am able to view the /dev/dri folder within the container using the console and verify that vainfo works as intended within the container
[email protected]:/# vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Ivybridge Desktop - 1.7.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
[email protected]:/#
 
Last edited:

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.


Maintenance Donations

 

Recommend NewsGroups

Trending