6.9.2 - Plex HW transcoding, low GPU usage and buffering


Recommended Posts

I'm running Unraid 6.9.2 on an Intel J4105. I've been trying to get HW transcoding in Plex to work correctly, with mixed results. h264 seems to work fine but HEVC/h265 doesn't seem to be working. 

 

Here are the steps I've taken so far:

  • Added "modprobe i915" and "chmod -R 777 /dev/dri" to go file.
  • Added "--device=/dev/dri:/dev/dri" as extra parameter for Plex container.
  • Installed plugin "Intel GPU TOP".
  • Enabled HW transcoding in Plex server settings.

 

The attached screenshots are from Plex dashboard, Unraid CPU and GPU usage, Tautulli and the file information in Plex. The last screenshot is CPU/GPU usage while transcoding a h264 file, which seems to utilize the GPU.

 

What I'm concerned about is the GPU usage seems to be very low while CPU usage is high (see attached screenshot), which I feel like would indicate that something isn't right, as HW transcoding should utilize Intel QuickSync? Or is my setup too weak to transcode this file?

 

 

Screenshot_36.png

Screenshot_37.png

Screenshot_38.png

Screenshot_39.png

Screenshot_40.png

Edited by marmeladmax
Link to comment
  • marmeladmax changed the title to 6.9.2 - Plex HW transcoding, low GPU usage and buffering

The screenshots indicate that both video decoding and video encoding are hardware accelerated. However, the GPU can only transcode the video stream. What it can't do is re-wrap from MKV to MP4, transcode the audio or burn in subtitles - they all use the CPU and the CPU also has to feed the GPU with data. I don't know what you were expecting to see but it looks about right to me. Try turning off the subtitles and see how much of a difference it makes.

 

  • Thanks 1
Link to comment
9 minutes ago, John_M said:

The screenshots indicate that both video decoding and video encoding are hardware accelerated. However, the GPU can only transcode the video stream. What it can't do is re-wrap from MKV to MP4, transcode the audio or burn in subtitles - they all use the CPU and the CPU also has to feed the GPU with data. I don't know what you were expecting to see but it looks about right to me. Try turning off the subtitles and see how much of a difference it makes.

 

Removing the subtitles does seem to work. I understand that the GPU only can transcode the video stream, but what I think is strange is that the GPU load is so low. Shouldn't the load be higher when transcoding video?

 

However, removing subtitles (and using an external srt) seems to bump up the GPU usage to expected levels and the video now plays fine.

Link to comment
  • 3 weeks later...
  • 3 months later...

I was also encountering buffering issues in Plex even though it was using hardware transcoding. The GPU had low usage, too. After searching around, It looked like there are issues with the iHD Intel drivers with my Gemini Lake j4115 CPU. After deleting the iHD driver, the buffer problem disappeared for me.

 

If you on Gemini Lake or other Intel CPU using QuickSync, try running this to remove the driver in the Plex container.

 

docker exec --it bash
rm /usr/lib/plexmediaserver/lib/dri/iHD_drv_video.so

 

To fix this permanently, download the following script to /appdata/plex/custom-cont-init.d/

https://gist.github.com/nairbspace/6afed439e244332f088fbee6b2bbd973

 

https://github.com/linuxserver/docker-plex/issues/228

Edited by sodennis
Link to comment
  • 8 months later...
On 8/13/2021 at 8:12 AM, sodennis said:

I was also encountering buffering issues in Plex even though it was using hardware transcoding. The GPU had low usage, too. After searching around, It looked like there are issues with the iHD Intel drivers with my Gemini Lake j4115 CPU. After deleting the iHD driver, the buffer problem disappeared for me.

 

If you on Gemini Lake or other Intel CPU using QuickSync, try running this to remove the driver in the Plex container.

 

docker exec --it bash
rm /usr/lib/plexmediaserver/lib/dri/iHD_drv_video.so

 

To fix this permanently, download the following script to /appdata/plex/custom-cont-init.d/

https://gist.github.com/nairbspace/6afed439e244332f088fbee6b2bbd973

 

https://github.com/linuxserver/docker-plex/issues/228

Hi,

 

I cannot find any folder named "/appdata/plex/custom-cont-init.d/", should I create it there or should it exists already? 

 

71172062_Sanstitre-1.thumb.png.e22c4b4f6200d1232cf4c23e46c078d8.png

Link to comment
  • 1 month later...
On 8/13/2021 at 8:56 AM, opentoe said:

I made a ramdisk just for transcoding and it's almost instant. You can use a ramdisk for so many things. That's why I always install lots of memory in every machine I have. This program here rocks.

 

https://sourceforge.net/projects/imdisk-toolkit/

 

 

You are not impliyng that @sodennis solution does the same, correct? Because I/O doesn't seem to be the problem.
I'm running a Win10 VM with plex using hardware acceleration (transcoding) on a NVIDIA Quadro P2000 and this are the stats:
CPU - 15%

Memory - 19%

Disk - 0%
Ethernet - Sent: 20.3   Received: 57.8 (I have a 1 gb internet connection but I'm testing locally)
GPU - 18% :

3D - 1%
Copy - 0%

Video Encode - 7%

Video Decode - 18%

Dedicated GPU memory usage - 1GB out of 5
Shared GPU memory usage - 0.2 out of 8GB


Reading from the array at 14 MB/s maximum
I have the understanding that the max is at least 80 MB/s from an array full of 7200rpm HDDs


I have no idea why whould it buffer o.O

Link to comment
  • 1 month later...

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.