Thursday, February 12, 2015

Venturing Into Plexland

2015-02-11
Venturing into Plexland

One of the motivations I had for buying the NAS was to centralize the media we had accumulated over a mountain of CDs, DVDs. They were never where you wanted to access them, if you could find them. While my strategy was fine, what I hadn't appreciated was the time and effort required to convert all of the physical media into files playable on a media server, and then keep populating the library with more content.

I had used XMBC (now KODI)  under Ubuntu and found it pretty capable, but it was limited in that I couldn't access my media outside my home. Through discovering the Plex app on my Android phone (a friend had shared their media library with me), I decided to try out the server  on my own. The app (either Apple or Android) isn't worth anything without media to watch, and you need a server for that. The server program itself is free, though if you want to watch on a mobile device (phone, tablet), there's an app you can buy to get the full features. You can also connect your Plex directly to your TV, stream it to a TV through a built in Plex app (my TV is too old for this), game console (PS3, XBox, etc.) or through a Chromecast (my solution).

Plex allows you to organize your media into some predefined categories--TV Shows, Movies, Photos, etc. And you can define other types (like home movies, music videos, etc.). This is important because the sources you use, or don't use, to get the metadata for the media is dictated/selected in the server program. Having a usable media library means you need some way of categorizing the media. Getting thumbnails, brief descriptions of the TV show, for example, make it hugely more usable when deciding what to watch.

So, just convert your CDs and DVDs and it's all digitized and ready to watch, eh?

Not really so easy...

Converting CDs should be simple--rip them into MP3 or FLAC or whatever your media server/transcoding allows (something I had to discover). Some fair amount of my music collection was already in MP3 format, though in varying degrees of  bit rates and I wasn't going to go back and reconvert what I already had. I only had one PC with a CD/DVD/BluRay drive, so conversion was going to be one disc at a time. I batched up my CDs. I experimented with using iTunes at 320kbps and a program under Ubuntu to rip into FLAC.  FLAC takes hugely more space, so though I wasn't cramped for space, the prospect of tripling (or more) the file sizes by using FLAC didn't seem (for me) to be worth the disk space, since my hearing and computer speaker system isn't able to allow me  to discern the differences. Now mostly finished, I have about 22,000 music tracks.

Photos- My photo library is still a bit of a mess because it's an accumulation of digital photos from 1998 forward and I have about 50,000 photos. Organizing this will definitely be a challenge due just to the sheer number of photos and the multiple ways you might want to organize them.

DVDs and Blu Rays- Could be complex to convert because they are (usually) copy protected and not just a single file as a music track or photo, and there can be features segments (directors cuts and the like) on the disc, along with the main video. For my personal library's use, I converted them using a variety of tools, with Blu Ray being the most time consuming. Due to their enormous digital content (which is what makes the quality what it is), they also produce a huge file size. One Blu Ray produced a 12+ gig file. So I had to do a second conversion using Handbrake to compress the file size down to something more reasonable (usually  4-6 gig for Blu Ray and ~600 meg to 1.5 gig or so for DVDs). The process starts by ripping the Blu Ray, which isn't something Handbrake does. So there's another tool. Then there's the decision about the file 'container' type- should they be mp4, mkv , or something else? What file types would the media server program support? Is there a file type that optimizes picture quality and file size? Nothing's simple.  I don't know the answer. I do know that due to the enormous amount of data on a Blu Ray, it takes a lot of time per disc to rip and re-encode the file.

For the most part, I decided to stick with Matroska (mkv) as it is an open standard container format for video/audio).  Sometimes the conversion didn't go well and I ended up re-ripping and using mp4 instead.  Nonetheless, I've found that Plex seems to support avi, mp4, mkv with transparency (as to format) when viewing it on the device. Whether the file requires transcoding seems to depend on the client used (PC, game console, phone, tablet, etc.) rather than the file type on the server.

Then to organize your media within Plex and have the proper metadata applied, so that the thumbnail artwork and descriptions align with the media, you need to follow their naming conventions, which (mostly) work. But sometimes it doesn't.  If you do everything according to the guidelines and your media fits within those, great.  I had questioned whether audiobooks would be supported, but they seem to be.

The support community within Plex is active and, I've personally found to be, very good, though you obviously need a certain level of technical knowledge to perform some of the things to get your Plex server up and accessible.  To their credit, the team at Plex have made it generally pretty easy. I bought a PlexPass to show my support for the project. Following the threads on the forums though, reveal that not everyone is up to some of the basics of Plexdom. In order for your content to be accessible outside your home, you may have to dig under the covers in your router to do some port forwarding and fixing some IP addresses. My router doesn't do UPnP, so both for my Synology server as well as the Plex server, port forwarding was a manual process.

I initially set up my Plex server on a Windows7 laptop (quad core i7, 8 gig RAM, 1tb hard drive), but due to it's consistent instability (none of which was due to Plex, it was unstable before all this). Then as my library started to expand, I realized I had to go with something more substantial. I could have added external USB hard drives, and had a number of those already. But the jumble of hard drives that would have ensued wasn't appealing. So when I bought the Synology, it was also intended to serve this purpose. But I wasn't sure the Synology NAS was up to transcoding, as it's real purpose is a file server and doesn't have a heavy duty processor and lots of memory (I upgraded my Synology to 4 gig RAM, from 2 gig). So I decided to move to a Mac Mini. This brought it's own set of challenges (mostly my learning, moving from a largely Windows background),and naturally, more money.

It all works now! But, how well it works depends on your download speed, the server's upload speed, whether it's on your local network, and then whether it's a wired or wireless connection, the client (what you are watching on), and whether (and how many) others are watching at the same time (if you've shared your library).

The move to the Mac Mini is the next part of the story.





Wednesday, February 04, 2015

Media Servers and My NAS

February 4, 2015

Media servers and NAS (network attached storage). 

I spent weeks pouring through the options when it came to a NAS to replace my aging  (HP EX470 Mediasmart server, running the equivalent of Server 2003) Windows Home Server that had suddenly become unreliable. It was a relative bargain at the time, costing only about $500 with 1.5tb of drive space when I bought it.

Microsoft and HP (as manufacturer) abandoned the platform in favor of something that likely has a larger market (SMID market), but for me, it had been a great solution to sharing content and backing up the number of home computers we'd grown to include in our home. Though truthfully, except for the automatic backup, I was really the only one using it.

When I started looking around for replacement options, I looked at any number of capable systems, but it's really difficult to know how the administrative interface works, how easily it is configured, and now, whether there are apps to supplement the direct interface. I had to decide whether to build one myself, or buy an off the shelf system.

I eliminated the build it yourself route, as I wanted something where the OS and hardware worked well together and had some user base (as well as technical support) to supplement me when I had issues (there are always issues). I looked at Netgear, QNAP,WD, Synology,among many others.

I ultimately settled, a bit nervously, on Synology. Reading reviews of the several systems to which  I'd narrowed my search, (QNAP, Synology)  there were a lot of people with no problems and who loved their systems, but also a worrying percentage that had the equivalent of BSOD or some other DOA problem I just didn't want to deal with on a new system. Then, aside from the manufacturer was the question of capacity and expandability. At my estimated price range, I didn't want spend a chunk of money on hardware, only to run out of storage too quickly by buying a system with one or two drives, then discover I'd grossly underestimated how much storage I needed. It was a balance between how much I could afford and how much storage I thought I'd need. Fortunately, even now after only six months, I'm using vastly more storage than I ever imagined I needed, but still have plenty.

I settled on a Synology 1513+ (5 drive bay) .Of course, now that I have a 1513+, they've upgraded to a 1515+, but it seems like mostly a processor upgrade. I added the extra RAM (total of 4 gig), even though NAS aren't typically heavily loaded with RAM, and 4, 4tb WD Red hard drives, for a total of 16tb, With the RAID configuration, this would allow for 1 drive to fail and still give me 12tb of usable storage. This leaves me space for one more expansion drive when/if I need it and can afford it. And, if I really get ambitious (and have the cash to spare), I can add another chassis and expand to a total of 10 drives.

The OS that originally came with the system (DSM 4.2) has been progressively updated and expanded to 5.1-5022 Update 1 at this writing (Update 2 popped up as I was writing this entry), with the change to version 5 being a fairly significant user interface change.

Security updates have been issued and I've also implemented 2 factor (2 step) authentication.  Having an Internet facing/connected device definitely means you are going to be tested, so security updates are essential. So is looking at the server logs to find out whether you are being 'tested'. Knowing how potentially disastrous an OS upgrade can be, it's always a bit nerve wracking to update it, but so far, nothing has gone awry.

The system itself was easy enough to setup.But, naturally,my router (the key to anything connecting to the server) was not a model supported without manual configuration. Naturally... ATT Uverse may be great for those with standard needs, but for configuring external access, you have to do manual port forwarding. Again, not hard, as Synology documents all of the services and port numbers, you just have to get a bit under the covers of your router's interface to forward the right ports and and hope you don't screw up something ATT needs that makes your TVs work. And, Synology has a DDNS service to give your server it's own domain without spending money for domain registration if you use your server as I do. Don't ask ATT what they think of my home network--they think I have "a lot of devices" on my network (implying too many).

RTFM isn't any one's favorite way to spend time after they've gotten a new toy. and I'm no exception. But it does help with finding out how much more is beneath the surface that would have taken longer to figure out, without RTFM.

There's a reasonable selection of packages to add on to provide additional functionality, as well as apps (Android and Apple) to give connectivity to your server from mobile devices. I have Anti-Virus, Audi Station, Cloud Station (like a private Dropbox), Download Station, Photo Station, iTunes Server. But there are many more--Mail Station (run your own mail server), Drupal, Joomla, Mediawiki, Podcast Generator), Wordpress, and more.

One thing I decided to leave to a separate device is my media server. I went with Plex.

But for a home server, so far, I've been very satisfied with my choice.

Next installment is my journey into the land of Plex and media preparation. What did I get myself into?