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 8x10 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("./",""))