2160 / Buffering - best settings?

I have had plex for many years and just replaced my tv to a 4K 65" Samsung, Its connected to an Nvidia Shield.

The server I have which is remote to me is AMD Threadripper 1950X 16 Core, with 64GB Ram and a Geforece GTX 970.

I dont have any issues with 1080, 720 etc - they are all fine. However I am having buffering issues with it, I have got a 250Mbps download here where I want to view the files, and 1GB feed where the server is.

Clearly the issues Im having is down to the files, my question is what should I acutally be changing them to in handbrake.

I played with one file, Which now shows Video - Transcoding H264 (hw) to H264(hw) and Audio Direct Stream.
I dont get why its transcoding to / from the same codec ?

Any help is really appreciated, as I think I have ruled out network and hardware.

Media

Video Resolution 4K
Duration 2:04:23
Bitrate 18630 kbps
Width 3840
Height 1920
Aspect Ratio 1.85
Container MP4
Video Frame Rate 24p
Web Optimized No
Audio Profile lc
Has 64bit Offsets true
Video Profile main

Part

Duration 2:04:23
File JurassicWorld-X264.mp4
Size 16.19 GB
Audio Profile lc
Container MP4
Has 64bit Offsets true
Web Optimized No
Video Profile main

Codec H264
Bitrate 18462 kbps
Bit Depth 8
Chroma Location left
Chroma Subsampling 4:2:0
Color Primaries bt709
Color Range tv
Color Space bt709
Color Trc bt709
Frame Rate 23.976 fps
Height 1920
Level 4.0
Profile main
Ref Frames 1
Stream Identifier 1
Width 3840
Display Title Unknown (H.264 Main)

Codec AAC
Channels Stereo
Bitrate 168 kbps
Language English
Audio Channel Layout stereo
Profile lc
Sampling Rate 48000 Hz
Stream Identifier 2
Display Title English (AAC Stereo)

View XML

Naming:
Follow Plex naming conventions: Movie Name (Year).extension. Jurassic World (2015).mp4 (or .mkv). Yeah, I’m being picky, but using non-standard naming can cause issues.

H264:
H264 Main@4.0 won’t handle 4K. You’ll need High@5.0 or maybe 5.1. In Handbrake, set Encoder Profile = High & Encoder Level = Auto.
Always check “Web Optimized” box in Handbrake when using mp4 container (on Summary tab).

H265:
Also, look at H265 instead of H264. You’ll get higher compression and will need less bandwidth. Will help reduce any problems with Internet congestion when streaming remotely.

Try the Roku 2160p30 preset in Handbrake as a starting point. Can use either MKV or MP4 container. Shield is good with either. Leave Dimension & Video tabs at default. Adjust audio as needed to work with your audio system (AAC, AC3, etc).

As a test, pick a short chapter & transcode. Then load into PMS and check results. Adjust as needed.

Nvidia Shield:
On Shield Plex client, set Display Information = On. When playing movie, pull up on-screen overlay (pause, etc). You’ll see status in upper left corner. Will show if video is Direct Play / Direct Stream / Transcode. If Direct Stream or Transcode, will provide a reason. Can help when troubleshooting problems.

@FordGuy61 I have had a quick poke about on the net and not found the Roku Preset - I dont suppose you have a copy do you ??

Thanks for the advice so far Im testing as you have suggested, and will post back with results and a thank you (Hopefully)

It is included with latest version of Handbrake.

I’ll double check things when back at computer later this afternoon.

That last one must of made me look stupid, however removed Handbrake and reinstalled with new version - and then the preset is there and lots of them !

So far no joy, although I did copy one of the updated files to a local Qnap and installed plex on that - Streamed perfectly… I dont get why it has to try and transcode when its remote - does not make any sense.
Im intending on moving the server just to test, and then play from the local server (Was remote) and see if it works …

In PMS, check Settings -> Server -> Remote Access.

What do you have for Internet Upload Speed and Limit Remote Stream Bandwidth?

First should match the uplink speed at the server, 1000 Mbps (1Gbps).
Set second to Original (No Limit).

What does the Information Overlay show on the Shield when playing movie from remote PMS? Does it give a reason for the transcode?

Check Shield TV settings as well.

Video Quality
Adjust Automatically = off
Internet Streaming = maximum

Audio Quality
Internet Streaming = original

I have noticed that my 4K movies will buffer very often if the overall bitrate is over 40 Mbps, so I have been reencoding them using Handbrake and I had used my own preset based on some trial and error. Also note: BACKUP YOUR ORIGINAL FILES. :wink:

Summary Tab
Format: .mkv

Dimensions Tab
Cropping: Automatic (although on some of my movies it didn’t cut the top and bottom bars off the movie and I had to adjust this to 264-280 top and 264-280 bottom)
Anamorphic: Automatic
Modulus: 2

Filters Tab
Everything off except Deinterlace, which is set to Decomb/Default/Default

Video Tab
This is where I had made most of my tweaks.

  • Video Codec: H.265 10-bit
  • Framerate: Same as source, Peak Framerate
  • Quality: Constant Quality, RF18 (you will have to play with the RF because you can also move it to 20 to save on space and not lose much quailty)
  • Optimise Video:
  • Encoder Preset: Fast
  • Encoder Tune: None
  • Encoder Profile: Main 10
  • Extra Options: strong-intra-smoothing=0:rect=0:level-idc=5.1:hdr:hdr-opt:chromaloc=2

Audio Tab
You can add any of them you want, but to set your “standard”, I would suggest clicking on “Selection Behavior” and then making the modifications there.


Selection Behavior Screen:

  • Track Selection Behaviour: All Matching Selected Languages
  • For Additional Tracks: Use All Tracks as Templates
  • Choose Language: English
  • Auto Passthru Behavior: all checked
  • Fallback Encoder: AC3

Automatically Add Tracks

  • Codec: Auto Passthru
  • Codec: AAC (avcodec), Bitrate, 384, mixdown: 5.1 channels, Samplerate 48, DRC 0, Gain 0
  • Save

And then for each “English” audio track, it would add the Auto Passthru and a mixdown of 5.1. For stereo tracks, it automatically changes the setting from 5.1 channels to either Dolby Surround or Stereo.

Subtitles Tab
this one is a bit tricky, because sometimes you have to run your files through Subtitle Edit and/or MKVToolNix to fix up or add good subtitles. Once they’re in place, I always set my “Selection Behavior” to the following:

  • Track Selection Behavior: All Matching Selected Languages
  • Burn-In Behavior: Foreign Audio Track
  • uncheck Add Closed Captions when available
  • check Add Foreign Audio Scan
  • Choose Language: English
  • Save

With these files being very large, I choose to burn in the foreign audio subtitles so Plex doesn’t have to waste processor transcoding the subtitle track. As always, you’ll have to check to make sure your foreign audio scan is working properly and actually burning in the correct subtitles. :slight_smile:

Chapters Tab
I usually leave this one to defaults.

I named my Custom Preset “HDR h265 v1”

After running my ginormous 4K movies through these encoding settings, the file size is normally cut in half and the overall bitrate is reduced to something under 30Mbps. For instance one of my movies went from 64Mbps to 19Mbps Overall Bitrate, file size from 58GB to 17GB. However, it’s still 2160p and HDR, and it now plays on my Plex Server to my Roku 4K without buffering or stalling.

Not sure if this was what you were looking for, but this is how I used Handbrake to fix my buffering issue. I am now going through each of my 4K movies and running 8-10 in a batch at a time. Gonna take a while but it does a pretty good job running in the background.


Plex Server: MSI Z370 Gaming Pro Carbon; Intel Core i7-8700k; 16GB DDR4 3600Mhz; Win10 Pro; MSI GTX 1060 Aero ITX 6G OC; Intel Pro/1000 PT Dual Port Server Adapter