Jump to content
Sign in to follow this  
Laucien

6700 + Plex docker container - Can I use HW transcoding?

9 posts in this topic Last Reply

Recommended Posts

Hello!. Did some searching around on this topic and found this thread but for a different CPU and old so figured I could post again instead of resurrecting it. 

 

I have a server running on a Skylake 6700 (non-K) with Linuxserver's Plex container. I've been using it for more than a year already and works great but just started running into issues when trying to transcode full quality BD movies to my TV or my computer. It just plays a bit, buffers, plays, buffers, repeat. 

 

I've set Plex's logs to DEBUG+VERBOSE and this is what I get when trying to stream content like this to my TV: 

Mar 29, 2018 03:59:17.133 [0x14eb2bffd700] VERBOSE -  * speed => 0.6
Mar 29, 2018 03:59:17.623 [0x14eb2d9fe700] VERBOSE -  * speed => 0.0
Mar 29, 2018 03:59:18.224 [0x14eb2bffd700] VERBOSE -  * speed => 0.8
Mar 29, 2018 03:59:18.787 [0x14eb2d9fe700] VERBOSE -  * speed => 0.7
Mar 29, 2018 03:59:19.362 [0x14eb273ff700] VERBOSE -  * speed => 0.8
Mar 29, 2018 03:59:19.754 [0x14eb2d9fe700] VERBOSE -  * speed => 0.5
Mar 29, 2018 03:59:20.288 [0x14eb2d9fe700] VERBOSE -  * speed => 0.7
Mar 29, 2018 03:59:20.877 [0x14eb2e3c8700] VERBOSE -  * speed => 0.7
Mar 29, 2018 03:59:21.365 [0x14eb287ff700] VERBOSE -  * speed => 0.6
Mar 29, 2018 03:59:21.851 [0x14eb287ff700] VERBOSE -  * speed => 0.7
Mar 29, 2018 03:59:22.388 [0x14eb2dbff700] VERBOSE -  * speed => 0.6
Mar 29, 2018 03:59:22.958 [0x14eb2bffd700] VERBOSE -  * speed => 0.6
Mar 29, 2018 03:59:23.477 [0x14eb2bffd700] VERBOSE -  * speed => 0.6
Mar 29, 2018 03:59:23.989 [0x14eb2d9fe700] VERBOSE -  * speed => 0.7
Mar 29, 2018 03:59:24.544 [0x14eb273ff700] VERBOSE -  * speed => 0.7
Mar 29, 2018 03:59:25.102 [0x14eb2e3c8700] VERBOSE -  * speed => 0.8

From the Plex documentation a value of 1.0 or above is needed for real-time smooth playback so that's obviously the issue here. 

 

 

I've been trying to enable HW transcoding by doing the steps in that thread above and what I found online but to no luck. Here's what I've done so far. 

 

Set the container like this: 

image.png.64bd24029ce26d16d1f912a853a001bc.png

 

Executed these commands and there were no errors when using the `modprobe` command. 

modprobe i915
chmod -R 777 /dev/dri
chown -R nobody:users /dev/dri

 

Checked the `/dev/dri/` folder in unRAID just to check all the needed files were there

root@Vault:~# ls -las /dev/dri/
total 0
0 drwxrwxrwx  3 nobody users      100 Mar 29 03:43 ./
0 drwxr-xr-x 15 root   root      3800 Mar 29 03:43 ../
0 drwxrwxrwx  2 nobody users       80 Mar 29 03:43 by-path/
0 crwxrwxrwx  1 nobody users 226,   0 Mar 29 03:43 card0
0 crwxrwxrwx  1 nobody users 226, 128 Mar 29 03:43 renderD128

 

Then started the Plex container back up and -> Transcoding -> Advanced -> Enabled HW transcoding. 

image.png.82320e9b7356a31cf48c15ac1c0cfedd.png

 

 

 

Then I tried to stream the same movie and noticed absolutely no change so I dived into the logs and found this: 

Mar 29, 2018 03:12:13.909 [0x14ace6bfb700] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Invalid argument
Mar 29, 2018 03:12:13.912 [0x14ace6bfb700] DEBUG - TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Mar 29, 2018 03:12:13.913 [0x14ace6bfb700] DEBUG - TPU: hardware transcoding: zero-copy support not present
Mar 29, 2018 03:12:13.913 [0x14ace6bfb700] DEBUG - TPU: hardware transcoding: final decoder: , final encoder:

 

The 6700 has an iGPU and from Intel's site it supports quicksync  so I'm clearly screwing up somewhere... any thoughts?.

 

Share this post


Link to post
6 hours ago, John_M said:

Do you have a Plex Pass?

 

 

Yes. 

 

6 hours ago, TheBlackPitcher said:

I have a 8700 intel CPU.

i had to set i915.alpha_support=1 in syslinux.cfg to support my IGPU.

 

 

Will give that a try. I just edit that file and add/modify that line?. 

Share this post


Link to post
24 minutes ago, Laucien said:

 

Yes. 

 

 

Will give that a try. I just edit that file and add/modify that line?. 

default menu.c32
menu title Lime Technology, Inc.
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append initrd=/bzroot i915.alpha_support=1
label unRAID OS GUI Mode
  kernel /bzimage
  append initrd=/bzroot,/bzroot-gui i915.alpha_support=1
label unRAID OS Safe Mode (no plugins, no GUI)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label unRAID OS GUI Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot,/bzroot-gui unraidsafemode
label Memtest86+
  kernel /memtest

Yes like this.

 

After that, reboot.

Edited by TheBlackPitcher

Share this post


Link to post
11 hours ago, Laucien said:

Checked the `/dev/dri/` folder in unRAID just to check all the needed files were there


root@Vault:~# ls -las /dev/dri/
total 0
0 drwxrwxrwx  3 nobody users      100 Mar 29 03:43 ./
0 drwxr-xr-x 15 root   root      3800 Mar 29 03:43 ../
0 drwxrwxrwx  2 nobody users       80 Mar 29 03:43 by-path/
0 crwxrwxrwx  1 nobody users 226,   0 Mar 29 03:43 card0
0 crwxrwxrwx  1 nobody users 226, 128 Mar 29 03:43 renderD128

 

OK, looks like the appropriate drivers are there, but, just to make sure, do you have "onboard", "iGFX" or whatever your BIOS calls it set as the primary graphics adapter?  If not, the drivers may be present, but, they will not be loaded at system boot. If you have a PCIe graphics card and it is set as the primary, hardware transcoding is a no-go.  Also, if your BIOS has an AUTO option for the primary graphics adapter, make sure that is not selected.  Your iGPU must be the primary graphics adapter.

Share this post


Link to post
23 minutes ago, TheBlackPitcher said:

default menu.c32
menu title Lime Technology, Inc.
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append initrd=/bzroot i915.alpha_support=1
label unRAID OS GUI Mode
  kernel /bzimage
  append initrd=/bzroot,/bzroot-gui i915.alpha_support=1
label unRAID OS Safe Mode (no plugins, no GUI)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label unRAID OS GUI Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot,/bzroot-gui unraidsafemode
label Memtest86+
  kernel /memtest

Yes like this.

 

After that, reboot.

 

 

Thanks!. 

 

I did that but I'm not sure if it fixed anything. 

 

Playback is still a no-go. If it's any help I'm trying to transcode HEVC to H264. But I think I'm getting a bit of contradictory info from Plex (probably just me not understanding what it means). 

 

image.png.ef47e2af218eb61f4c6bf112aeeb0a14.png

 

According to that, the stream is using HW encoding. 

 

From the logs, however, I get a `HW device failed` error but then it looks like it starts with hardware decoding. Maybe the 6700 iGPU isn't fast enough?. 

 

root@Vault:/config/Library/Application Support/Plex Media Server/Logs# cat * | grep "hardware transcoding"
Mar 29, 2018 15:52:56.652 [0x14b1737ff700] DEBUG - Codecs: hardware transcoding: testing API qsv
Mar 29, 2018 15:52:56.678 [0x14b1737ff700] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Unknown error occurred
Mar 29, 2018 15:52:56.678 [0x14b1737ff700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Mar 29, 2018 15:52:56.681 [0x14b1737ff700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Mar 29, 2018 15:52:56.682 [0x14b1737ff700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Mar 29, 2018 15:52:56.788 [0x14b17a3fd700] DEBUG - TPU: hardware transcoding: using hardware decode accelerator vaapi
Mar 29, 2018 15:52:56.792 [0x14b17a3fd700] DEBUG - TPU: hardware transcoding: zero-copy support present
Mar 29, 2018 15:52:56.792 [0x14b17a3fd700] DEBUG - TPU: hardware transcoding: not using zero-copy because subtitle burning is required
Mar 29, 2018 15:52:56.792 [0x14b17a3fd700] DEBUG - TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi

 

 

9 minutes ago, Hoopster said:

 

OK, looks like the appropriate drivers are there, but, just to make sure, do you have "onboard", "iGFX" or whatever your BIOS calls it set as the primary graphics adapter?  If not, the drivers may be present, but, they will not be loaded at system boot. If you have a PCIe graphics card and it is set as the primary, hardware transcoding is a no-go.  Also, if your BIOS has an AUTO option for the primary graphics adapter, make sure that is not selected.  Your iGPU must be the primary graphics adapter.

1

 

 

There's no dedicated GPU in that server but I'll check later to see if the BIOS is set to auto or something other than specifically selecting the iGPU. 

 

Thanks!. 

Share this post


Link to post

Skylake can only decode hevc up to 8bit in hardware.

H264(hw) means that it encodes the video in hardware, but the decoding is not hardware, thats why you dont have hevc(hw).

Edited by TheBlackPitcher

Share this post


Link to post
43 minutes ago, TheBlackPitcher said:

Skylake can only decode hevc up to 8bit in hardware.

H264(hw) means that it encodes the video in hardware, but the decoding is not hardware, thats why you dont have hevc(hw).

 

Ah, I didn't know that. Then that's most likely the issue as the info for what I'm trying to decode says... 

Codec HEVC
Bitrate 53049 kbps
Bit Depth 10

 

 

Well, at least I got actual HW acceleration in Plex working for other stuff... I think haha. 

 

I will still look into making sure the iGPU is set as the primary device in BIOS once I figure out where I left that keyboard I had around. 

 

Thanks guys!. 

Edited by Laucien

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.

Sign in to follow this