{"id":5589,"date":"2017-08-18T15:00:08","date_gmt":"2017-08-18T05:00:08","guid":{"rendered":"https:\/\/www.penguinpunk.net\/blog\/?p=5589"},"modified":"2018-01-27T18:35:04","modified_gmt":"2018-01-27T08:35:04","slug":"htpc-replacing-the-pc-with-macos","status":"publish","type":"post","link":"https:\/\/www.penguinpunk.net\/blog\/htpc-replacing-the-pc-with-macos\/","title":{"rendered":"HTPC &#8211; Replacing The PC With macOS"},"content":{"rendered":"<p><strong>The Problem<\/strong><\/p>\n<p>My HTPC (running <a href=\"https:\/\/en.wikipedia.org\/wiki\/Windows_Media_Center#Windows_7\">Windows 7 Media Center<\/a>) 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&#8217;t be bothered trying to work out why it died. So I gave the carcass of the machine to my nephew (who&#8217;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&#8217;m obviously not the first person to use a Mac for these activities, but I thought it would be useful to capture my experiences.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Requirements<\/strong><\/p>\n<p>Requirements? Isn&#8217;t this just for home entertainment? Whatever, relaxation is important, and understanding your users is as well. We record a lot of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Terrestrial_television\">free to air tv<\/a>\u00a0with a <a href=\"https:\/\/www.fetchtv.com.au\">Fetch Mighty<\/a> box and sometimes things clash. Or don&#8217;t record. &#8220;Catch-up&#8221; TV services in Australia are improving a lot, but our <a href=\"https:\/\/www.netflix.com\/au\/\">Netflix<\/a> 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 <a href=\"http:\/\/support.xbox.com\/en-AU\/xbox-360\/windows-media-center\/windows-media-center-on-xbox-360-windows-7\">Media Center extender option<\/a> with the Xbox360 that was actually quite useable and meant I didn&#8217;t need a PC sitting in the lounge room.<\/p>\n<p>From a movie consumption perspective, we mostly watch stuff using various clients such as AppleTV or <a href=\"https:\/\/support.wdc.com\/product.aspx?ID=1003\">WDTV devices<\/a>, so the HTPC didn&#8217;t really impact anything there, although the way I got data from Blu-ray \/ DVD \/ HD-DVD \/ VCD was impacted as my iMac didn&#8217;t have a Blu-ray player attached. Okay, the SuperDrive could deal with VideoCDs, but you get my point.<\/p>\n<p>So, in short, I need something that could:<\/p>\n<ul>\n<li>Record free to air tv shows via a schedule;<\/li>\n<li>Rip Blu-ray and other content to mkv containers (or similar); and<\/li>\n<li>Grab accurate metadata for that media for use with Plex.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Solution?<\/strong><\/p>\n<p>The solution was fairly easy to put together when I thought about what I actually needed.<\/p>\n<p><em>TV<\/em><\/p>\n<p>I backed a Kickstarter for the <a href=\"https:\/\/www.silicondust.com\">HDHomeRun Connect<\/a>\u00a0some time ago and hadn&#8217;t really used the device very effectively save for the odd VLC stream on an iPad. It&#8217;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\u00a0<a href=\"https:\/\/www.elgato.com\/en\/eyetv\">Elgato EyeTV<\/a> works with both macOS and <a href=\"https:\/\/www.icetv.com.au\">IceTV<\/a> (a local TV guide provider) and also supports the HDHomeRun. I haven&#8217;t tested multiple HDHomeRun devices with the same EyeTV software and I&#8217;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&#8217;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.<\/p>\n<p><em>Optical Discs<\/em><\/p>\n<p>I bought a USB-based <a href=\"https:\/\/www.pioneerelectronics.com\/PUSA\/Computer\/Computer+Drives\/BDR-XS06\">Pioneer<\/a>\u00a0(BDR-XS06) Blu-ray drive that works with macOS, and <a href=\"http:\/\/www.makemkv.com\">MakeMKV<\/a> is still my go to in terms of mkv ripping. It maxes out at 2x. I&#8217;m not sure if this is a macOS limitation or firmware crippling or some other thing. Now that I think about it, it&#8217;s likely the USB bus on my iMac. If anyone wants to send me a Thunderbolt dock I&#8217;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.\u00a0If 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.<\/p>\n<p><em>Metadata<\/em><\/p>\n<p>For movie metadata I settled on <a href=\"http:\/\/www.kvibes.de\/mediaelch\/\">MediaElch<\/a> 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.<\/p>\n<p><em>Plex<\/em><\/p>\n<p>I run\u00a0<a href=\"https:\/\/www.plex.tv\">Plex<\/a> as the primary media server for the house (using either iPad, <a href=\"http:\/\/www.rasplex.com\/docs\/faq.html\">rasplex<\/a> 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&#8217;m going to try and make some time to test out the DVR functionality in the near future.<\/p>\n<p>I&#8217;ve also recently started to use the\u00a0<a href=\"https:\/\/developer.apple.com\/legacy\/library\/documentation\/Darwin\/Reference\/ManPages\/man5\/auto_master.5.html\"><em>auto_master<\/em><\/a>\u00a0file 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 &#8220;Multimedia&#8221; as their main share (no I didn&#8217;t really think this deployment through). As a result my iMac mounts them under Volumes as &#8220;Multimedia-1&#8221;, &#8220;Multimedia-2&#8221;, etc. This is fine, but then depending on the order they&#8217;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 <a href=\"http:\/\/blog.grapii.com\/2015\/06\/keep-network-drives-mounted-on-mac-os-x-using-autofs\/\">here<\/a>. I&#8217;ve included an overview for your enjoyment. Firstly, fire up a terminal session and make a \/mnt directory if you don&#8217;t have one already.<\/p>\n<pre><strong>Last\u00a0login:\u00a0Mon\u00a0Aug\u00a014\u00a005:10:12\u00a0on\u00a0ttys000<\/strong>\r\n<strong>imac27:~\u00a0dan$\u00a0pwd<\/strong>\r\n<strong>\/Users\/dan<\/strong>\r\n<strong>imac27:~\u00a0dan$\u00a0cd\u00a0\/<\/strong>\r\n<strong>imac27:\/\u00a0dan$\u00a0sudo\u00a0mkdir\u00a0mnt<\/strong>\r\n<strong>Password:<\/strong><\/pre>\n<p>You&#8217;ll then want to edit setup the auto_master file to look at auto_fs when it runs.<\/p>\n<pre><strong>imac27:\/\u00a0dan$\u00a0sudo\u00a0nano\u00a0\/etc\/auto_master<\/strong><\/pre>\n<p>You should also ensure the NAS directory exists (if it doesn&#8217;t already).<\/p>\n<pre><strong>imac27:\/\u00a0dan$\u00a0cd\u00a0\/mnt<\/strong>\r\n<strong>imac27:mnt\u00a0dan$\u00a0sudo\u00a0mkdir\u00a0NAS<\/strong><\/pre>\n<p>You can now create \/ modify the auto_nas file and include mount points, credentials and the shares.<\/p>\n<pre><strong>imac27:\/\u00a0dan$\u00a0sudo\u00a0nano\u00a0\/etc\/auto_nas<\/strong><\/pre>\n<p>Now run your automount command.<\/p>\n<pre><strong>imac27:\/\u00a0dan$\u00a0sudo\u00a0automount\u00a0-vc<\/strong>\r\n<strong>automount:\u00a0\/net\u00a0updated<\/strong>\r\n<strong>automount:\u00a0\/home\u00a0updated<\/strong>\r\n<strong>automount:\u00a0\/mnt\/NAS\u00a0updated<\/strong>\r\n<strong>automount:\u00a0no\u00a0unmounts<\/strong><\/pre>\n<p>Once this is done you&#8217;ll want to test that it works.<\/p>\n<pre><strong>imac27:\/\u00a0dan$\u00a0cd\u00a0\/mnt\/NAS\/<\/strong>\r\n<strong>imac27:NAS\u00a0dan$\u00a0ls<\/strong>\r\n<strong>831multimedia<\/strong>\r\n<strong>imac27:NAS\u00a0dan$\u00a0cd\u00a0831multimedia\/<\/strong>\r\n<strong>-bash:\u00a0cd:\u00a0831multimedia\/:\u00a0Too\u00a0many\u00a0users<\/strong><\/pre>\n<p>Note that if you&#8217;re having issues with a &#8220;Too many users&#8221; error, it may be because you&#8217;re using a special character (like @) in your password and this is messing up the syntax for auto_master. Check <a href=\"https:\/\/stackoverflow.com\/questions\/18145509\/automount-samba-folder-on-mac\">this post<\/a> for a resolution. Once you&#8217;ve sorted that it will look more like this.<\/p>\n<pre><strong>imac27:NAS\u00a0dan$\u00a0ls<\/strong>\r\n<strong>412multimedia\u00a0\u00a0\u00a0\u00a0831multimedia\u00a0\u00a0\u00a0\u00a0omvmultimedia<\/strong>\r\n<strong>imac27:NAS\u00a0dan$\u00a0cd\u00a0412multimedia\/<\/strong>\r\n<strong>imac27:412multimedia\u00a0dan$\u00a0ls<\/strong>\r\n<strong>tv<\/strong>\r\n<strong>imac27:412multimedia\u00a0dan$\u00a0cd\u00a0..<\/strong>\r\n<strong>imac27:NAS\u00a0dan$\u00a0cd\u00a0omvmultimedia\/<\/strong>\r\n<strong>imac27:omvmultimedia\u00a0dan$\u00a0ls<\/strong>\r\n<strong>basketball\u00a0\u00a0\u00a0\u00a0music\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0music\u00a0video\u00a0\u00a0\u00a0\u00a0skateboarding\u00a0\u00a0\u00a0\u00a0star\u00a0wars\u00a0\u00a0\u00a0\u00a0tv<\/strong><\/pre>\n<p>It&#8217;s also a good idea to apply some permissions to that auto_nas file because you&#8217;re storing credentials in there in plain text.<\/p>\n<pre><strong>imac27:\/\u00a0dan$\u00a0sudo\u00a0chmod\u00a0600\u00a0\/etc\/auto_nas<\/strong>\r\n<strong>Password:<\/strong><\/pre>\n<p>And now you can point Plex at these mount points and you shouldn&#8217;t have any problems with SMB shares disappearing randomly.<\/p>\n<p>There&#8217;s just one thing though &#8230;<\/p>\n<p>I&#8217;ve read a lot of reports of this functionality being broken in more recent versions of macOS. I&#8217;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 <a href=\"https:\/\/discussions.apple.com\/thread\/4927134\">running a bash script to unmount the devices<\/a> 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&#8217;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&#8217;s outside my ken at this stage.<\/p>\n<p><em>*Update &#8211; 2017\/08\/20*<\/em><\/p>\n<p>I ended up having problems with the <em>auto_master<\/em> 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&#8217;ll come up with a consistent path name and Plex won&#8217;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.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>HTPCs Are So Last Decade<\/strong><\/p>\n<p>I recently threw out my <a href=\"http:\/\/www.digivision.it\/docs\/hollywoodplus.html\">RealMagic Hollywood+ XP cards<\/a>. 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 &#8220;Media Center&#8221; PC at home and consuming everything via that. Nowadays people tell me to &#8220;just stream it&#8221;. But I don&#8217;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&#8217;d like to do. So I&#8217;m still a big fan of physical discs, and still recording television shows via a PVR or via the iMac.<\/p>\n<p>I still have a dream that one day I&#8217;ll happen upon the perfect user experience where I can consume whatever digital media I want in the fashion I want to. I&#8217;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&#8217;t like ISO files though (<a href=\"https:\/\/support.plex.tv\/hc\/en-us\/articles\/201426506-Why-are-ISO-VIDEO-TS-and-other-Disk-Image-Formats-Not-Supported-\">which is justifiable, for sure<\/a>). 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&#8217;re still some things that aren&#8217;t as easy to view. I still haven&#8217;t found a reliable way to <a href=\"http:\/\/www.uvdemystified.com\/uvfaq.html\">consume UltraViolet<\/a> content on a big screen (although I think I could do something with AirPlay). I&#8217;ve been reading a bit about various cable boxes in the US that can scan both local and streaming data for whatever you&#8217;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.<\/p>\n<p>In any case, it&#8217;s still possible to run a HTPC the old-fashioned way with macOS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[146,135,333],"tags":[801,337],"class_list":["post-5589","post","type-post","status-publish","format-standard","hentry","category-apple","category-computers","category-htpc","tag-apple","tag-htpc-2"],"_links":{"self":[{"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/posts\/5589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/comments?post=5589"}],"version-history":[{"count":15,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/posts\/5589\/revisions"}],"predecessor-version":[{"id":6122,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/posts\/5589\/revisions\/6122"}],"wp:attachment":[{"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/media?parent=5589"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/categories?post=5589"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/tags?post=5589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}