SOLVED Plex buffering while fast-forward on Apple TV 4K?

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
I recently switched from TrueNAS CORE to SCALE, while on CORE I never had buffering issues while fast-forwarding through a 1080p video. On SCALE, after 3 rapid 10 seconds forward clicks the movie is buffering. Apps are running on a dual SSD pool, dedicated for apps only, the NAS has 192GB of RAM and 24 processors. Before I used to press 100 times to fast-forward 10 seconds each time with zero buffering while running Plex on a CORE jail. I tried adjusting the app memory and CPU to high values like 8 processors and 16GB of RAM, with no changes. I also added another container, even if I know it will not change anything. It feels like the new Plex container is restricting downloading in advance a fair amount of data, like the jail used to do? I'm connected with an Ethernet cable from NAS to Apple TV 4K. Network is not an issue, I can transfer data on Apple TV connector endpoint at 106MB/s, I tested it with my laptop. Anyways, is obvious something changed with TrueNAS SCALE containers.

What would be the fix to this issue? This is a fresh Plex install, I did not applied any customizations to Plex server.
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
What would be the fix to this issue? This is a fresh Plex install, I did not applied any customizations to Plex server.
Did you customize the install on core?... have a careful look and compare your settings on both... it could be that some of your options are causing the files to transcode rather than direct play, which would make you much more sensitive to buffering during scrubbing.
 

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
Did you customize the install on core?
No, everything was default in CORE and also now on SCALE. On CORE, I created a jail with default parameters and installed plexmediaserver package inside. Into Plex server, I remember I enabled hardware acceleration even if it was not supported, and that was it. On SCALE setup, I run containers through Kubernetes which limit the CPU and memory, but also the bandwidth, I believe?
some of your options are causing the files to transcode rather than direct play
I believe that is the case, although the video plays without issues. Only when I forward, it is buffering, which is quite annoying. I don't have anymore the old setup so is impossible for me to compare the Plex settings. I have a backup of the old Plex directory, but I think the settings are stored directly on Plex Pass account.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
The fastest way to figure it out is to start something playing, then go to the plex web console and look at your dashboard (from the activity circle in the top right)... then click the show details button up and to the right of the item that's playing and you should be able to see if it's direct playing or transcoding... then work from there to see if settings changes are needed to have you direct playing again.
 

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
I'll try that in few hours when I get home. Should I set anything specific into container memory and CPU, or leave everything default as it is now.

Edit: @sretalla is direct stream for both audio and video. So is not transcoding issue.

Screen Shot 2022-06-22 at 11.21.27 AM.png


Edit: Related to Direct Stream:
 
Last edited:

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
Some pieces of media have “defects” that impact video scrubbing. If you made these yourself, did you change your process? Have you tried remuxing or ever re-encoding the file to see if it changes? Even trying a piece of media that you know previously worked perfectly would confirm.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Well, close, but still not quite there...

1655927716257.png


What you're seeing is still a form of transcode and isn't direct play...

The difference?

Direct stream breaks apart the stream on the Plex Server and feeds it to the client as audio and video streams separately.

Direct Play just feeds the file contents to the player, Plex doesn't open up the file contents on the server end, the client does it all.

Given you're in direct stream territory, you can either focus on getting out of it, or look at options to improve your situation...

Maybe the transcode location isn't on an ideal media in your SCALE setup? I'm still using a CORE jail for mine, but I pass through a RAMdisk for transcode which makes things go much better.

I haven't yet dug into it, but I think one of the options in TrueCharts apps is to provide a RAMdisk... worth a look if you go down that route.
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
Hostpath map /tmp to /transcode
Specify /transcode in plex settings transcoder section under transcoder temporary directory
 

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
I remember now that on old setup I had the transcode into RAM. On SCALE iI see these container settings that can allow you to create a Ramdisk:

Screen Shot 2022-06-22 at 9.00.44 PM.png


On CORE I used to mount the jail's /transcode to /mnt/software/transcode which was a Ramdisk.

Edit: Is actually quite simple, I see /tmp inside container is a Ramdisk:
Code:
kah@plex-776d8b6d78-sf9g8:/$ df -ahT /tmp
Filesystem     Type   Size  Used Avail Use% Mounted on
tmpfs          tmpfs   32G  2.0G   31G   7% /tmp


I'll set the transcode path to /tmp/transcode and check.

Edit2: Actually, setting it to /tmp is best, it creates the /Transcode dir inside:
Code:
kah@plex-776d8b6d78-kn5gv:/$ ls -lah /tmp/transcode/
total 0
drwxrwsr-x 3 kah  kah 60 Jun 22 21:18 .
drwxrwsrwt 4 root kah 80 Jun 22 21:18 ..
drwxrwsr-x 3 kah  kah 60 Jun 22 21:18 Transcode


Edit3: I see the transcoded files present into Ramdisk:
Code:
kah@plex-776d8b6d78-c9g4w:/usr/lib/plexmediaserver$ ls -lah /tmp/Transcode/Sessions/plex-transcode-85E20B7B-62D6-478D-8F69-1F73B6C4C46B-89ea30f6-0a54-4451-b2be-8959c311f716/
total 138M
drwxrwsr-x 2 kah kah  480 Jun 22 21:28 .
drwxrwsr-x 3 kah kah   60 Jun 22 21:27 ..
-rw-rw-r-- 1 kah kah 4.6M Jun 22 21:27 media-00037.ts
-rw-rw-r-- 1 kah kah 8.2M Jun 22 21:27 media-00038.ts
-rw-rw-r-- 1 kah kah 3.3M Jun 22 21:27 media-00039.ts
-rw-rw-r-- 1 kah kah 7.1M Jun 22 21:27 media-00040.ts
-rw-rw-r-- 1 kah kah 5.3M Jun 22 21:27 media-00041.ts
-rw-rw-r-- 1 kah kah 6.5M Jun 22 21:27 media-00042.ts
-rw-rw-r-- 1 kah kah 4.5M Jun 22 21:27 media-00043.ts
-rw-rw-r-- 1 kah kah 5.6M Jun 22 21:27 media-00044.ts
-rw-rw-r-- 1 kah kah 7.0M Jun 22 21:27 media-00045.ts
-rw-rw-r-- 1 kah kah 7.2M Jun 22 21:27 media-00046.ts
-rw-rw-r-- 1 kah kah 7.1M Jun 22 21:27 media-00047.ts
-rw-rw-r-- 1 kah kah 7.0M Jun 22 21:27 media-00048.ts
-rw-rw-r-- 1 kah kah 6.1M Jun 22 21:27 media-00049.ts
-rw-rw-r-- 1 kah kah 4.6M Jun 22 21:27 media-00050.ts
-rw-rw-r-- 1 kah kah 8.6M Jun 22 21:27 media-00051.ts
-rw-rw-r-- 1 kah kah  13M Jun 22 21:27 media-00052.ts
-rw-rw-r-- 1 kah kah 6.0M Jun 22 21:27 media-00053.ts
-rw-rw-r-- 1 kah kah 6.5M Jun 22 21:27 media-00054.ts
-rw-rw-r-- 1 kah kah 6.9M Jun 22 21:27 media-00055.ts
-rw-rw-r-- 1 kah kah 5.9M Jun 22 21:27 media-00056.ts
-rw-rw-r-- 1 kah kah 5.9M Jun 22 21:28 media-00057.ts
-rw-rw-r-- 1 kah kah 2.5M Jun 22 21:28 media-00058.ts

While there is an improvement, now I press 6 times the 10 seconds fast forwarding button, before buffering occurs. I also tried disabling completely the transcoding, I get the same results. The traffic when I press 6 times the fast-forward:

Screen Shot 2022-06-22 at 9.27.24 PM.png


I reach 76Mbit, which is nothing as bandwidth? To me this looks like a pod resources limitation.

That's the only issue I have, other than that the performance is superb with SCALE versus CORE. Plus the applications setup is a breeze, so much potential running Kubernetes.
 
Last edited:

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
Just a thought. If you placed the media on a local ssd or RAM disk, added that to a new plex library, on your existing plex server and play that copy, that would be valuable to know
 

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
If you placed the media on a local ssd or RAM disk, added that to a new plex library, on your existing plex server and play that copy, that would be valuable to know
I understand the logic behind but I never had any buffering issues with same media and using same hardware setup, tv, Apple TV 4K and NAS. The only thing I changed was migrating from CORE jails to SCALE containers. Jails were previously created on same dual SSD based tank, because I like to separate apps running on SSD's versus media intended for plain storage on platter disks. Nothing really changed beside the OS.
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
Core and Scale do not have the same performance characteristics, nor do they have the same options to throttle app resources. Scale, with its kubernetes core, also uses more resources, for its own purposes, leaving less for your apps. I don’t think you can expect things to behave identically. Ps I do the same, I have apps on ssd and media on HDD. I happen to have a brand new Apple TV so I can try as well
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Just as a thought - from a non-expert. A container, unlike a jail is limited in the resources it can use, memory and CPU. Have you tried upping the available resources to the container
Look under:
1656024515162.png

setting higher RAM / higher max CPU might make a difference or it might not
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
just following up to say that I watched some stuff tonight and no matter how many times I skipped forward on my Apple TV , I was not able to cause this to happen.
 

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
I figured the issue, it is quite simple. You need to make sure in your Apple TV Plex Settings, the Auto Adjust Quality is set to Off and both Home and Internet Streaming are set to Maximum. Setting the Internet Streaming to a value like 1080p will still case issues:

IMG_1912.jpeg

With Auto Adjust Quality On:

IMG_1910.jpeg

With Auto Adjust Quality Off and both Home and Internet Streaming set to Maximum:

IMG_1914.jpeg
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
Good Info! That explains why I don't see this issue, those are the settings I use.
 
Top