HW Transcoding with Plex Media Server

Share your awesome tips and tricks here.

Moderator: Lillian.W@AST

Post Reply
MikeG.6.5
Posts: 917
youtube meble na wymiar Warszawa
Joined: Fri May 15, 2015 1:56 am

HW Transcoding with Plex Media Server

Post by MikeG.6.5 »

Plex has a beta version of their Hardware Transcoder running right now. If you look at this thread on their forums you will see a 64-bit version of the app available for Asustor: https://forums.plex.tv/discussion/25094 ... 1-4-0-3224 This version is Plex Pass only for now, so if you don't have a Pass you won't be able to use it...

I installed this version and then started running tests and was very disappointed that I wasn't seeing significant gains in resources. Then another Asustor user posted how he got things to work, and the results using his modifications were unbelievable: https://forums.plex.tv/discussion/comme ... nt_1362622

With the first test I went from over 300% CPU usage on 4 cores to 40% usage of a SINGLE core by one really simple thing. So here's what I did and how I did it:

Make sure you downloaded the HW Transcoder version linked above. Then open WinSCP up and point to the /dev folder. Inside that folder look for a file called "renderD128" and r-click it and then click on "File" and "Copy with path". Next navigate to the /dev/dri folder and r-click on any open spot in the right pane and select New -> Link. Put in the file name renderD128 and paste in the copied name/path in the second line. Click OK. Start and stop Plex Media Server and start your own tests.

On my 7004T I gained some very significant improvements. This is across the board on any transcoding sessions I have tested SO FAR! Other models may see the same types of gains with such a simple edit. Post here if you did this and what results you have gotten.
MikeG.6.5
Posts: 917
Joined: Fri May 15, 2015 1:56 am

Re: HW Transcoding with Plex Media Server

Post by MikeG.6.5 »

Further testing is even more impressive. A 1080p 12Mps file transcoding in about 20% CPU resources (single core) with the HW transcoding active. Turning it off and replaying the same video used over 300% across all 4 cores of the i3-4330 in my 7004T.

This works out to upwards of 16 transcoding sessions for this one machine, as long as the original file starts in H264 codecs. This is a rough guestimate, just based on numbers. I've had as many as 5 transcodes going at one time as a test. Still only used about 95-115% total with all 5 going at one time. (Same video started on 5 different browser sessions or Plex Client devices all running concurrently.) I'm not sure you can even do more than one session with Asustor's LooksGood app....

(Performance specs all from NetData graphs. Now if Asustor would update this app to the most current version... and maintain it even remotely close to live....) :(
MikeG.6.5
Posts: 917
Joined: Fri May 15, 2015 1:56 am

Re: HW Transcoding with Plex Media Server

Post by MikeG.6.5 »

Every time I reboot the NAS I lose the symlink I refer to above. So I have to go in and make it again when I realize that HW transcoding is no longer working. In some cases this might be a few days, which is rather frustrating.

So I did some testing and came up with a way to make this work with a startup script. As I always make sure PlexPy is running at startup with a script, I just tacked a new set of lines to that startup script.

Remember you have to change path commands for PlexPy if yours is in a different location. You will also need to make sure you use the correct IP and ports within the curl statement that you have set up for PlexPy. If you use different IP's or ports, you WILL need to change this. Here's the script called S91PlexPy in the /volume1/.@plugins/etc/init.d folder:

Code: Select all

#!/bin/sh
#######################################################################################
#  This script tests to make sure the PlexPy application is running on your Asustor   #
#  NAS.  if it is the script exits and does nothing.  If not it will restart PlexPy   #
#  as a daemon so the app is always running.  This app is usefull  #
#  because you can set it to monitor your HDD space, and view recently added shows    #
#  and movies within Plex.                                                            #
#  ---------------------------------------------------------------------------------  #
#  You can change this to test for remote access by changing the localhost to the     #
#  DNS name of your NAS.  Ex: If you use Asustor's DDNS service it would be something #
#  like http://yourddnsname.myasustor.com:  If you are using Maraschino on another    #
#  port than 7000 you will need to edit the script below to reflect the port number.  #
#  ---------------------------------------------------------------------------------  #
#  This can be used to test operation of any app that has a web page for accessing    #
#  the app itself.  If the app is a stand alone app and doesn't use a web page        #
#  this check will not work.  There are other ways to check their operations.         #
#  ---------------------------------------------------------------------------------  #
#  Visit http://forum.asustor.com/index.php and ask MikeG.6.5 for any support issues  #
#######################################################################################

curl -I -m 8 "http://your.NAS.IP.here:port#/home";
if [ "$?" -ne "0" ]

then
                /usr/sbin/syslog --log 0 --level 1 --user admin --event "PlexPy isn't running:  Starting it"                
                /volume1/misc/PlexPy/PlexPy.py -d
fi

	ln -s /dev/renderD128 /dev/dri

exit 0
If you don't want or need PlexPy, you can delete or comment out that relative portion. This will execute every time the NAS starts, makes the link (as well as starting PlexPy as a daemon) and t hen exits out. The next time a video requires transcoding Plex should report it as a HW transcoding session instead of SW and gobbling up all of your CPU in the process.

HTH
User avatar
orion
Posts: 3482
Joined: Wed May 29, 2013 11:09 am

Re: HW Transcoding with Plex Media Server

Post by orion »

The anchor address on your signature shows that you are not a valid user. Wonder if the text is generated by machine or not. Anyway, it's easy to identify that the text is a garbage.
jauling
Posts: 52
Joined: Wed Feb 01, 2017 1:34 am
Location: Amsterdam

Re: HW Transcoding with Plex Media Server

Post by jauling »

I gotta buy PlexPass in order to have access to download the hardware transcoder?
MikeG.6.5
Posts: 917
Joined: Fri May 15, 2015 1:56 am

Re: HW Transcoding with Plex Media Server

Post by MikeG.6.5 »

jauling wrote:I gotta buy PlexPass in order to have access to download the hardware transcoder?
I don't know if this has been released for everyone now or not. It may very well be a Plex Pass feature only. (Which is my sincere hope, BTW. They tend to give away a lot of the features that should be "perks" for Pass holders, IMO.) I know it has been out for a long time now, in stable releases. I don't know if it is enabled for free or not.

To see if you have the feature on a non-pass account, go to the Plex Web App > Settings > Server > Transcoder and see if you have the option for "Use hardware acceleration when available". If you have it, then it's a non-pass feature. (And sort of makes me a bit upset, honestly... I mean I have supported the suite now, for over 5 years... Some things should be held as a perk for those who have paid for the development....)

If it's not a Pass feature, then lucky you.
jauling
Posts: 52
Joined: Wed Feb 01, 2017 1:34 am
Location: Amsterdam

Re: HW Transcoding with Plex Media Server

Post by jauling »

Meh. Asustor should provide hardware accelerated decoders as part of the price of their NAS.
MikeG.6.5
Posts: 917
Joined: Fri May 15, 2015 1:56 am

Re: HW Transcoding with Plex Media Server

Post by MikeG.6.5 »

jauling wrote:Meh. Asustor should provide hardware accelerated decoders as part of the price of their NAS.
They do, if you use the Asustor home grown app, LooksGood! If you are happy with the limitations of the app it is more than functional with it's HW transcoding.

If you find that Asustor's application doesn't fit your needs, then you need to use an app that does. In my case, Plex Media Server. Which means you either pay for the app's options, or change your needs to fit the NASes limitations.

You didn't pay for the $150 LifeTime Plex Pass when you bought your NAS... You paid for the NAS! Don't expect anything made by Asustor to have the same functionality of an application with over 100 developers dedicated to just the one single applications suite. Asustor doesn't have the resource nor the inclination to make such an app. They make the hardware and a framework to make their own and other applications work on the hardware. To that end they did a wonderful job!

Really, this is complaining because your apple isn't an orange... If you use strictly Asustor's home grown applications it does what the box says it should do. (With the exception of Kodi, since that's more recent than most of the boxes in the distribution system.) If you want the increased functionality that other 3rd party applications can have, then you are at that application's mercies.
jauling
Posts: 52
Joined: Wed Feb 01, 2017 1:34 am
Location: Amsterdam

Re: HW Transcoding with Plex Media Server

Post by jauling »

Thanks for the explanation. Prior to my Asustor AS5104T, I never even heard or used Plex, so yeah some learning and research was involved. I did see that LooksGood supports hardware decoding, which I might look into, but that's obviously a different topic :D
Post Reply

Return to “Tips & Tricks”