Silver Fang

Plex hardware transcoding not good

Recommended Posts

Hi,

Bought Plex Lifetime Pass to be able to use hardware transcoding.

When I enable hardware transcoding the video is barerly playing (lagging alot) but audio seems ok, and CPU is less than 3% on the NAS.

When I disable hardware transcoding, video and audio plays fine, but CPU is around 97% on the NAS.

Im playing on my iPad Mini 4 with the Plex app.

 

Any idea whats wrong?
Playing 1080p .mkv anime episodes thats not really big in file size, max 2GB but it doesnt matter if its 300MB.

 

Xpenology (Synologys +918)

Case: Chieftec Compact Series IX-01B Mini-ITX
PSU: Chieftec AC Power Adapter CDP-085ITX 85W
Motherboard: ASRock J4105-ITX - Intel Gemini Lake - Intel Onboard CPU socket - DDR4 RAM - Mini-ITX
Memory: Corsair Vengeance SO-DIMM DDR4 2400MHz 2x4GB (CMSX8GX4M2A2400C16)
Hard drive: Seagate Barracuda ST4000LM024 128MB 4TB
USB stick: SanDisk USB 3.1 Ultra Fit 16GB

 

Thanks in advance

Share this post


Link to post
Share on other sites

What is important for hardware transcoding is the codec file was transcoded with. Use mediainfo and check the file. What may cause the problem is color depth.

Share this post


Link to post
Share on other sites

When I SSH with cat /usr/syno/etc/codec/activation.conf it shows:

{"success":true,"activated_codec":["mpeg4part2_enc","h264_dec","h264_enc","mpeg4part2_dec","aac_dec","aac_enc","vc1_dec","vc1_enc","hevc_dec","ac3_dec"],"token":"26e42f20ea913ecb6237e691394c6d77"}

 

Tried 4 different anime videos:

 

1. (Works with and without transcoding)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3
Format settings : CABAC / 5 Ref Frames
Format settings, CABAC : Yes
Format settings, RefFrames : 5 frames
Codec ID : V_MPEG4/ISO/AVC
Bit rate : 1 276 kb/s
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.173
Stream size : 224 MiB (90%)
Writing library : x264 core 120 r2164 da19765

 

2. (Works with and without transcoding)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings : CABAC / 16 Ref Frames
Format settings, CABAC : Yes
Format settings, RefFrames : 16 frames
Codec ID : V_MPEG4/ISO/AVC
Bit rate : 4 192 kb/s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.506
Stream size : 740 MiB (90%)
Writing library : x264 core 125 r2200 999b753

 

3. (Video is lagging when "Use hardware acceleration when available" is ticked)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 10@L5.1
Format settings : CABAC / 15 Ref Frames
Format settings, CABAC : Yes
Format settings, RefFrames : 15 frames
Codec ID : V_MPEG4/ISO/AVC
Bit rate : 7 584 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.153
Stream size : 1.36 GiB (84%)
Writing library : x264 core 142 r2431kMod ac76440

 

4. (Video is lagging when "Use hardware acceleration when available" is ticked)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings : CABAC / 8 Ref Frames
Format settings, CABAC : Yes
Format settings, RefFrames : 8 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 24 min 53 s
Bit rate : 1 730 kb/s
Width : 720 pixels
Height : 540 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.186
Writing library : x264 core 146 r2538 121396c

Share this post


Link to post
Share on other sites

When running "cd /dev/dri" nothing happens, only a new line to enter command.

But when enter "cd/dev/dri" with no space or "dev/dri" it says "-sh: cd/dev/dri: No such file or directory".

 

Any ideas whats wrong?

Maybe my motherboard not supporting hardware transcoding?

 

Edit:

The 2 videos that Plex app are struggling with, either by lagging when hardware transcoding is enabled or using 97% CPU, the 2 videos is working fine in Video Station with max 50% CPU.

 

 

Edited by Silver Fang

Share this post


Link to post
Share on other sites

You would be unable to check the box for hardware transcoding on Plex if it was not working in some capacity.

Plex does not use the syno codec activation (you bought Plex Pass to unlock the hardware transcoding support for that product).

 

To clarify, the existence of /dev/dri lets you know that an Intel i915 driver has initialized the hardware.  "ls /dev/dri"

The driver may not be working well with the version of QuickSync embedded your J4105 silicon, or Plex itself may not like the J4105 hardware or driver.

 

You can try and change the i915 driver by modifying extra.lzma

Or, take it up with Plex.  It's their software.

Edited by flyride

Share this post


Link to post
Share on other sites

On a separate note, why do you need to transcode at all with the iPad Mini, it's got better than 1080p resolution so it should not need to.  Are your client settings correct to not force transcoding unless required?  Also, you might be transcoding audio which does not use Quicksync hardware?

Edited by flyride

Share this post


Link to post
Share on other sites
11 minutes ago, flyride said:

On a separate note, why do you need to transcode at all with the iPad Mini, it's got better than 1080p resolution so it should not need to.  Are your client settings correct to not force transcoding unless required?  Also, you might be transcoding audio which does not use Quicksync hardware?

 

I thought I could watch movies with Plex on my iPad Mini 4 and not having the NAS run on 97% of the CPU, if I have hardware transcoding enabled.

Share this post


Link to post
Share on other sites
35 minutes ago, Silver Fang said:

I thought I could watch movies with Plex on my iPad Mini 4 and not having the NAS run on 97% of the CPU, if I have hardware transcoding enabled.

 

If the stream does not require transcoding then your CPU usage will be negligible.

Share this post


Link to post
Share on other sites

So let me understand this, im a noob, sorry for that.

In Plex server settings I have these settings:

For "Disable video stream transcoding" I have the box unchecked/disabled.

 

For "Use hardware acceleration when available", if I have the box checked the videos is lagging, if unchecked the videos play fine but with high CPU to 97%.

 

For "Use hardware-accelerated video encoding" I have the box checked/enabled.

 

Shouldn't I be able to have both  (last 2 above) enabled and it should only be used when required?

 

I have the latest Plex version and have restarted it.

 

When I run SSH I got 'Permission denied'.

admin@SilverFang:/$ rm  "/volume1/@appstore/Plex Media Server/lib/dri/iHD_drv_video.so"
rm: remove write-protected regular file ‘/volume1/@appstore/Plex Media Server/lib/dri/iHD_drv_video.so’? Y
rm: cannot remove ‘/volume1/@appstore/Plex Media Server/lib/dri/iHD_drv_video.so’: Permission denied
 

When I try with sudo rm it says 'No such file or directory'.

admin@SilverFang:/$ sudo rm  "/volume1/@appstore/Plex Media Server/lib/dri/iHD_drv_video.so"
Password:
rm: cannot remove ‘/volume1/@appstore/Plex Media Server/lib/dri/iHD_drv_video.so’: No such file or directory
 

 

 -Disable video stream transcoding

Disable transcoding of the video stream in transcoder operations. With this set, the transcoder may still transcode audio as well as remux video.

 

-Use hardware acceleration when available

Plex Media Server will attempt to use hardware-accelerated video codecs when encoding and decoding video. Hardware acceleration can make transcoding faster and allow more simultaneous video transcodes, but it can also reduce video quality and compatibility.

 

-Use hardware-accelerated video encoding

If hardware acceleration is enabled, this controls whether it's used for encoding, in addition to decoding.

Share this post


Link to post
Share on other sites

Enable user (you) on Plex shared folder in Permissions to access Plex folder. On Plex server side you are ok, but, on player side (Ipad4) you should enable Direct stream, play. And, I'm not sure that you should remove the file you are trying to remove.

Share this post


Link to post
Share on other sites

HW transcoding doesnt work with that driver. There are many topics about hw transcoding on gemini lakes. Just keep searching. Have a same MB and 6.2.1 dsm and everything works and so yours should as well

Edited by premikkoci

Share this post


Link to post
Share on other sites
31 minutes ago, premikkoci said:

HW transcoding doesnt work with that driver. There are many topics about hw transcoding on gemini lakes. Just keep searching. Have a same MB and 6.2.1 dsm and everything works and so yours should as well

 

Didnt know if Plex Server issue, the Plex app, the iPad or the movies.

Thanks a lot, will check on the driver.

Share this post


Link to post
Share on other sites
On 2/7/2020 at 2:16 PM, premikkoci said:

HW transcoding doesnt work with that driver. There are many topics about hw transcoding on gemini lakes. Just keep searching. Have a same MB and 6.2.1 dsm and everything works and so yours should as well

 

I still havent figured it out what driver to use, where I can find what driver I have now?

Is it the driver for the motherboard?

 

Im using:

DSM Version 6.2.1-23824 Update 6

Bootloader 1.04b

 

When I SSH to see if transcoding is working I get this:

Could not chdir to home directory /var/services/homes/admin: No such file or directory
admin@SilverFang:/$ cd /dev/dri
admin@SilverFang:/dev/dri$ cat /usr/syno/etc/codec/activation.conf
{"success":true,"activated_codec":["mpeg4part2_enc","h264_dec","h264_enc","mpeg4                                         

part2_dec","aac_dec","aac_enc","vc1_dec","vc1_enc","hevc_dec","ac3_dec"],"token":

"26e42f20ea913ecb6237e691394c6d77"}

 

Are these 2 video files working for you smoothly with hardware acceleration on in Plex?

https://www.dropbox.com/s/25zwkyvpbemc5hx/Test.mkv?dl=0

https://www.dropbox.com/s/akkngy10bn0ham8/SF%20Test.mkv?dl=0

 

Thanks in advance

Share this post


Link to post
Share on other sites

Does /dev/dri/ contain any files?

 

You use correct dsm version and bootloader. So hw transcoding should work without any doubts.

Share this post


Link to post
Share on other sites
Posted (edited)
10 hours ago, premikkoci said:

Does /dev/dri/ contain any files?

 

You use correct dsm version and bootloader. So hw transcoding should work without any doubts.

 

How do I see if it contains any files, by SSH?

 

Do you have the same motherboard, DSM, bootloader and Plex thats hardware trancoding working for you?

 

Shouldnt I be able to have the trancoding in Plex box ticked, and when its needed the transcoding should do the work?

Now its either have it ticked with video lagging, or unticked with playable video but high CPU usage.

 

Thanks in advance

Edited by Silver Fang

Share this post


Link to post
Share on other sites
Posted (edited)
3 hours ago, EVOTk said:

 

Hello,
There is no need to manually delete the file.

https://forums.plex.tv/t/ram-on-1-18-7-2415/542849/14

In Preferences.xml, add VaapiDriver="i965"

 

Thank you s much, its working fine now.😀

Now the CPU usage is up to 70% depending the video files, and in iPad I choosed to show it in 720P only.

 

Download Text Editor in Package Center.

Stop Plex Media Server and uninstall it in Package Center.

Download and install Plex Media Server again (im using the latest PlexMediaServer-1.18.7.2457-77cb9455c-x86_64)

Go into Control Panel -> User and give your account read/write permission for Plex.

In File Station you will be able to see the Plex folder now. Find the .xml file and add VaapiDriver="i965" at the end before /> and save it.

example mine ended like this: WanTotalMaxUploadRate="74000" VaapiDriver="i965"/>

The box "Use hardware acceleration when available" in Plex can now be ticked.

 

Thanks once again for the help from everyone

 

Edited by Silver Fang

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.