I started Plexing with a 202T which worked very well for almost a year. I converted all of my media to Plex Friendly containers and codecs to get it working well. I decided I wanted some more horsepower, so upgraded to a 7004T this spring. This is truly a nice machine after getting a lot of bugs worked out of the system.
So before someone says XYZ update "bricked" my Plex install, here are a few ways to start looking at what's really going on and help others help you.
Requirements:
To delve into this, there are things you are going to need. This section will cover them.
WinSCP: A shell client app that runs on Windows XP through Windows 10. This gives a file manger view as well as a terminal window to run apps on your NAS without the ADM overhead. Asustor doesn't include this as part of the software suite you get with the NAS. They don't feel you need access to the file system or the ability to run apps on your NAS without going through Asustor's App Central. This is such a basic and essential tool, it's almost criminal it's not included with the NAS on purchase.
Plex Media Server: You can get this from the Asustor App Central or download a more up to date version from Plex's website and manually install in App Central. Asustor has an approval process for any apps in App Central and it is notoriously slow on getting versions up to date. PMS updates regularly, so get familiar with doing a manual install through App Central. You are better served getting PMS from Plex's own site.
ffmpeg: Required only if you are running conversion scripts for your media. This converts the media from whatever file container or codec it is currently in, into one more Plex Friendly. Clinton Halls CP scripts use this as well, and the scripts I use are based on his.
Mapped Ports/Port Forwarding/Static IP: Forget about EZRouter. This is a method that router manufacturers use to allow people to run dedicated servers through their internet connection. It is buggy and fraught with problems. Troubleshooting a server issue starts and ends with static IP and port forwards. If you intend to run Plex remotely or share with people outside of your home you need a mapped port on the server side as well as port forwarding on your router for stable consistent connections.
PlexPy: (For historical tracking of watched media) PlexPy tracks who has watched what, when and how it was sent to them. Plex doesn't include this information, so the only way to track it is to actually have the browser open when someone is streaming something without PlexPy. To install this you also need to install Python from App Central.
File Locations:
Asustor puts it's installed apps and the log files for those apps in folders hidden from the ADM file manager. You can't even see log files without using WinSCP or something similar. These are the paths to the files you will need to either examine logs or back up history files:
Plex Media Server Logs: The log files are located here: /volume1/Plex/Library/Plex Media Server/Logs You cannot get to this with ADM's file manger and symlinking doesn't work. WinSCP is the only way to get to this folder. Generally, the only file needed for current sessions is this one: Plex Media Server.log. The other files have to do with things like deep scans, scan reports and limited historical. If you are like me, the DLNA logs will be zero byte files. (DLNA is problematic when your libraries start getting BIG!)
Watched Status: The biggest advantage to using Plex over other media streaming apps is it tracks multiple user's watched status. This status is NOT tracked with most DLNA clients. This status info is tracked in the main database, and can be backed up within Plex's server settings to a location of your own choosing. The main database file can be located here: /volume1/Plex/Library/Plex Media Server/Plug-in Support/Databases You need WinSCP to get to these files.
Plex Start-Stop.sh: This is the actual script that starts the Plex Media Server on the device. It can be found here: /volume1/.@plugins/AppCentral/plexmediaserver/CONTROL You can NOT get to this without WinSCP. There are some modifications to this file needed if you are getting a specific startup error. More on that later!
Cron file: I'm going to refer to this several times in the course of this thread, so I'm going to tell you how to get to it here. It's located at: /volume0/usr/builtin/etc/crontabs and the file is the only one in the folder. It's root with no extension. This is a simple text file and requires WinSCP to access. I just use WinSCP to edit as well.
Assorted scripts: I have scripts for doing media conversions from downloaded sources, PlexPy install, Maraschino (which is currently broken on the Asustor implementation of Python.) As well as various other scripts I want to use, including testing scripts, scripts to check if Plex is running, etc. These are all located here: /volume1/misc I don't need WinSCP to get to these files, but it is handy to modify the scripts contained here using it.
Media Handling:
Plex Media Server shares media to Clients. It is a true Client/Server suite. You basically need both portions to make things work. The server software and the client software. If you don't have a Plex Pass, some of the applications are going to cost you a bit of money. iOS and Android run about $5 client. Buying one does not give you the other. A Plex Pass can be purchased on a monthly, yearly or lifetime basis. You can get more information from Plex's site as to costs, and what clients are available for both Pass and non-Pass users.
There are three ways media is sent to the client:
Direct Play: This is a straight file copy from one device to the other. No conversions are done as none are needed.
Direct Stream: The media is really close to what the client requires for Direct Play, but something is just not right. There are small conversions to the media stream before it is sent out to the client. This is usually not terribly CPU intensive. (I seldom have Direct Stream sessions.)
Transcode: This is a full blown conversion of the media from one file container or codec to another. It is extremely CPU intensive, Plex currently doesn't have any hardware acceleration code in their conversions so it is strictly SOFTWARE BASED. If you don't have at least a 700x series NAS your device CANNOT HANDLE a 1080p stream. None of the newer models are capable of handling the transcoding. The only model that can is the 700x with the i3 CPU in it.
Troubleshooting Plex startup:
Initial Startup: I already pointed you to where the startup script is located. Refer above to it if you don't remember. There are a couple of edits I do to this file every time Plex updates. First off, for some reason Plex seems to start up faster than the system can follow sometimes. So I put a sleep 15 command in the file. I also include a restart section which calls the do-stop and then the do-start in case Plex hangs on me. I have a script running every 20 minutes to make sure Plex is running, and if not it calls the restart. The error that requires the sleep timer is Error: Unable to set up server: basic_string::_S_create If you are getting this error, add in the sleep line here:
Code: Select all
do_start() {
sleep 15
check_asdir()
ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
(cd $PLEX_MEDIA_SERVER_ROOT ; sleep 3 ; ./Plex\ Media\ Server &)
return 0
Code: Select all
case "$1" in
start)
do_start
;;
stop)
do_stop
;;
restart)
do_stop
sleep 15
do_start
;;
Local Access: Generally local access issues are going to be problems with accessing the NAS itself. If you can get to your NAS with the following: http://your.internal.IP.here:8000 then getting to the Plex Media Server is going to be: http://your.internal.IP.here:32400/web If you haven't set up your NAS with a static IP you are going to need to do that in order to make port forwarding work for remote access.
Remote Access: Remote access REQUIRES a static IP and ports forwarded through your router for CONSISTENT connections. If you haven't done this, get a copy of your manual for your router and either ask someone to help you or figure it out yourself. I use the myasustor ddns service so I can access my Plex Server as well as the NAS ADM via something like this: http://myidhere.myasustor.com:8000 (ADM) and http://myidhere.myasustor.com:32400. Almost EVERY problem I have helped people with, both on these forums and on Plex's forums for remote access it's solved by static IP and port forward. There was a couple of problems with other networking issues. Things locked out on the ISP side. That was out of the gambit of what we could fix.
You can test if the port is open via several on-line port checking tools. I'll let you look them up yourself.
Video buffering/stuttering:
This was the BIGGEST reason I started this whole post. I made a post a while back about the different CPU's Asustor uses in their various models and what it means for transcoding Plex. (I think it's part of my signature here, even.) This looked at each NAS' CPU passmark score and compared it to Plex's published requirements of 1500 for 720p and 2000 for 1080p transcodes. There is currently only ONE MODEL that supports this requirement! That is the 700x series with over 5000 passmarks.
If you don't have this model of NAS and you are trying to transcode a 1080p stream even locally it is going to buffer! The NAS can't keep up with a real time transcoded stream. It is converting the video as fast as it can, but still slower than you are trying to watch it at. So, how was I able to use a 202T with the smallest CPU Asustor put in any of their various models? I converted the videos over to a Plex Friendly file format and video/audio codecs before I gave them to Plex to serve!
What that means is simple. I ran either Handbrake or some specialize conversion scripts on every file to make sure they were an MP4 with H264 video stream and AAC audio in the first track and no embedded subtitles. On EVERY file! As long as I was watching the movie/show on a network connection that could support the bandwidth requirements of the show it was just like watching it in RT on TV without commercials!
If you are buffering when watching a specific file, try converting that file using Handbrake to MP4, H264, AAC audio and maybe AC3 audio in the second audio stream and see if it still buffers. Odds are great it won't. If it does, then you likely have networking issues. Some things to look at then get rid of wireless connections, stopping all torrenting and stopping all games and test again.
I'm thinking of building on this posts with some more specifics of how my conversions work, renaming files, etc. But this is already pretty long winded. If someone wants to know, ask in this thread or send a PM.
BTW, I have over 1600 movies and well over 12K (Yes, that's 12,000+) TV episodes I stream to 25 users across remote and local access. I've had 7 simultaneous streams going at one time on my 7004T and 5 streams the highest on my 202T. With NO BUFFERING since setting up my media correctly!