Jump to content
linuxserver.io

[Support] Linuxserver.io - Plex Media Server

4450 posts in this topic Last Reply

Recommended Posts

This is actually a question about the Plexinc docker for Plex Media Server, but I can't find a support topic for that version, just this one.

 

I wanted to know if there are any settings that would reduce buffering and micro-stuttering?  I think I have it set to play the original stream, and the info on playback says it is original (1080p blu-ray rips to MKV).  So no transcoding or anything like that happening.

 

For background, I've been running multiple unRAID servers for 10 years now.  They feed Dune Media Players and I have really had zero complaints using those for a decade now.  But Dune is pretty much obsolete and DFI is unsupported.  I've had to make several patches now to DFI code just to keep API's scraping.

 

So I want to move to something more modern.  So as a test case, I have setup my PC and one Nvidia Shield 4K with both Plex and Kodi.

 

I installed Plex Media Server on my unRAID via docker.  The two Kodi installs are just using separate local indexes for the time being.  The two boxes are getting Plex data from the media server. Both use Gigabit Ethernet, not Wi-Fi.  All media files are on the same server as the Plex docker.

 

My problem is that Plex buffers every minute or two, and has these 2-3 second microskips (playback just skips ahead) when it is playing. It probably buffers for nearly a full minute at the start of a movie, before even attempting to start playback.  Content is pretty much unwatchable.  However, the same content played back with Kodi is perfect.  The Kodi playback starts pretty much instantly (just the HDD spin up time, if required).

 

This is happening on both the PC and the Shield TV.  I know too many people use Plex for this to be a problem for everyone.  Is Plex, even if not transcoding, heavily dependent on unRAID CPU?  For low power consumption, I use some lower end CPU's in unRAID (Sempron 145's).  But this has never been a problem for the Dune's and doesn't seem to matter for Kodi either.

 

I will also add that memory consumption goes to 90% when playing back through Plex, with the media server running.  Hoevers at 81% with Plex running, but no stream playing.  With the server off, memory is about 50% used when playing a Kodi stream. 

 

However, I also get flawless Kodi playback the Plex Media Server running (about 86% RAM usage).

 

My playback issues seem to be a Plex problem, but I have no idea what it could be.  Can anyone help?

 

Other than these playback issues, Plex is great for management, but I will have to toss it if playback is going to buffer.

 

 

Share this post


Link to post
9 minutes ago, KYThrill said:

This is actually a question about the Plexinc docker for Plex Media Server, but I can't find a support topic for that version, just this one.

I think this would be better addressed in the Plex forum since this isn't even an unRAID docker.

https://forums.plex.tv/

Share this post


Link to post
6 minutes ago, wgstarks said:

I think this would be better addressed in the Plex forum since this isn't even an unRAID docker.

https://forums.plex.tv/

It's offered through unRAID's Community Applications, so why is it included if unRAID community doesn't want to discuss it?

Share this post


Link to post
10 minutes ago, KYThrill said:

It's offered through unRAID's Community Applications, so why is it included if unRAID community doesn't want to discuss it?

Everything on docker hub is offered through CA. It also has a link to the proper support which I posted earlier.

 

I honestly don't care where you discuss this one. Was just offering some advice on how you might best get answers about it. Asking people who don't use the docker seems like a dead end to me.

Share this post


Link to post
Posted (edited)
1 hour ago, KYThrill said:

It's offered through unRAID's Community Applications, so why is it included if unRAID community doesn't want to discuss it?

If you run the offical Plex container, please use their support forum. Or if you think this is an unraid issue, open a topic in the general support subforum.

Edited by saarg

Share this post


Link to post

Well, I think I figured out the issue, and it has nothing to do with the docker.  I tested the network connection up to 75 Mbs connection from the server to player, so no reason to think it is a network bottleneck.  The max possible bit rate for any type of Blu-ray is 54 Mbs.

 

But what is happening is that Plex is direct streaming the video (no transcode), but it is transcoding the audio on the fly.  It doesn't appear that my Sempron's have enough juice to handle the audio transcoding.  Most of these Blu-ray rips have DTS-HD or TrueHD 5.1/7.1 audio.  Both players are just connected to 2.0 audio devices, so Plex is trying to transcode before streaming and then probably trying to do some sort of sync betwen direct video and transcoded audio.

 

However, the Dune and Kodi accept the full audio stream, and their hardware would mux down to 2.0 to pass to the TV.  So the server doesn't need to handle this task.

 

 I guess unless I up the CPU's or add a GPU to the system to help transcoding, Plex is out as an option.  I guess I can investigate Emby...  Apparently you can disable transcoding on Emby.

Share this post


Link to post

Not really the end of the world but unRAID keeps saying there is a new update for this Plex docker even if I just updated it. Sorry if this has been discussed previously (didn't find it).

 

image.thumb.png.f7ee5eb5243b1fbccbf195347f8c0eb6.png

Share this post


Link to post
4 hours ago, dnLL said:

Not really the end of the world but unRAID keeps saying there is a new update for this Plex docker even if I just updated it. Sorry if this has been discussed previously (didn't find it).

 

image.thumb.png.f7ee5eb5243b1fbccbf195347f8c0eb6.png

What version of unRAID do you have installed?

Share this post


Link to post
Just now, wgstarks said:

What version of unRAID do you have installed?

 

Just now, wgstarks said:

What version of unRAID do you have installed?

Nevermind, I see it in your screenshot. Try updating to 6.8. There was a bug in one of the 6.7 RC’s.

Share this post


Link to post

Hey folks I have a question about a library being unavailable.  Using the lsio docker in unraid 6.8, not sure when this happened, however, the content for one of my libraries says unavailable.  Permissions and paths etc..all match up and the files are still there are work through shares.  It was fine before so not sure what's changed or how to fix it.  Any ideas?

Share this post


Link to post
8 minutes ago, Mogo said:

Using the lsio docker in unraid 6.8, not sure when this happened

So this might have happened when you were on an earlier version of Unraid?

Share this post


Link to post

possible i was on 6.7 went to 6.8 and then nvidia 6.8 all within the last 2 weeks.  This issue though could of happened before that or during the os upgrade window not sure.

Share this post


Link to post
3 minutes ago, Mogo said:

possible i was on 6.7 went to 6.8 and then nvidia 6.8 all within the last 2 weeks.  This issue though could of happened before that or during the os upgrade window not sure.

The reason I ask is because there were reports of database corruption on earlier version, seemed to be related to user shares, since it didn't affect people who had appdata specified with a disk path. Supposedly fixed on 6.8.

Share this post


Link to post
2 minutes ago, trurl said:

The reason I ask is because there were reports of database corruption on earlier version, seemed to be related to user shares, since it didn't affect people who had appdata specified with a disk path. Supposedly fixed on 6.8.

I heard something about that.  I thought if the appdata folder resided on the cache drive you were ok?  Which is how mine is.

 

Would my solution be to remove the library from plex and then re-add it?  trying to scan for new files doesn't seem to work.

 

Share this post


Link to post
5 minutes ago, Mogo said:

I thought if the appdata folder resided on the cache drive you were ok? 

Not a question of which disk appdata is on, but instead how you specify the path in the docker mapping. /mnt/cache/appdata doesn't involve the user shares, /mnt/user/appdata does, even if the share is completely on cache.

Share this post


Link to post
3 minutes ago, trurl said:

Not a question of which disk appdata is on, but instead how you specify the path in the docker mapping. /mnt/cache/appdata doesn't involve the user shares, /mnt/user/appdata does, even if the share is completely on cache.

So i just checked the Plex docker paths and they are all setup as /mnt/user/xxx

Share this post


Link to post

As I said fixed on 6.8 so if you had corruption perhaps it was earlier. I'm not sure how to fix since I have not had it. I'm sure you could fix it by deleting appdata for plex and starting over but don't know if anything less drastic can be done or not. Maybe something on the plex forums.

Share this post


Link to post

One last thing then.  I'm going to try restoring from a database backup that plex does every 3 days.  Unfortunately that last backup was a year ago.  I figure this would save some work and is less time consuming than starting from scratch (As an aside I've read on the net that if the plex db backup's stop, it's probably due to database corruption). 

 

Anyways instructions say to stop plex and basically rename com.plexapp.plugins.library.db-2019-01-01 to com.plexapp.plugins.library.db.  If I stop the plex docker then how to I do this, since I can't get into the docker?

Share this post


Link to post
Posted (edited)

@Mogo, The below may be able to help you.

 

I had quite a few issues setting up Plex initially. 

At first it was simple to get it going. content added fine. everything was working correctly.

The next day, "Server Unavailable".... great.

I did quite a lot of research and learnt quite a bit. This is what I learnt.

- IPv6 should be disabled, can cause some instability and trouble accesing the service.

Settings -> General -> Network

image.png.876f7d26f33d2951251f8264906c9ad3.png

 

- Set the appdata folder specifically to 1 drive. This way, unraid can't move it around in the bachground and destroy links.

Edit Docker -> Advanced View -> Show More Settings.

image.png.81290dacd6786f81b13003a9d3152855.png

 

- Install the "Krusader" Docker Container. This will allow you to navigate to the appdata folder.

image.png.4d47eaf90ac4c0d94350ad2ba63aadf9.png

 

- I don't like to wait the full 3 days usually, so I'll stop Plex, open Krusader, navigate to this folder, make a copy of the library.db file, name it library.db-2020-01-07 for example.

If i have a corruption issues later, i'll rename the existing library.db to library.ob-old.

Find my latest backup, copy it, rename to ......library.db

Start Plex, and that fixes the problem every time. if it doesn't I just use the backup before.

 

- If you want to make sure that the DB is corrupt, open the live logs.

(Click on the Docker -> Logs)

image.png.37ebdef56fe91462d851e655064f74e8.png

This is what i'd call "Normal"

When you see

Starting Plex Media Server
Starting Plex Media Server
Starting Plex Media Server
Starting Plex Media Server
Starting Plex Media Server
Starting Plex Media Server
Starting Plex Media Server

It's corrupt.

 

 

I'm explaing all of these in as simple term I know in the hopes that this would help many people out there.

I'll be honest, it's not the easiest thing to setup if you're a semi-cleanskin.

I've been there.
But once you get it all setup and working, my gosh is it fantastic.

 

If you have any more questions, just ask. :)

Edited by JT24
Only half of the post.

Share this post


Link to post
8 hours ago, Mogo said:

One last thing then.  I'm going to try restoring from a database backup that plex does every 3 days.  Unfortunately that last backup was a year ago.  I figure this would save some work and is less time consuming than starting from scratch (As an aside I've read on the net that if the plex db backup's stop, it's probably due to database corruption). 

 

Anyways instructions say to stop plex and basically rename com.plexapp.plugins.library.db-2019-01-01 to com.plexapp.plugins.library.db.  If I stop the plex docker then how to I do this, since I can't get into the docker?

the database files are stored on your /appdata folder ... so u should be able to access them anyhow ...

stop docker, rename like described, start docker

 

from the unraid cli as sample

image.thumb.png.24acc89f0c323091e936e00dddcdcae4.png

Share this post


Link to post

@JT24, @alturismo, thanks for the info.  I didn't know about turning IPv6 off or about assigning the appdata folder for plex to 1 drive.  Krusader I have installed and didn't think about using it that way.  Makes it much easier to navigate.  When I look at the docker logs for plex it looks like how you have it, however, the database has to be corrupted if I have stuff unavailable.  So I will try a db restore and see what happens.

Share this post


Link to post

Looking for advice on where to look at debugging an issue I have...

I have the Plex container setup and it works fine on my LAN and everything plays fine.

I have the Open VPN AS container setup and that works fine (I cannot connect, access unraid web GUI, PLEX web GUI).

I have remote access to PLEX disabled as I do not want anything directly open to the internet.

 

When I connect to the VPN on my Android phone then the PLEX app seems to connect to the server, I can browse all my media and play music.   Attempting to play any video however I am just getting a "Playback has stopped because the connection to the Plex Media Server has b een lost.   Please ensure the server is available and retry" error.   I see all the metadata for the video and it quite happily plays theme tunes etc so it is obviously connecting just not playing.

 

I did come across a few suggestions to drop the quality setting and that would solve it but even dropping the quality to 320p in the app gives me the same error.   The files are mainly SD DVD rips as MKV.  The same files play quite happily on the my local network.

 

I cannot see anything on the PLEX side and I only see this quite unhelpful error in the app.

 

Anyone able to point me in the right direction or have an idea about how I might debug this?

Share this post


Link to post

How are you trying to connect to it?
Via the device name or IP
 

What connection are you using when connecting to your VPN?
Cellular or wlan/lan

Share this post


Link to post

Quick question about the Nvidia driver thing.  Once I install the plugin and update the PLEX docker that all that needs done correct?   All future unraid and PLEX docker updates work like normal right, I don’t have to keep manually updating it.  

Share this post


Link to post
1 hour ago, squirrellydw said:

Quick question about the Nvidia driver thing.  Once I install the plugin and update the PLEX docker that all that needs done correct?   All future unraid and PLEX docker updates work like normal right, I don’t have to keep manually updating it.  

The question has been answered many times in the thread for the Nvidia plugin, if that is what you are referring to. That plugin actually installs a custom build of Unraid, and any time Unraid is updated you have to wait for the custom build to be updated then apply that update. Go read the first posts in that thread.

 

You can go directly to the correct support thread for any of your plugins by clicking on its Support Link on the Plugins page.

Share this post


Link to post

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.