So, following on from my old HTPC thread, recent developments with AppleTV etc have spurned me on to bigger and better things with regards my plans for HTPC niceness using Apple's solutions.
The aims:
- Playback of Movies, TV Shows, Music and Photos - preferably streamed from a centralised server
- (Scheduled) Recording of TV programmes
- DVD playback
- All from the Apple Remote
Overview of my solution:
- Server sits in cupboard, downloading video content, converting to MPEG4 / AAC and adding to local iTunes
- HTPC runs AppleTV OS and streams content from Server
- HTPC also runs DVD Player.app and EyeTV
- All controlled from the Apple Remote, thanks to twistedmelon.com's Mira software and Manta TR1 dongle
The hardware:
HTPC:
- JVC Widescreen (16:9) Standard Def TV - SCART/S-Video/Composite inputs only
- CoolerMaster Cavalier 4 (CAV-T04-UWA) Silver HTPC case
- ECS 915GM mobo [Intel 915, GMA900, ALC665 audio, Gigabit LAN all working]
- Seagate 160Gb 5400rpm SATA2 HDD
- IDE DVD / CDRW Combo drive
- Intel Celeron D 3.06Ghz (SSE3)
- 2Gb DDR333 RAM (1Gb + 512Mb + 256Mb + 256Mb - whatever I had lying around
- External VGA-> S-Video/Composite + Flicker Fixer (capable of 1024x768)
- Freecom USB DVB-T Stick (EyeTV compatible)
- Manta TR-1 USB IR dongle from twistedmelon.com
- 802.11g wifi card
SERVER:
- Pentium 3 733Mhz
- 256Mb RAM
- 4Gb boot drive + 420Gb for data storage (160+160+100) - all IDE
- PCI SATA card for future expansion
- 802.11g wifi card
The software:
HTPC:
- JaS 10.4.7 (the newer kernels break sleep/wake on this machine)
- Apple's AppleTV OS (thanks to DiaboliK's Front Row Replacement package)
- Elgato's EyeTV 2.4
- Apple's DVD Player.app
- BHolland's IR remote emulation software, combined with some Mira-driven applescripts
SERVER:
- Windows XP SP2 (only because this machine has no SSE2 to run OS X)
- iTunes for Windows
- iPodifier
- Azuerus
The Hows, Whys and Wherefores:
Ok, so the whole HTPC thing is something i've been looking into for quite some time - before the OSx86 project even existed. Basically, I want to be able to download content (all free-to-distribute films and shows, obviously) from the internet, and somehow have a nice way to view that content on the living room TV. I also want to be able to record TV shows, preferably in a scheduled way (ie program it to record a show next week, and not have to remember when its on) and watch DVDs.
I've looked into various Windows-based solutions, and been frustrated with basically all of them. The critical point is the streaming - I want the media to be stored on a machine I can leave on 24/7 - this means hiding it under the stairs or in the garage. I also want to be able to stream to anywhere in the house - to my MacBook Pro, to my PC in the bedroom, or to the HTPC hooked to the TV in the living room. Every time I have tried this in the past i've ended up giving up because of jumpy, crappy video playback. I had almost given up hope, thinking that I needed 802.11n for this to be feasible.
However, I have learned a lot and am now proud to say I have my dream solution, and its all working over 'crappy old' 802.11g.
The hacking of the AppleTV software was the main driver for me to revisit this, and I must say i'm very glad I did.
Overview:
The server machine, outlined above, is running in the cupboard under the stairs, completely headless. Its job is threefold:
1) To act as a central repository for content.
2) To download new content.
3) To convert downloaded content into a format suitable for serving to the rest of the network, and automatically add it to the pool of available content.
The HTPC machine lives in the living room, connected to a TV. Its job is threefold:
1) Display content on demand on the TV
2) Record TV programmes to hard disk
3) Playback DVDs
Challenges:
- Content downloading aka Codec hell
- Streaming over 802.11g
- Backup / redundancy
- Switching between apps
1. Codec Hell
Content, by and large, is easy to come by. However, when you're dealing with content derived from internet sources such as torrent sites, you're at the mercy of whoever encoded it in the first place. Thanks to the way AVI acts as a container for Video and Audio codecs, and thanks to the bewildering array of such codecs out there, chances are that out of any 10 videos you download, only a couple of them will use the same combination of video and audio codecs.
Back in the days when I was still trying to do this stuff in Windows, I was installing codecs until I was blue in the face, only to discover that one particular movie or other would behave strangely - either colours would be wrong, or it would play too slowly, or the audio wouldnt sync, or the video would be upside down (!) or a myriad other problems.
I distinctly remember coming up with an 'Install Plan' for my HTPC which detailed three different versions of DivX, some versions of XviD, some other codec packs, utilities and tweaks, all to be installed in a particular and very precise order, to stop them breaking each other. I also remember that that approach only fixed it for only most - not all - of my content. There had to be a better way.
Wanting to move to an iTunes-based solution made me realise i'd need to bite the bullet and convert all my existing content to a standard format. This turned out to be the best idea I could have had, as it removed, in one fell swoop, the need for all these damn codecs, and gave me just one format to concentrate on. So I grabbed a copy of iSquint and set about converting everything to glorious H.264...
...Quack quack oops. H.264 needs significant CPU resources and time to encode. I had something in the order of a couple hundred gigs of video I wanted to convert, and while my Pentium D920 2.8Ghz hackintosh is no slouch, I did want to get it all done this century. So I opted instead for the crappier quality (but significantly faster to encode) MPEG4 option. I figured once you're viewing it on the TV, you're not going to notice. Well, I probably wont. I'm not an AV nut - I dont really care about uber-high quality, I just want to enjoy the movie. For audio I standardised on 128kbps AAC.
To automate the conversion of new content on my new media server, I have iPodifier set up to monitor two directories - one for incoming Movies, and one for incoming TV Shows. I get Azuerus to dump whatever i'm downloading into the relevant directory. iPodifier takes care of the rest - it picks up the video, converts to MPEG4 (or optionally H.264) and adds the converted video to the local iTunes library. Supersweet!
2) 802.11g Streaming
None of my content stutters or breaks while streaming to AppleTV running on the HTPC, even while the server machine is downloading at full pelt, and the CPU and disks are busy converting incoming video to MPEG4. Nothing i've tried before has managed it even when the CPU and network were otherwise idle. Nuff sed really - just amazing.
3) Backup / Redundancy
I had considered making the server machine use RAID-5 for redundancy. But I dont have any spare HDD space to sacrifice just now. The drives are all fairly new, and I wouldnt put anything on there that I couldnt replace. I may, however, revisit this in the future - either with Windows software RAID, or a PCI card.
4) Switching between AppleTV / DVD Player / EyeTV
Mira provides a nice, big, configurable menu which can be invoked with the menu button. I have it set up to give Front Row (really AppleTV), DVD Player and EyeTV options. All three apps are configured (in Mira) to quit if I hold down Menu. Thus, if I want to change app, I hold down menu to get back to desktop, click Menu once again, and select the relevant option.
Current Problems / Limitations / Issues / Ideas
There is very little thats 'wrong' with my setup, but here's my small list:
- the Mira applescripts cannot handle 'holding down' the up or down keys to scroll through a long list of movies - so that has to be done by repeat-clicking, which is a pain.
- cant wake the machine from sleep with the remote (no biggie - just hit the power button).
- the only audio out port which is working on the HTPC is on the front-panel. I need to figure out how to change it to work with the rear output, otherwise i have to keep plugging a long audio cable into the front every time I use the machine (my current workaround).
- I may think about removing the 'Quit' option from the appletv menu and installing the application launcher menu plugin to launch dvd player and eyetv that way. Not sure how that will compare to my current setup - I guess it'll be nicer cos it'll all be in the one interface.... hmmm.....
Other than that, this is killer-super-sweet. If I was doing it with a mac server and a real Mac Mini, it'd be even easier / better.
Anyone got any comments / thoughts?
