Jump to content
rmilyard

Help with Plex hardware transcoding

79 posts in this topic Last Reply

Recommended Posts

I am using binhex-plexpass docker.  I have a E3-1275v6 CPU.  In plex server settings I have Use hardware acceleration when available turned on.  Is there anything else I need to do with unRAID or plex to get it working?

 

I am not seeing the hw tag in the info when looking at server transcode info.

Share this post


Link to post
To enable hardware transcoding in Plex, do the following:
On 2/26/2018 at 5:26 PM, jang430 said:

what are these parameters for? "--device /dev/dri:/dev/dri" . Where do you put them? 

 

This goes in the Extra Parameters in the Plex Docker config (you have to enable Advanced View on the docker edit page to see this). Note: this is for the linuxserver.io Plex docker (others Plex dockers may be different):

 

image.png.d719e3f2ba0300e500fcb3af7d3f5bb2.png

 

Also, you need some entries in your go file like this (after entering these commands in the CLI):

#Setup drivers for hardware transcoding in Plex
modprobe i915
chmod -R 777 /dev/dri

And in your Plex server Transcoder Settings page you need to enable hardware acceleration

 

image.thumb.png.9987e8e84bb16ff32bd8afd5f6d8ae3c.png

 

 

Edited by Hoopster

Share this post


Link to post
6 hours ago, Hoopster said:
To enable hardware transcoding in Plex, do the following:

 

This goes in the Extra Parameters in the Plex Docker config (you have to enable Advanced View on the docker edit page to see this). Note: this is for the linuxserver.io Plex docker (others Plex dockers may be different):

 

image.png.d719e3f2ba0300e500fcb3af7d3f5bb2.png

 

Also, you need some entries in your go file like this (after entering these commands in the CLI):


#Setup drivers for hardware transcoding in Plex
modprobe i915
chmod -R 777 /dev/dri

And in your Plex server Transcoder Settings page you need to enable hardware acceleration

 

image.thumb.png.9987e8e84bb16ff32bd8afd5f6d8ae3c.png

 

 

 

Thanks for info!  I will try it out after my parity drives rebuild.  Had to replace one.

Share this post


Link to post

Also, please note that on the "--device /dev/dri:/dev/dri" line that goes in Extra Parameters, there are two dashes in front of the word "device" and not just one. It is easy to see that as just one dash and that will not work.

Share this post


Link to post
8 hours ago, Hoopster said:

Also, please note that on the "--device /dev/dri:/dev/dri" line that goes in Extra Parameters, there are two dashes in front of the word "device" and not just one. It is easy to see that as just one dash and that will not work.

 

So I did all this and rebooted.  How can you tell if working correctly?  

Share this post


Link to post

Either stream a video that you know is not in a format your client supports natively, or, force a transcode by setting in a Plex client a video quality that is very different than the source.  Check the status of the playback in the Plex Server status screen.  You should see an (hw) next to something like MPEG2VIDEO transcoding to H264 (hw).

Share this post


Link to post
3 minutes ago, Hoopster said:

Either stream a video that you know is not in a format your client supports natively, or, force a transcode by setting in a Plex client a video quality that is very different than the source.  Check the status of the playback in the Plex Server status screen.  You should see an (hw) next to something like MPEG2VIDEO transcoding to H264 (hw).

 

When I check the stream on server not seeing (hw)

 

I have John Wick 2 in 4k.  Streaming to iPhone shows Video Transcoding HEVC to H264 and Audio TRUEHD to AAC

 

 

Share this post


Link to post

When you type "modprobe i915" on the console, does it appear to be loading anything or does it give you an error

Share this post


Link to post
1 minute ago, Hoopster said:

When you type "modprobe i915" on the console, does it appear to be loading anything or does it give you an error

 

when type that in at root@Milyard-Tower I don't get error.  I get command line right back.

 

Share this post


Link to post

That's good.  That would indicate the i915 driver is loading.  I am away from my server and won't have access for about 90 minutes.  I'll have to get back to you when I am home and can do some tests. Gotta head to a meeting.

Share this post


Link to post
4 minutes ago, Hoopster said:

That's good.  That would indicate the i915 driver is loading.  I am away from my server and won't have access for about 90 minutes.  I'll have to get back to you when I am home and can do some tests. Gotta head to a meeting.

 

 

That would be great if can help me fix this.

Share this post


Link to post

Do you see this on your server?

 

image.png.42b8ce55e93a042d7a4076d44941cf98.png

 

Do you have a /dev/dri folder with the contents as shown above?

 

Your E3-1275 V6 CPU definitely has an iGPU and Quick Sync Video support

 

If you do not have the contents of the /dev/dri folder as shown above, do you have another graphics card in your server, either discrete or onboard (for example, a BMC for IPMI)?  If so, is it set to the primary graphics adapter in the BIOS?  I believe the iGPU needs to be primary in order for the drivers to load for hardware transcoding to work.  If another graphics card is the primary the /dev/dri drivers are not loaded.

Edited by Hoopster

Share this post


Link to post

Linux 4.14.16-unRAID.
Last login: Thu Mar  8 16:02:54 -0700 2018 on pts/0 from 10.0.1.17.
root@Milyard-Tower:~# cd /dev/dri/
root@Milyard-Tower:/dev/dri# ls -l
total 0
drwxrwxrwx 2 root root      60 Mar  8 15:16 by-path/
crwxrwxrwx 1 root video 226, 0 Mar  8 15:16 card0
root@Milyard-Tower:/dev/dri# dir
by-path/  card0
root@Milyard-Tower:/dev/dri#
 

Share this post


Link to post
1 minute ago, rmilyard said:

Linux 4.14.16-unRAID.
Last login: Thu Mar  8 16:02:54 -0700 2018 on pts/0 from 10.0.1.17.
root@Milyard-Tower:~# cd /dev/dri/
root@Milyard-Tower:/dev/dri# ls -l
total 0
drwxrwxrwx 2 root root      60 Mar  8 15:16 by-path/
crwxrwxrwx 1 root video 226, 0 Mar  8 15:16 card0
root@Milyard-Tower:/dev/dri# dir
by-path/  card0
root@Milyard-Tower:/dev/dri#
 

 

Well, you don't have renderD128 and that is the problem.  That is the QSV driver needed for hardware transcoding in Plex.

 

So, no other graphics card in your server and "onboard (or whatever your BIOS designates for iGPU)" is set to primary adapter in the BIOS?

Share this post


Link to post
Just now, rmilyard said:

That was it!  It was set to AUTO!  Changed that and now working!  Thank you so much!

 

No problem.  Glad it's working!

Share this post


Link to post

So one more question about hardware transcoding. So would adding say a GTX 750 ti or something also work?  Say more powerful?  Can you use CPU and GPU?

Share this post


Link to post
6 hours ago, rmilyard said:

So one more question about hardware transcoding. So would adding say a GTX 750 ti or something also work?  Say more powerful?  Can you use CPU and GPU?

 

No, cannot yet be done.  unRAID does not have NVIDIA drivers and there are limitations with GPU-based transcoding in Linux. Even if you had both a QSV capable CPU and an NVIDIA GPU installed, only one or the other could be used.  Integrated GPU with QSV is the only currently-available option for Plex hardware transcoding.

 

See this from Plex: https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/

 

In particular, these two statements;

- On Linux, hardware-accelerated decoding is not supported on NVIDIA GPUs. Intel Quick Sync is required for hardware-accelerated decoding

- Windows and Linux devices using NVIDIA GeForce graphic cards are limited to hardware-accelerated encoding of 2 videos at a time. This is a driver limitation from NVIDIA

(however, even this is not possible with unRAID as no GeForce drivers are included in unRAID; perhaps if you compiled your own kernel with drivers, this might be possible)

Edited by Hoopster

Share this post


Link to post

I have attempted the instructions but do not see the (HW) next to a transcode just yet.  I was wondering if I needed to add this line to the go file: 

chown -R nobody:users /dev/dri

I saw that on another thread and my current one has ownership of  root:video 226 on renderD128

 

and the /dev/dri folder is root:root

Edited by manolodf

Share this post


Link to post
14 hours ago, manolodf said:

I have attempted the instructions but do not see the (HW) next to a transcode just yet.  I was wondering if I needed to add this line to the go file: 


chown -R nobody:users /dev/dri

I saw that on another thread and my current one has ownership of  root:video 226 on renderD128

 

and the /dev/dri folder is root:root

 

Your CPU (assuming it is the one in your signature) does not support Quick Sync Video.  At least a Sandy Bridge CPU is required for H.264 encoding and even more modern CPUs are required for encoding of other formats such as HEVC.  Your i3 530 is of the previous generation and supports Clear Video only and not QSV.  Clear video has no hardware encoding support.

 

See https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video

 

Edited by Hoopster

Share this post


Link to post

Whoops, how do I edit my signature?   Because I dont see it, I actually have an i7-7700 now, I think I got it working actually, see the (HW) when transcoding.

Share this post


Link to post
14 minutes ago, manolodf said:

Whoops, how do I edit my signature?   Because I dont see it, I actually have an i7-7700 now, I think I got it working actually, see the (HW) when transcoding.

It is an option on your Account Settings for the forum.

Share this post


Link to post

Sorry to bring up this thread ..... I have managed to make all of the changes in the go file and everything is up and running with the docker container however i dont have the checkbox to tick in the transcoder in plex settings yeah i switched to advanced XD how can i get this ???

Share this post


Link to post
8 hours ago, shremi said:

Sorry to bring up this thread ..... I have managed to make all of the changes in the go file and everything is up and running with the docker container however i dont have the checkbox to tick in the transcoder in plex settings yeah i switched to advanced XD how can i get this ???

 

I'm not sure if this is still the case, but at one point you had to be a Plex Pass subscriber for that feature

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.