The Problem
My HTPC (running Windows 7 Media Center) died a few months ago after around 5 or 6 years of service. It was a shame as I had used it as a backup for my TV recordings and also to rip optical discs to my NAS. At the time it died I was about to depart on a business trip and I couldn’t be bothered trying to work out why it died. So I gave the carcass of the machine to my nephew (who’s learning about PC hardware things) and tried to put something together using other machines in my house (namely an iMac and some other odds and sods). I’m obviously not the first person to use a Mac for these activities, but I thought it would be useful to capture my experiences.
Requirements
Requirements? Isn’t this just for home entertainment? Whatever, relaxation is important, and understanding your users is as well. We record a lot of free to air tv with a Fetch Mighty box and sometimes things clash. Or don’t record. “Catch-up” TV services in Australia are improving a lot, but our Netflix catalogue is nowhere near as extensive as the US one. So I like to have a backup option for TV recording. The HTPC provided that. And it had that cool Media Center extender option with the Xbox360 that was actually quite useable and meant I didn’t need a PC sitting in the lounge room.
From a movie consumption perspective, we mostly watch stuff using various clients such as AppleTV or WDTV devices, so the HTPC didn’t really impact anything there, although the way I got data from Blu-ray / DVD / HD-DVD / VCD was impacted as my iMac didn’t have a Blu-ray player attached. Okay, the SuperDrive could deal with VideoCDs, but you get my point.
So, in short, I need something that could:
- Record free to air tv shows via a schedule;
- Rip Blu-ray and other content to mkv containers (or similar); and
- Grab accurate metadata for that media for use with Plex.
Solution?
The solution was fairly easy to put together when I thought about what I actually needed.
TV
I backed a Kickstarter for the HDHomeRun Connect some time ago and hadn’t really used the device very effectively save for the odd VLC stream on an iPad. It’s a dual-tuner device that sits on your wired network and is addressable by a few different applications over IP. The good news is that Elgato EyeTV works with both macOS and IceTV (a local TV guide provider) and also supports the HDHomeRun. I haven’t tested multiple HDHomeRun devices with the same EyeTV software and I’m not 100% convinced that this would work. I had 8 tuners on the HTPC so this is a bit of a bummer, but as it’s not the primary recording device I can live with it. The EyeTV software supports multiple export options too, so I can push shows into iTunes and have AppleTV pick them up there.
Optical Discs
I bought a USB-based Pioneer (BDR-XS06) Blu-ray drive that works with macOS, and MakeMKV is still my go to in terms of mkv ripping. It maxes out at 2x. I’m not sure if this is a macOS limitation or firmware crippling or some other thing. Now that I think about it, it’s likely the USB bus on my iMac. If anyone wants to send me a Thunderbolt dock I’m happy to try that out as an alternative. In any case a standard movie Blu-ray takes just shy of an hour to rip. It does work though. If I still need to rip HD-DVDs I can use the drive from the Xbox360 that I have laying about. What? I like to have options.
Metadata
For movie metadata I settled on MediaElch for scraping and have found it to be easy to use and reliable. Why bother with scraping metadata? It sometimes saves a bit of effort when Plex gets the match wrong.
Plex
I run Plex as the primary media server for the house (using either iPad, rasplex or AppleTV), with content being served from a number of NAS devices. It took me a while to get on board with Plex, but the ability to install the app on a 4th generation AppleTV and the portability of media has been useful at times (think plane trips on economy airlines where entertainment is an extra charge). Plex are working on a bunch of cool new features, and I’m going to try and make some time to test out the DVR functionality in the near future.
I’ve also recently started to use the auto_master file as the mechanism for mounting my SMB shares automatically on the iMac. I found User-based Login Items method was a bit flaky and shares would disappear every now and then and confuse Plex. I have three NAS devices all using a variation of the name “Multimedia” as their main share (no I didn’t really think this deployment through). As a result my iMac mounts them under Volumes as “Multimedia-1”, “Multimedia-2”, etc. This is fine, but then depending on the order they’re mounted in when the machine reboots can mess up things a bit. The process to use auto_master is fairly simple and can be found here. I’ve included an overview for your enjoyment. Firstly, fire up a terminal session and make a /mnt directory if you don’t have one already.
Last login: Mon Aug 14 05:10:12 on ttys000
imac27:~ dan$ pwd
/Users/dan
imac27:~ dan$ cd /
imac27:/ dan$ sudo mkdir mnt
Password:
You’ll then want to edit setup the auto_master file to look at auto_fs when it runs.
imac27:/ dan$ sudo nano /etc/auto_master
You should also ensure the NAS directory exists (if it doesn’t already).
imac27:/ dan$ cd /mnt
imac27:mnt dan$ sudo mkdir NAS
You can now create / modify the auto_nas file and include mount points, credentials and the shares.
imac27:/ dan$ sudo nano /etc/auto_nas
Now run your automount command.
imac27:/ dan$ sudo automount -vc
automount: /net updated
automount: /home updated
automount: /mnt/NAS updated
automount: no unmounts
Once this is done you’ll want to test that it works.
imac27:/ dan$ cd /mnt/NAS/
imac27:NAS dan$ ls
831multimedia
imac27:NAS dan$ cd 831multimedia/
-bash: cd: 831multimedia/: Too many users
Note that if you’re having issues with a “Too many users” error, it may be because you’re using a special character (like @) in your password and this is messing up the syntax for auto_master. Check this post for a resolution. Once you’ve sorted that it will look more like this.
imac27:NAS dan$ ls
412multimedia 831multimedia omvmultimedia
imac27:NAS dan$ cd 412multimedia/
imac27:412multimedia dan$ ls
tv
imac27:412multimedia dan$ cd ..
imac27:NAS dan$ cd omvmultimedia/
imac27:omvmultimedia dan$ ls
basketball music music video skateboarding star wars tv
It’s also a good idea to apply some permissions to that auto_nas file because you’re storing credentials in there in plain text.
imac27:/ dan$ sudo chmod 600 /etc/auto_nas
Password:
And now you can point Plex at these mount points and you shouldn’t have any problems with SMB shares disappearing randomly.
There’s just one thing though …
I’ve read a lot of reports of this functionality being broken in more recent versions of macOS. I’ve also witnessed shares disappear and get remounted with root permissions. This is obviously not ideal. There are a number of solutions floating around, including running a bash script to unmount the devices as root and then change directory as a normal user (prompting autofs to remount as that user). I found something in a forum somewhere the suggestion that I use -nosuid in my auto_master file. I did this and rebooted and the drives seem to have mounted as me rather than root. I’ll keep an eye on this and see if it continues to work or whether autofs remounts the shares as root. This would seem a non-ideal solution in a multi-user environment but that’s outside my ken at this stage.
*Update – 2017/08/20*
I ended up having problems with the auto_master method as well, and decided to create new shares on the various NAS devices with different names. These then mount as /Volumes/nas1data, /Volumes/nas2data, etc. So theoretically even if I lose the connection I can remount them manually and know that they’ll come up with a consistent path name and Plex won’t get too confused. I dragged these mounted volumes into my Login Items so that they mount every time the machine reboots. It still bites that they disappear every now and then though.
HTPCs Are So Last Decade
I recently threw out my RealMagic Hollywood+ XP cards. Those things were great at a time when playing DVDs on a PC was a real challenge. I remember being excited to play full screen MPEG-2 movies on my NT 4 Workstation running on a Pentium 133. Fast forward to about 8-10 years ago and it seemed everyone was running some kind of “Media Center” PC at home and consuming everything via that. Nowadays people tell me to “just stream it”. But I don’t live in a terribly bandwidth rich environment, and downloading 4GB of data from the Internet to watch a movie needs a little more prior planning than I’d like to do. So I’m still a big fan of physical discs, and still recording television shows via a PVR or via the iMac.
I still have a dream that one day I’ll happen upon the perfect user experience where I can consume whatever digital media I want in the fashion I want to. I’ve tried an awful lot of combinations in terms of backend and frontend and Plex is pretty close to doing everything I need. They don’t like ISO files though (which is justifiable, for sure). I rip most things in mkv containers now, and all of my iTunes content (well, the music at least) is pretty easy to consume, but there’re still some things that aren’t as easy to view. I still haven’t found a reliable way to consume UltraViolet content on a big screen (although I think I could do something with AirPlay). I’ve been reading a bit about various cable boxes in the US that can scan both local and streaming data for whatever you’re after and point you in the right direction. I guess this would be the way to go if you had access to reasonable bandwidth and decent content provider choices.
In any case, it’s still possible to run a HTPC the old-fashioned way with macOS.