How do you use the processor to decode HEVC h.265 in Emby? Using 6th gen Xeon


Recommended Posts

Hi.  I'm using Xeon E3-1225 V6.  I'm using Emby.  I have been downloading quite a few movies with HEVC h.265 encoding.  So far, it's been using my CPU, eating up to 95% of all 4 cores.  I know this processor has built-in Quick Sync Video, ergo, won't eat a lot of processing power.  But how do you exactly enable it in Unraid, in Emby Docker (linuxserver.io)?

 

 

Link to comment

Anyone?

 

I already have this in my go file:

 

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

 

In Emby settings:

 

Under Hardware acceleration, I have:

 

Video Acceleration API (VA API)

Link to comment

You need to pass the device through to the emby container.

Add a new device and use /dev/dri for both host and container fields.

 

If you are using our emby container, I suggest you change it to the official as we haven't released ours and probably never will. 

 

If you have passed through the device for Plex, then you either need to stop that container or remove the device I think.

Edited by saarg
Link to comment

Hi.  Noted on the using the official one.  I just recently saw it.  

 

 

How do you "Add a new device and use /dev/dri for both host and container fields."  Where do you put this?

 

I can stop plex.  Not sure whether what I've done is passed through the internal gpu.  I wanted to use the internal gpu Iris Pro 630 to transcode the shows.

Link to comment
  • 5 months later...

I'm a little confused on how to do this.

So I have to go and add a config text file to the GO directory (where is this?). Then create a device for the hw transcoder and after that just go to the emby docker, click on add another device. and fill out as above.

 

Is there more to do?

Edited by Heciruam
Link to comment
  • Modify your /boot/config/go file and add the following in between the first line and the last. You will need to reboot for these changes to take affect but you can also run both those after editing your go file so you won't have to reboot.
modprobe i915
chmod 777 /dev/dri/*
  • Add the device /dev/dri to your Emby Docker.

That's all you need to do. I actually have two Dockers, Plex and HandBrake, that both use Quick Sync. I've used Emby before and it works fine this way.

  • Like 2
Link to comment
5 hours ago, AshranPewter said:

How do you tell that it's using it? Besides that it uses less of the processor. Like an official way tell through logs.

 

Thanks!

AshranPewter

I'm not sure. I tried Emby very briefly. I find it ugly and too rough around the edges for my family's needs. 

Link to comment

I have got this all working, here is a guide. This will only work with intel iGPU on unraid. I have an E3-1275 V5 CPU. This guide is based on Emby 4.0

 

You need an Intel CPU with iGPU and quick sync video support. https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video

 

The assumption is that nothing else is using the integrated video from your CPU (no VM's)

 

Mine is Skylake so I am limited to HEVC, (no 10 bit, that will be software transcode instead), If I upgrade to a Kaby Lake Xeon I would have full support for HEVC 10-BIT

 

I grabbed info from this thread and info from the Emby docker page, if you run into trouble with below check out that thread.

 

Any experts on this please feel free to chime in and I can update it.

 

This is what I did to make it work:

 

Step 1

 

Edit your go file with a text editor (I use EditPad Lite) 

 

You can share your flash file as hidden and give your self access. (Click on the flash drive in the main tab to find this setting)

 

image.png.183c5a4865a63028183e386d86552836.png

 

 

Locate the go file:

 

flash\config\

 

Edit the go file with a text editor and add the following: (put this in below anything already in your go file)

#Setup drivers for hardware transcoding in Emby
modprobe i915
chown -R nobody:users /dev/dri
chmod -R 777 /dev/dri

Restart your unRaid system

 

Step 2

 

Click on the terminal screen on unRAID on the top menu.

image.png.be8bc6d6f66d54859e8e574aa7b4ca66.png

 

and type / paste:

getent group video | cut -d: -f3

Note what the output is (mine was 18) as seen below

 

image.png.aef386c6823af51a84f7769b75f90ef6.png

 

Step 3

 

I am using the official Emby Docker:

 

https://hub.docker.com/r/emby/embyserver/

 

Here is the link to the templates. You need to add this manually, this won't be found in Community Applications.

https://github.com/MediaBrowser/Emby.Build/tree/master/unraid-templates/emby

 

Emby 4.0 now has a nice little logo to confirm hardware transcoding

 

image.png.e4e5fa3fdbda85f7bdfd53a7863350e0.png

 

Here is what I have in my docker template, you will need to add extra parameters over the default. If you already have Emby, you will need to modify your template to add extra parameters.  This is easy to do with the "+Add another Path, Port, Variable, Label or Device" when editing your install.

 

My Settings:

Repository: emby/embyserver:latest

Network Type: Host

Console shell command: Shell

Privileged: Off

Port 1: 8096 Container Port: 8096 (for http)

Port 2: 8920 Container Port: 8920 (options if using https)

Path 1: /mnt/user/appdata/emby/ Container Path: /config

Path 2: /mnt/user (change as required to your media share, i leave it as user, makes it easier to add new shares with out remapping) Container Path: /mnt

Variable 1: Key: APP_UID Value: 99

Variable 2: Key: APP_GID Value: 100

Variable 3: Key: GIDLIST Value: (Change to your output from Step 2) 

 

Here is an example of Variable 1

 

image.png.6b369814304b28b724a6f2747e8c969f.png

 

Now click on Advance View and under "Extra Parameters" add the following:

 

--device /dev/dri/renderD128

image.png.24dd98c1d22068c58d22d13513093a41.png

 

I have also attached my template (my-EmbyServer.xml) that you can edit and add it your flash drive. You will have to edit this so you grab latest instead of beta.

 

Place the template here:

flash\config\plugins\dockerMan\templates-user

 

my-EmbyServer.xml

 

Step 4

 

Start Emby.

 

Checkout the transcode section just in chase, click advanced and it will show you what was detected.

image.thumb.png.5979adc321f4742ab7de0533f2e05245.png

 

 

 

Edited by Lebowski
Updated as Emby 4.0 is standard and no longer beta
  • Like 1
Link to comment
  • 2 weeks later...
On 1/11/2019 at 10:43 PM, Lebowski said:

I have got this all working, here is a guide. This will only work with intel iGPU on unraid. I have an E3-1275 V5 CPU......

 

Lebowski,

I have a similar setup to yours.  If you would like to see your iGPU utilization during transcode you can use a docker container.  Definitely helps when you're trying to figure out a bottleneck between CPU, disk, network, or iGPU.  Info here: 

 

Link to comment
  • 1 year later...
On 1/12/2019 at 4:43 AM, Lebowski said:

Step 1

 

Edit your go file with a text editor (I use EditPad Lite) 

 

You can share your flash file as hidden and give your self access. (Click on the flash drive in the main tab to find this setting)

 

image.png.183c5a4865a63028183e386d86552836.png

 

 

Locate the go file:

 

flash\config\

Where do I find the smb setting for flash?

Link to comment
  • 2 months later...
20 minutes ago, Heciruam said:

I got one more question. Can I add this to multible Docker containers? So Emby, jellyfin and Plex. So they all can use the iGPU at the same time?

In theory, yes.  I have not tried transcoding in multiple Media management systems simultaneously; however, I have successfully used Plex and HandBrake (added /dev/dri to both docker containers) at the same time doing media transcoding.

  • Like 1
Link to comment

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.