Monday, December 20, 2021

Plex Sucks! or Building a Better Media Server

Update 9/29/22

Over the last several months, I've been having increasingly frequent problems with my TV streaming. I had a Chromecast with GoogleTV plugged into the TV, and a Bluetooth transmitter that used the aptx low latency codec connected to the TV via optical fiber. I also had some Bluetooth earbuds that used the aptx low latency codec so the audio and video stayed in sync (a problem with my Sony WH-H1000 headphones I got from Costco a few years ago).

The problems I was having with TV streaming were buffering issues with the dreaded spinning circle of dots showing up and interrupting almost everything I tried to watch, whether it was streaming YouTube or Netflix via Wi-Fi, or coming from my Jellyfin server. When I didn't have the circle of dots, I had very low quality video. My Jellyfin server couldn't stay connected and was often unwatchable.

When I was seeing problems, Chromecast always reported excellent signal strength. I'd stream the same video on my computer that is wired directly to the router and there were no issues. So the problem seemed to be the Chromecast dongle. I tried factory reset and it didn't help. 

Now I'm wondering if the problems I was having casting video from VLC on my computer to the Chromecast dongle (see the original post, below) were because the Chromecast was starting to crap out.

I did a little research and decided to replace the Chromecast. I ordered an Nvidia Shield TV Pro (NSTP). The NSTP replaced the Chromecast and the Bluetooth transmitter, and even with my Sony Bluetooth headphones that don't have the the low latency codec, audio and video are in perfect sync. Best of all, the video is now perfect, and my Jellyfin server streams perfectly again.

I don't know what happened to the Chromecast- it worked well when I first started using it, but performance degraded to where it was unusable. So, if you're going to run you own server or just stream video to your old TV via Wi-Fi, get the Nvidia Shield TV Pro!

Now back to the original post:



I've been using Plex Media Server to stream video from a computer on my home network to my TV for years. It started out OK, but sometime in the last few years they decided to become a media streaming empire, requiring annual fees and connection to their servers even if I just want to stream stuff from my local HDD. The real kicker is the frequent re logins required. I use TFA with a Yubi key to access my passwords stored in Lastpass. That makes re logging in to Plex a major PITA, especially if I'm sitting in front of the TV with only my phone. To make matters worse, the web address that appears on the TV for logging into Plex doesn't actually work. I don't want any of Plex's streaming services. Why should I have to keep re logging into Plex and paying them an annual fee to access media on a computer on my own network? 

I was frustrated, and tried using VLC on my main computer to cast video to the Chromecast With GoogleTV dongle on my TV, but it was very unreliable. 

I decided to look for an alternative to Plex and casting via VLC. Searching the term "plex sucks" brings up many hits. It seems I'm not the only one who dislikes Plex. After a bit of digging, I found a pretty good replacement that will stream video from a local HDD to the Roku and Chromecast dongles I have on my TVs. It's called Jellyfin

With a media server there are a few things to consider: 

Can it stream high bit rate video/audio reliably to the targeted receivers? Does the audio (i.e. surround sound) work when streaming video? How do you get media files into the server?

I'll consider each below.

1) Streaming high bit rate video

I did some searching for Jellyfin hardware requirements and couldn't find much specific info, but did find several comments in forums from users who were using relatively low performance computers (even RPi!) to stream 4k video successfully. 

The old Plex server was an ancient desktop PC that used a lot of power, took up a lot of space, and had a bunch of noisy fans. For the new server I decided to try a Dell Optiplex 3020 Micro that I picked up at work when they swapped out all the desktop computers. It has a core i5 processor and 4 GB of RAM.

The server with cover off. The HDD is supposed to fit into a plastic carrier that snaps into place, but this 15mm thick drive won't fit into the carrier.

The server closed up. It's about 7" square and 1.5" high (180x180x38mm)- very small!


Before springing for a big HDD, I wanted to test the whole system to see how hard it would be to set up and if it would reliably stream video to my TV, so I installed an old 250 GB HDD. The Jellyfin web site listed compatible operating systems, and I chose Ubuntu Server 20.04.3 LTS to minimize OS overhead (no GUI, no office apps, etc.). 

I downloaded Ubuntu server using a torrent, then made made a bootable USB thumb drive with the disk image using Rufus. I'm not linux master, so I followed instructions for installation on the ubuntu web site, then updated all the OS software, and finally followed step by step instructions at this site to install Jellyfin.

As soon as I got Jellyfin working I put a few media files on the OS HDD and set up the libraries in Jellyfin and tested it. Yes, it worked. In fact, the defaults for everything except audio worked without any messing around. The UI on a web browser and on the TV was great! Jellyfin pulls metadata on the media files from the web and displays everything as well as Plex ever did.

2) Does audio work when streaming video?

I ran into one problem when sending files to a Chromecast dongle on one TV. Chromecast couldn't understand the DTS surround audio streaming from Jellyfin. Chromecast is OK with Dolby Digital (AKA AC3), and Dolby ATMOS. I had to set Jellyfin to mix the DTS surround audio down to stereo for Chromecast to play any sound from files that had DTS audio. Files that used variants of Dolby encoding worked fine as direct stream. It would be nice if there was an option to have Jellyfin do that mix down automatically. The audio mixdown is selected from the Jellyfin home screen settings menu, so it's easily accessed when needed.

3) Getting files to the server

The server is located in the basement at my house and operates headless, so I need to transfer files to it from another computer via the network. The other computer is a Windows machine so I installed filezilla and used sftp to transfer files from my desktop machine to the server. It works perfectly, and very fast.

I use Secure Shell in a web browser to log into the server remotely to do things like update software, etc.

Additional notes:

The Dell computer I chose to use is very nicely made. It's really small, and everything snaps in securely without tools, and there aren't any cables to mess with. Very nice! Except.... the HDD fits into a plastic carrier that snaps into the enclosure. The carrier can only accommodate 2.5" drives up to 9 mm thick, like those used in laptops. The 4TB drive I ordered is 15mm thick. It fit the connector just fine, and didn't prevent the case from closing, but wouldn't fit the bracket, so I cut a piece of foam rubber and put it under the drive to support the free end, then closed the case. I probably wouldn't want to pick up the case and shake it, but short of doing that, the drive isn't going to move.

The computer has a couple USB3 ports, so if I need to go beyond 4TB of storage, I'll add it externally.

I ran into one problem after I installed the 4TB drive and Ubuntu and Jellyfin. When you install Ubuntu server it uses as much HDD space as it needs and leaves the rest of the drive unprovisioned. I discovered this when I tried to transfer a bunch of media files to the drive and transfers kept failing. It was running out of space! Once I realized what was happening, I reinstalled Ubuntu server and this time, when it was provisioning the storage, I made sure to include the empty space on the drive. Yes, I know, there are several ways to do it without reinstalling the OS, but that was easier and faster than trying to figure out how to do it using Grub or other disk manager.

I am sure there are ways to do it, but I did not attempt to set up remote access/streaming from my server across the web. 




9 comments:

  1. Hi Mark, Sorry for disturbing you but I'am building a coreXY 3D printer based on your UMMD. I have a question about the Ondrive gear, on both sides of the 8mm drive rod you have turnable/adjustable end caps, any idea what the purpose is of these shields ? Hopefully you can help me.

    ReplyDelete
    Replies
    1. I assume you are referring to the two collars on the shaft on either side of the gearbox. Those are not entirely necessary- they keep the shaft centered in the gear box. The shaft has a key and if it slides out of the keyway, it may fall out and the shaft would no longer be coupled to the gearbox. More importantly, the key is small, and easily lost. The pulleys/bearings at either end of the shaft will probably prevent the shaft from sliding out of the gearbox, so strictly speaking, the collars are not needed. They were mostly useful to keep from losing the key before the Z axis was assembled.

      Delete
    2. Hi Mark, Thank that you took the time to respond to me but I don't know if we are talking about the same. I want to send you a picture to be more clear but I don't know how to share pictures with you, any suggestion ?
      Thanks up front.

      Regards,

      Frank Martens from The Netherlands

      Delete
    3. There are pillow block bearings at each end of the 8mm shaft that support the shaft and keep it from flexing under belt tension. The Z axis drive pulleys are located just inside the bearings.

      I suggest you look at some of my blog posts on the Z axis and post additional questions on one of the appropriate UMMD pages. That way more people will see your posts and my responses.'

      See: https://drmrehorst.blogspot.com/2017/07/ultra-megamax-dominator-z-axis-design_65.html
      and
      https://drmrehorst.blogspot.com/2019/04/more-changes-to-ummds-z-axis.html

      You can email me at marky.rehorsty@gmaily.comy (delete the Y's)

      Delete
    4. The 'end caps" Frank was referring to are on the gearbox itself. They are rings held in place by screws. Those are there to adjust the contact between the worm and disc gears to minimize backlash and come set from the factory. I have never adjusted them and should never need to.

      Delete
  2. I have a QNAP server with HDMI output and am wondering if somehow I could get jellyfin to work with it? From the way you described it sounds like I'm going to have to install jellyfin on a separate server and specify the remote location of my QNAP as the video file source, in order to use jellyfin as intended. Jellyfin sounds pretty cool 😎 I love my Chromecast.

    ReplyDelete
    Replies
    1. Since it has HDMI out, do you even need a program like jellyfin? It looks like QNAP makes different machines for different purposes. Since yours has HDMI out, can't you connect it directly to one of your TVs HDMI inputs? If your machine is just NAS, then you'll need another computer to run Jellyfin and use the NAS as the libraries for it.

      I would check QNAP web site and support forums- whatever they say about setting up Plex should apply to Jellyfin, except that you won't have to keep logging in the Plex servers and paying them for the "privilege".

      Delete
  3. lmfao is this written by secret Plex employees? This is the worst Jellyfin article I've ever seen written, it's like a 10yo just learned about Plex, couldn't set it up and got mad so installed Jellyfin because it was less resources

    ReplyDelete
    Replies
    1. Thanks for your high quality comment. I see you posted anonymously. Maybe you're the secret Plex employee?

      You're right, installing Jellyfin in Linux is so much easier for a dumbass like me to do than to get Plex to work right in Windows (or Linux).

      Jellyfin just keeps working, and I don't have to pay for a subscription or log in to Plex remote servers every time I want to watch files on my own machine.

      Anonymous commenters suck, and at the risk of being repetitive, Plex sucks.

      Delete

Leave comments or a questions here and I'll try to post a response as soon as I can.