QuickSync with Plex Rock-On

Hi,
since I’m running a Intel i3 CPU (Skylake) on my setup (so I could use ECC memory, since I thought I’d be using ZFS and FreeNAS, which I ended up not using) I thought I’d take advantage of the QuickSync capabilities to help with the transcoding inside Plex. Now, according to various sources it seems to work fine (showing me that it actually performs transcoding when needed), but am also curious whether anybody solved this differently. I took the original Plex json file and expanded it with the transcode parameter (as described in the Dockers documentation for that image):

As you can see I inserted another definition of share in the volumes section.

   					"/transcode": {
                    "description": "Choose a Share for HW transcoding (optional). Eg: create a Share called transcode for this purpose alone (ideally on a SSD).",
                    "label": "Transcoding Directory"

}

and then (as usual) placed the new RockOn in my local RockOn storage directory (/opt/rockstor/rockons-metastore) (I both changed the filename, as well as the header definitions (see screenshot) so it wouldn’t conflict with the standard delivered Plex setup). Also, if you already had Plex installed, you might have to remove the existing image and docker container before using this version (see the forum on how to do that) - just uninstalling the Plex Rock-On will not be sufficient.

Then during the RockOn config, I assigned a “transcode” directory (created on the SSD that also houses the Rockstor installation). To test whether the transcoding was working (hardware use for transcoding enabled in the PlexUI) I forced a video into a non-native resolution, and the status indicated that it was successfully transcoding. I am not savy enough to know whether this 100% means it’s using it, but the Internet says, it does, so it must be right :grinning:

2 Likes

Glad to see it seems to work and thank you very much for sharing your findings and improvements!

I’m curious about one thing, though. Although I’m unfamiliar with Plex and how it deals with transcoding, I know from Emby that you need to mount a device to the docker container for it to truly use hardware transcoding, otherwise it simply uses CPU power to do so (and not necessarily QuickSync). While I do not know about Plex, I notice something along those lines in the docker container’s documentation:

The application accepts a series of environment variables to further customize itself on boot:

Parameter Function
-v /transcode Path for transcoding folder
--device=/dev/dri:/dev/dri Add this option to your run command if you plan on using Quicksync hardware acceleration - see Application Setup section.

and

Hardware acceleration users for Intel Quicksync will need to mount their /dev/dri video device inside of the container by passing the following command when running or creating the container:

--device=/dev/dri:/dev/dri

We will automatically ensure the abc user inside of the container has the proper permissions to access this device.

Have you tried that option? Using this in Emby is actually the reason I added the ability to add a device in a rock-on. This feature has been added in Rockstor 3.9.2-39:

If interested, you can have a look at the Emby rock-on, which now offers this option:

Briefly, it makes use of the “devices” object in the rock-on definition file (see documentation below).

Thanks again for sharing your work, that is always very helpful!

1 Like

@Flox

Thanks for pointing this oversight out. Since I did this a couple of months ago, I did forget this little “detail” (it’s in the screenshot, but I never mentioned it). It of course, is a key part, the share is important too, but this one is supposed to bring it to life:

Thank you for noticing, wouldn’t have been complete without this.

2 Likes

Thanks for the additional information!

I’m really glad to see it’s working well… that makes me think it could be a good idea to update the existing Plex rock-on accordingly. It would need to be using the “devices” object I mentioned in my post above–so that users without /dev/dri can still use it–but it would open the possibility to easily use QuickSync for those with the compatible hardware.

Would that be something you would be interested taking on? If not, no worries, thanks to you, we know how it should be set up at least and somebody may want to help with implementing it.

Cheers,

1 Like

@Flox
I don’t have the Github development set up. I will take a look and see whether I can figure it out and make this happen.

1 Like

Great!
In case it helps, you will find a quick rundown in the Rockstor documentation:
http://rockstor.com/docs/contribute_rockons.html#contributing-to-rockstor-rock-ons

Thanks a lot for willing to have a look at it, that is greatly appreciated.

1 Like