MythTV and Apple – my saga

Over the past year I’ve been gradually migrating all my hardware from home-built linux boxes to Macs (Mac Mini’s specifically). I’m still keeping my separate MythTV frontend/backend setup. I’m using a Mini as my backend in the office, and a Mini as my frontend in the family room. I’m going to do a couple different posts, describing my frontend configuration, and my backend configuration. Each has it’s own interesting twists, but overall, I wanted to get back into my blog, and try and help folks who might be going down the same path (going Apple).

Next post… my frontend.

Myth Mac just got promoted

My MythTV frontend on a Mac Mini experiment just moved up to a new level. My downstairs, full-time, home-built, ubuntu frontend died. The mac just got promoted from a part-time upstairs frontend, to a full time downstairs big tv frontend. I have been a bit hesitant really promoting the mythtv on a mac experiment, but now that I’ve had it downstairs and up front for about a week, I can say that I’m very impressed. Here are some of the things I like about the mini:

  • Small
  • Silent
  • I can run far more useful applications with the same remote as mythtv than I could with my Linux box
  • did i say small?

The third bullet (all the applications I can run) deserves some attention, and I’m going to do a separate post on just that topic. Here are a few things I don’t like (so far…)

  • I haven’t been able to resize the screen to non-native resolutions without getting skippy playback. Which means.. overscan.. and lots of it.
  • The mac remote has 6 buttons (3 are overloaded, so there are really 9). That’s enough for 95% of the everyday use, but not for more advanced tasks.

As I mentioned above, the possibilities are broad and wide when it comes to now integrating MythTV with other Mac multimedia apps. Here is a short list.

  • Hulu Desktop
  • Frontrow
  • Itunes
  • Netflix Watch Now
  • Better games

As I begin putting all this together into one monster media machine, I’ll make sure to document the pitfalls, how-to’s etc… along the way for anybody who wants to go down this path.

One Trillion bytes

A co-worker recently sent me a link to an interesting site about what a trillion dollars looks like. A trillion dollars is cool and all, but since this is a technology blog, I thought I’d take a cut at:

What does one TRILLION bytes look like?

All this talk about “google” and “data”…

A billion bytes…

A hundred billion bytes…

Eight hundred billion bytes…

One TRILLION bytes…

What does that look like? I mean, these various numbers are tossed around like the amount of data stored on bill gates secret linux file server, so I thought I’d take Acorn out for a test drive and try to get a sense of what exactly a trillion bytes looks like.

We’ll start with a 720k floppy. Currently the largest, most useless physical media device in general circulation. Most everyone has seen them, anybody who remembers Billy Beer have owned them. Guaranteed to lose data wherever they go.

5.5 720k floppy

A box of fur covered floppies is sits nicely on a desk and contains 7,200 Kbytes!. Fits in your pocket awkwardly but is more than enough for day or two of shamefully decadent ‘image downloading’.

Box O' Floppies

Let’s put all these thousands of bytes into perspective, shall we?

One floppy

Believe it or not, this next little pile is 9,676,800 bytes (150 5.25″ floppies). You could stuff that into your go bag and walk around with it.

10 Meg

While a measly 9,676,800 bytes looked a little unimpressive, 96,768,000 bytes is a little more respectable. It fits neatly into 4 contiguous 8×10 standard cubicles

100 Meg

And One Gigabyte… now we’re really getting somewhere… enough to store over 8 minutes of high-definition television.

1 Gig baby

Next we’ll look at ONE TRILLION bytes. This is that number we’ve been hearing so much about. What is a trillion bytes? Well, it’s a million million. It’s a thousand billion. It’s a one followed by 12 zeros.

You ready for this?

It’s pretty surprising.

Go ahead…

Scroll down…

Ladies and gentlemen… I give you 1 trillion bytes

c'mon... what were you expecting

Notice those platters are triple stacked baby.

So the next time you hear someone toss around the phrase “dude… I just got a new 1 Terabyte drive…”… that’s all they’re talking about.

TextMate OpenSong Bundle

Our Music Worship Team at church uses OpenSong, opensource Worship Planning software, but one of my frustrations has been that it’s music editor is not the best. I’ve also been getting a bit deeper into TextMate; more specifically, bundles. I’ve recently put together an OpenSong bundle which primarily allows for better syntax highlighting, but also has a ‘new file’ snippet for creating a new OpenSong file.

It’s a work in progress, so as I modify it, I’ll be sure to keep it updated.

Streaming HD wirelessly

As I had mentioned in a preview post, I’ve been working on a mac mini MythTV frontend. The only current issue I have is streaming HD content over 802.11n. My first attempt worked great as long as I didn’t move the mini to a different room than the router. I’m learning a bit more about wireless networking as I go along here, essentially, my ‘old’ router operates in the 2.4 Ghz range which is significantly more crowded than the 5 Ghz range, so I’m going to test out a 5Ghz router this weekend, and see what I can get.

Another possibility is to transcode the HD to SD (which is the quality I would be viewing it anyway) and stream that. I don’t want to outright replace my HD content (I still watch it in HD downstairs afterall), so I might set up a User Job to transcode it, and place an entry in the MythTV database for a ‘second’ show.

Mac Mini and Analog video

Well, it seems in Apple’s infinite wisdom that they’ve dropped support for analog video in the newest mini. After pounding through forums and what-not, I’ve discovered the same issue exists for the macbook pro’s as well. Unfortunately, that will lead me to the purchase of a VGA -> S-Video adapter. More on that later, as I continue my quest for a turnkey MythTV frontend.

Ruby code for creating redirects for my (roughly) 100 old posts

As I mentioned in a previous post, I moved my blog from my own host, to Google’s blogger. As a result, there are ~ 100 old blog posts that are linked to from all over the place and I’d like to have a graceful way to re-direct. The previous post mentioned updated the header with a 301 redirect. Going through so many old posts, and updating each one was nuts, so I wrote a small ruby script to handle the duties.

# update_redirects.rb
# This script will traverse the directory given as the first argument
# and replace the contents of all files with the 'redirect_text'
# some special conditions: it assumes that they are php redirects, but you
# can use <meta> redirect tags as well for plain HTML

require 'find'

dir = ARGV[0]
redirect_text ='<?php
header("HTTP/1.1 301 Moved Permanently");
?> '

# find all the files that were published by blogger (they are all in their
# respective year directories)
Find.find(dir) do |path|
if path=~/^./200.*.php$/,'w') # open 'w' truncates the file
new_text= redirect_text.gsub("%%PATH%%",path.gsub("./",""))

MythTV on a Mac Mini

I’ve finally gone and done it. I’ve purchased a new mac mini for an upstairs MythTV frontend. MythTV runs well on Mac OS X so I figured I’d give it a shot. I’ve never experienced anything quite as easy as this. The Mac Mini is the *perfect* MythTV frontend. I’ve unboxed (always fun with Apple products), plugged it in, gone through initial Leopard setup, and downloaded the precompiled dmg from The Snider Pad. I have my backend broadcasting itself as a UPnP Media Server, so when I fired up on the mac for the first time, it found it right away. Once it connected, I was done. There were all my shows. Of course, the first thing I did was go straight to some of my traditionally difficult HD content, and it played it back flawlessly.

Now onto the next steps

  • I streamed HD over 802.11n in the same room as the router, I need a real-world test upstairs
  • The apple remote worked out of the box, but only has six buttons. The nice thing about MythTV is you can remap the buttons, but six… hmm… just not quite enough. I’ll need to find out if there is another remote that can work. I might go down the lirc path

Bottom Line

This was such a pleasant experience and the mini is soooooooooo silent that I’m counting the days until my monstrous 4 year old media PC dies in the family room! Another project might be to figure out what the most compatible tuner’s are for a mac and kill my loud backend in the office. I’ve been impressed with MythTV on a Mac OS X. I hope to write some apple friendly applescripts/automator actions to do some fun things that I’ve been dying to do.

Making google happy with redirects

I’ve been moving my blogs around a bit the last couple days, and the thought occured to me that I have years of posts that are still generating pretty significant traffic to my blog. How can I update the ‘old’ urls so that they 1) redirect the person who runs across an old link and 2) tell google to update my link in their search results and keep my rank.

Here you go:


header("HTTP/1.1 301 Moved Permanently");


That little dandy replaces every page that I want re-directed. Now… wouldn’t it be nice to write a little ruby script to go through my 100 posts and update each one!

New mac mini

The new mac mini has been released, and we’ve decided to go ahead and use it for a second frontend for the MythTV backend. Not that we’re big TV watchers, but having a second frontend upstairs gives us a chance to hole up upstairs when sick/etc… and watch the same programs as downstairs. We’ll see how streaming HD over 802.11n goes!