Samhain is upon us and all kind of creatures and forces are at work. The veil between the worlds is thin, and on a frosty moonlit eve you might hear the call of the Old Ones. Or perhaps that’s the appeals of your long-neglected media collection, urging you to pay it some attention on these chilly nights.
Either way, hunker down as we show you how to set up a top-class media server with Plex and Linux. You’ll be streaming your media all around the house in no time. With very little effort Plex gives you a Netflix-like interface for navigating your movie, TV show , and music collection. If you have a TV tuner, then Plex can use that too. If you already have a NAS device, then you can probably install Plex on it. We’ll look at doing so, both traditionally and the new-fangled way with Docker.
And if you care for music more than you do for films we’ll look at Airsonic. Install it at home or in the cloud, throw your music collection at it and you can stream your music anywhere in the world. Only a web browser is required to listen, and Airsonic is a completely open-source. It’s related to Subsonic and Madsonic, which you may have heard of, and mobile apps compatible with those sonic siblings can be used with Airsonic too.
We’ve also got some advice on hardware, and guidance on some other software that’s worthy of your attention. So never mind the ghosts and ghouls – in fact, they probably want to join you for a scary movie night. Invite them over. What’s the worst that could happen…?
Take back your media
Don’t be perplexed. We’ve got the lowdown on Plex right here!
Streaming services have kept a lot of us sane over the past few months. The erstwhile occupants of LXF Towers have put in a whole lot of hours binge-watching The Boys on Amazon Prime, smashing Cobra Kai on Netflix, and watching endless hours of chess commentary on YouTube. Of course, we’re fans of less proprietary options too, such as the decentralized PeerTube and the plethora of content available through the likes of Wikimedia Commons and Open Culture. However, as seasoned readers will be well aware, we’re big fans of using Linux to self-host our own takes of these services.
And now is a great time to reacquaint yourself with your own media collection. Remember all those conspiracy documentaries that you downloaded in the mid-2000s? (No? That’s exactly what they want – Ed). Or all those albums you dutifully ripped to OGG or FLAC files? (If you’re in the UK we refer, of course, to the brief period before 2015 when doing so was legal.) You may have followed our tutorial on Handbrake (back in LXF240) and used it to transcode your DVD collection (the legality of which depends on your jurisdiction). Whatever your taste in media, chances are if you’re reading this feature then you’ve got several gigabytes, and potentially hours of entertainment stashed away. And we’re here to help you enjoy it. Whether you’re at home, in the garden, or out and about.
Over the page, we’ll show you how easy it is to install the Plex Media Server and stream your media anywhere. Let’s be clear about this: Plex is proprietary software. We’re covering it here because it has always supported Linux, is a fine choice for a media server, and is extremely popular. There are plenty of other open-source options and we’ll look at some of those later.
If you want to support the Plex team or access to high-quality streaming media (and some extra features), then you can pay for a premium Plex Pass. Having a free Plex account enables you to view Plex’s own streaming channels (now available in over 200 countries), but these are funded by Ad-supported Video on Demand (AVOD). You may not be interested in Plex’s premium features, and that’s fine. However, if you are then check the box overleaf to see what your money gets you.
You can also use Plex without an account (free or premium), which is good news if you’re against the idea of signing up to a third-party service at all. You might also prefer to skip to the end of the feature where we look at Emby (now also proprietary) and Subsonic. It’s worth noting that you can associate your server with your Plex account, so having one gives you a free authentication mechanism as well, although we’ll show you how to lock things down properly for remote access later on, too.
If you’re an organised sort then your media files might already be on some kind of file server. Perhaps you’ve followed our many storage-related tutorials and have everything nicely arranged on a RAID array in a box under the stairs. (living the dream!–Ed)
This is fine, but a general-purpose file server sharing files over Samba (the best choice for a heterogeneous network) won’t do a particularly good job of streaming files to lots of users. It’s not what the protocol was designed for. It’ll work fine for a couple of users over Gigabit Ethernet, but accessing it remotely will be painful – especially as you start skipping through the file. Furthermore, some video players on some desktops still have trouble opening network links, and often end up copying the whole file locally before playback is initiated. And that’s just cheating.
Media streaming protocols do a much better job of getting the right bits and bytes to clients as swiftly as possible. And since not all clients are the same, a big part of a media server’s job is transcoding: transforming one format to another. There’s no point sending a 4K, 7.1 stream to your phone or 20-yearold laptop after all. Transcoding requires CPU power, and while modern chips will happily transcode several streams at once ‘on the fly’, unfortunately it’s not something that a Raspberry Pi will be able to keep up with.
Getting Plex Installed…
Get your media server running in three steps, then fill it with media booty!
Plex can be installed on all kinds of devices – Linux, Mac, and Windows machines as well as various NAS boxes (consumer devices as well as homespun efforts using tools such as FreeNAS and unRAID). The download page at https://www.plex.tv/en-gb/media-serverdownloads provides DEB and RPM packages, and there’s an official Docker image too (which we’ll look at later at running via OpenMediaVault). The simple walkthrough below will get you started on Ubuntu, and the idea is the same for Fedora. There’s an unofficial AUR package for Arch-based distros too. It’s worth turning remote access off when prompted by the setup wizard. You can always turn it on again later. In addition, if the automatic port forwarding works out of the box there’s a chance your Plex instance could be co-opted by someone else.
To avoid painful rescanning later, we’d recommend taking some time now to ensure your media directories are organized. Plex works with libraries, where each library indexes media from one or more physical directories. To start with, you might have Music, Film, and Television libraries, and these types of media should all live in separate directories and have their own hierarchy beneath them.
Plex can handle a number of different file naming and placing schemes, as long as they’re consistent. For best results, TV shows should have each season in a separate directory, for example, TV/my.favourite.show/season.01/ show.s01e01.mkv. Individual films can exist in their own directory – which keeps things tidy if they’re divided into parts or have extra resources such as subtitles or artwork, just ensure the Local Media Assets source is selected in the Agents section in Settings to use these – or not if they’re just single files. Plex recommends music directories be sorted by Artist and then Album, and named with the track number and title, for example, Music/The Lemonheads/Come on Feel the Lemonheads/04 – Down about it.flac. Compilations should be placed in a Various Artists folder and each track should have the Album Artist ID3 tag set likewise.
There is some degree of flexibility though, so if you have a different (and mostly sane) scheme in place then Plex will probably manage fine. We let it chew through a couple of terabytes of our media collection (not all of which had complete or accurate tags, and some of it was encoded many years ago in all kinds of peculiar approximations of various multimedia formats) sorted by genre and album, and it coped admirably.
Organise your libraries
You can read up to 3 premium stories before you subscribe to Magzter GOLD
Log in, if you are already a subscriber
Get unlimited access to thousands of curated premium stories, newspapers and 5,000+ magazines
READ THE ENTIRE ISSUE