Update unRaid Server for 4K Video Streaming


cypres0099

Recommended Posts

I've been trying to get my home theater setup for 4K streaming using Plex Media Server on my LG OLED65B7A TV and Fire TV Cube

 

There are a lot of compatibility issues with 4K h265 HEVC and TrueHD Audio that's causing all sorts of problems. I'm working on figuring these out on the client side, but... These problems can be mitigated somewhat on the server side by transcoding the files to 4K h264 and AAC using Plex, whenever a compatibility issue arises.  The problem is that my CPU does not have native h265 decoding and isn't fast enough to handle it with just CPU power.

 

I currently have a motherboard with an FM2/FM2+ socket.

 

So I'm looking to either:

 

1. Replace CPU with one that has native h265 decoding

2. Adding a GPU with native h265 decoding (would this even work for streaming to a plex client?)

3. Replacing the Motherboard and CPU if there are no FM2/FM2+ CPUs with native decoding.

Thoughts on this path for optimizing my unraid server for 4k streaming?

Link to comment
1 hour ago, cypres0099 said:

I've been trying to get my home theater setup for 4K streaming using Plex Media Server on my LG OLED65B7A TV and Fire TV Cube

 

There are a lot of compatibility issues with 4K h265 HEVC and TrueHD Audio that's causing all sorts of problems. I'm working on figuring these out on the client side, but... These problems can be mitigated somewhat on the server side by transcoding the files to 4K h264 and AAC using Plex, whenever a compatibility issue arises.  The problem is that my CPU does not have native h265 decoding and isn't fast enough to handle it with just CPU power.

 

I currently have a motherboard with an FM2/FM2+ socket.

 

So I'm looking to either:

 

1. Replace CPU with one that has native h265 decoding

2. Adding a GPU with native h265 decoding (would this even work for streaming to a plex client?)

3. Replacing the Motherboard and CPU if there are no FM2/FM2+ CPUs with native decoding.

Thoughts on this path for optimizing my unraid server for 4k streaming?

If you have a Plex Pass Option 2 (bold above) is the way to go.
Add an nvidia graphics card that supports 4k h265 transcoding (see here: https://developer.nvidia.com/video-encode-decode-gpu-support-matrix
Switch to unraid-nvidia and add the nvdec wrapper and you are off to the races. Soon the wrapper won't be needed, either.

  • Upvote 1
Link to comment
2 minutes ago, Xaero said:

Switch to unraid-nvidia and add the nvdec wrapper and you are off to the races. Soon the wrapper won't be needed, either.

Awesome, I do have Plex Pass! Thanks for the direction, @Xaero.  I don't totally understand the quoted section above. What is unraid-nvidia? And is there a tutorial for adding the nvdec wrapper?

Link to comment
18 minutes ago, cypres0099 said:

Awesome, I do have Plex Pass! Thanks for the direction, @Xaero.  I don't totally understand the quoted section above. What is unraid-nvidia? And is there a tutorial for adding the nvdec wrapper?

Unraid Nvidia is a custom build of Unraid made by the LinuxServer.io team. Note that while it is unraid, it is customized and therefore not directly supported by LimeTech. This post covers how to install and use it.

The next tidbit about my script for the nvdec wrapper - it's actually extremely easy to use - you just add it as a userscript using the CA userscripts plugin and set it to run after your normal updates:
https://github.com/Xaero252/unraid-plex-nvdec

And finally, as far as choices with VMs;
VMs can get a little nasty with this setup. For one, if you decide to pass the nvidia GPU to your VM - docker will lose control of it until the VM is stopped, at which point any containers that want to use it will need to be restarted to see it again. If you wanted to use an nvidia graphics card for virtualization pass thru you'd typically want a Quadro card - although newer consumer cards are a bit easier to get working.

 

I'd also wait until other users respond to this thread, as their opinion may be different than mine - and it is important to weigh your options before comitting to a significant expenditure.

For example, a capable intel CPU with 4k QuickSync support and board may be similar in price in your area to a GPU. If this is the case, QuickSync is far superior to nvdec/nvenc, and you won't be passing that part of the CPU through to any containers. If you can cheaply obtain a GPU it is more affordable/effective to just add a GPU to your existing setup. 

So to somewhat retract on my previous statement ( I hastily posted without considering locale )  - if it's cheaper to buy a GPU and add it to your current system - I'd go that route. If it's cheaper or the same price to go intel and get a CPU that supports QuickSync 4k transcoding - I'd go that route. My system does not have QuickSync support, and I often wish it did, as that would free a PCI-E slot or this GPU for passthru.

 

  • Upvote 1
Link to comment
3 minutes ago, Xaero said:

Unraid Nvidia is a custom build of Unraid made by the LinuxServer.io team. Note that while it is unraid, it is customized and therefore not directly supported by LimeTech. This post covers how to install and use it.

The next tidbit about my script for the nvdec wrapper - it's actually extremely easy to use - you just add it as a userscript using the CA userscripts plugin and set it to run after your normal updates:
https://github.com/Xaero252/unraid-plex-nvdec

And finally, as far as choices with VMs;
VMs can get a little nasty with this setup. For one, if you decide to pass the nvidia GPU to your VM - docker will lose control of it until the VM is stopped, at which point any containers that want to use it will need to be restarted to see it again. If you wanted to use an nvidia graphics card for virtualization pass thru you'd typically want a Quadro card - although newer consumer cards are a bit easier to get working.

 

I'd also wait until other users respond to this thread, as their opinion may be different than mine - and it is important to weigh your options before comitting to a significant expenditure.

For example, a capable intel CPU with 4k QuickSync support and board may be similar in price in your area to a GPU. If this is the case, QuickSync is far superior to nvdec/nvenc, and you won't be passing that part of the CPU through to any containers. If you can cheaply obtain a GPU it is more affordable/effective to just add a GPU to your existing setup. 

So to somewhat retract on my previous statement ( I hastily posted without considering locale )  - if it's cheaper to buy a GPU and add it to your current system - I'd go that route. If it's cheaper or the same price to go intel and get a CPU that supports QuickSync 4k transcoding - I'd go that route. My system does not have QuickSync support, and I often wish it did, as that would free a PCI-E slot or this GPU for passthru.

 

 

Ok, this is starting to make sense. Thanks for laying it out like that. 

 

I'll admit that I'm a little intimidated about reinstalling a custom version of unRaid. I've been using unraid for 9 or 10 years, but I'm still a little shakey with the technical maintenance. Would replacing the motherboard and CPU require a fresh install?

 

I wonder... would I run into problems using and Nvidia card on an AMD chipset if I went the unraid-nvidia route? 

 

I'll wait to see if a few more people would like to chime in, as you suggested.

Link to comment
3 minutes ago, cypres0099 said:

Would replacing the motherboard and CPU require a fresh install?

No.  I have replaced the MB, CPU and RAM in my unRAID server on several ocassions and unRAID boots up as before from the same flash drive.  The only thing that may need to be reconfigured after a hardware swap is any VMs using hardware passthrough.

  • Upvote 1
Link to comment
2 hours ago, cypres0099 said:

I've been trying to get my home theater setup for 4K streaming using Plex Media Server

 

My Intel CPU has Quicksync support and I use it for Plex hardware transcoding.  It works very well and can handle multiple simultaneous transcodes.  However, keep in mind that you need a Kaby Lake or Coffee Lake generation CPU (the 7x00, 8x00 and 9x00 series) for full 4K support.  My Skylake Xeon only partially supports 4K HEVC.  I will need to upgrade for 4K. 

 

The bigger issue is that Plex does not currently handle 4K HDR content very well. Colors are washed out and faded.

 

Whether or not a motherboard/CPU swap or just a GPU is needed depends on price and what you need from your server.

 

A good primer on 4K with Plex:

 

https://forums.plex.tv/t/plex-4k-transcoding-and-you-aka-the-rules-of-4k-a-faq/378203

Edited by Hoopster
  • Upvote 1
Link to comment
1 hour ago, Hoopster said:

 

That was a great primer @Hoopster. If I was following that to the letter, I wouldn't even be bothering to find a solution to decode/encode/transcode in 4k. If that's true (and I follow that advice) what is the benefit of having a 4K capable processor?

 

If I was following that primer to a T, the simplest thing for me to do would be to get an Nvidia shield, yes?

 

1 hour ago, Hoopster said:

The bigger issue is that Plex does not currently handle 4K HDR content very well. Colors are washed out and faded.

 

Oh yeah, that is a big issue. So any time Plex transcodes h265 4k to h264 4k, it would lose the HDR and get washed out, right? That's a bummer because most of my content is ripped in HDR.

Link to comment
15 minutes ago, cypres0099 said:

If I was following that primer to a T, the simplest thing for me to do would be to get an Nvidia shield, yes?

Yes, as the Shield is considered the most powerful, most capable client device that handles most formats on the client side so no transcoding is needed.

 

Most will not follow that to a T and need a server capable of some 4K transcoding and, thus, a 4K capable CPU/iGPU or discrete GPU.

 

Currently, any transcoding of 4K HDR to SDR is going to result in washed out color due to color mapping issues.  There is hope that Plex will eventually address that but the whole 4K thing is new enough that addressing every piece in the chain is taking some time.  By the time everyone figures it out, we'll be on to 8K!

Link to comment

Just use the unRAID for storage. I have many Terabytes now of my 1:1 UHD MKV rips. As well as many Terabytes of UHD BD ISOs. 

I have an 8th gen core i5 PC dedicated to Plex UHD content(I also have a core i3 4th gen PC dedicated to Plex HD content).

The UHD PLex PC can access all my rips from my unRAIDs. My three unRAIDs use very old hardware. HP N40L and N54L Microservers. Then I use Shield TVs(and ATV 4Ks) for playback of the UHD/HDR content. It plays back flawlessly on my Shield TVs(or ATV 4Ks) over my LAN in UHD/HDR. Or I can play them back over my UHD Rokus or FireTV 4Ks sticks. Although those devices will direct play the UHD/HDR video, but the audio is transcoded to 7.1 DD+. While the SHield TVs will Direct play both the audio and video. Since it just bitstreams the Atmos and DTS:X audio. And the ATV 4K will decode the audio to 7.1 pcm.

 

53TB unRAID1a--49TB unRAID2--76TB unRAID3

Edited by aaronwt
Link to comment
  • 4 weeks later...
On 8/8/2019 at 12:57 PM, cypres0099 said:

Any more opinions out there about the best course of action for ensuring unraid offers the best 4k experience?

 

I direct play stream H265 HDR Atmos on my i3-3220T CPU no issues. That’s a very old 3rd gen CPU. My 4K media is in a separate folder just for me not shared to other family members out of state they don’t care for it. It’s also to keep it from being accidentally played by other media devices since my server is not capable of transcoding it. Using nVidia Shield 2017 it direct plays without transcoding. unRAID dashboard 1% to 2% CPU usage because nVidia Shield is handling transcoding. If you use subtitles and Plex has to burn subtitles in then Plex has to do some transcoding you will get error Plex isn’t fast enough. I don’t use subtitles so I’m okay with it. 

FireTV Stick 4K direct plays as well no issues.

Apple TV 4K Plex when I tested a few months ago H265 HDR direct plays but Apple doesn’t allow Atmos via apps only their iTunes 4K movie streaming service. I heard they were supposed to open it to 3rd party with future firmware update.

 

Once I upgrade my server I will probably go Quicksync or nVidia which ever one supports 3 or 4 simultaneous 4K transcoding.

 

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.