Wednesday, February 24, 2010

Screw You EU

In the great wide world of the web does Google have to respond to an EU anti-trust investigation?

Can it just flip them the bird, close down any offices it has in Europe and call it  a day?  Or does Google rely too much on European based datacenters and content caching mechanisms?

Sunday, February 21, 2010

MDL: Home Theater Meet PowerShell

IntroPart IPart II

As I mentioned in the last post, getting video to my wide array of end points can be a little challenging.  You may have been surprised when I said that getting video on a Zune was a challenge.

Well, it’s not that it is hard per se – after all the Zune software will go discover all that media from any Windows share just like it does for music.  The problem is that it needs to transcode all of that media before it can copy it to the Zune.

The other issue is those large video files aren’t optimized for playing on such a small screen.  It all works, but waiting for an hour or more to copy a single movie to your Zune isn’t my idea of a good time.  And I’m not always prepared enough to do it ahead of time.

So my solution was to couple HandBrake – a fantastic program for converting video files – with PowerShell.  I had to teach myself PowerShell along the way, but in the end I have a powerful script that converts all of my video files to smaller formats optimized for the Zune.  The good news for you is that the exact same process will work for iPods or any device that can play video with a couple small tweaks.

Step one is to download Handbrake and the Handbrake CLI (command line interface).  Launch Handbrake and create a profile that will convert videos into a format that your portable device can play.

There are a couple of items in this script that will need to be modified for your particular situation.

  1. Your preset – on Line 4 I’ve called mine simply ‘Zune’, change this to whatever profile you created for your device.
  2. The location of the Handbrake CLI on Line 2.
  3. The location of your source videos – you can have as many as you want, just make sure that they are separated by a comma – Line 7.
  4. The destination for your converted movies – Line 9.
   1: $HandBrake = New-Object System.Diagnostics.ProcessStartInfo

   2: $HandBrake.FileName = "C:\Program Files\Handbrake\HandBrakeCLI.exe"

   3: $HandBrake.windowStyle ="Hidden"

   4: $HandBrakeOptions = " --preset='Zune' "


   6: foreach 

   7: ($SourceVideoFile in (Get-ChildItem @("D:\movies\", "D:\TV\") -recurse -include @("*mpg", "*.mp4", "*.mkv", "*.avi", "*.mpeg") | sort-object name)) 

   8: {

   9:     $ZuneOutputFile = "D:\Zune\" + ($SourceVideoFile |% { [IO.Path]::GetFileNameWithoutExtension($_) }) + ".mp4"

  10:     if (!(test-path $ZuneOutputFile))

  11:     {


  13:         $HandBrake.arguments = $HandBrakeOptions + "-i " + '"' + $SourceVideoFile.fullname + '"' + " -o " + '"' + $ZuneOutputFile +'"'

  14:         $HandBrakeProcess = [System.Diagnostics.Process]::Start($HandBrake) 

  15:         $HandBrakeProcess.WaitForExit() 

  16:     }

  17: }

In short, the script:

  1. Compiles a list of all video files in the locations specified (and, conveniently, all of the subfolders too).

  2. Checks to see if the file exists in the destination.

  3. If it doesn’t already exist it converts it based on the profile that you set up.

Some items of note:  the script hides all of the conversion process so that it can be scheduled without interrupting any other activity on the computer it is running on. 

It will also take forever to run the first time since it needs to convert all of that video.  But if you schedule it on a routine basis it shouldn’t take too long.

Pretty cool, huh?

Technorati Tags: ,

My Digital Life – Part 2: Video Distribution

IntroPart 1

A brief recap: 

  1. I hate physical media.
  2. The world is moving to digital anyway.
  3. Just not fast enough for me.
  4. So I have to figure out how to make all this stuff work together since no one is doing it for me.

That wasn’t so bad.  Now ripping a crap-ton of media isn’t the most glamorous exercise in the world, but it isn’t exactly rocket science either – so I’m not going to explain how to do that.  Let’s just assume that all of my music and video is all in a central location.

Which is good, because it is all in a central location.  I have everything stored on a Windows 7 computer with Windows file shares. 

Cool, but how do I get everything to Zunes, Tivos and XBMCs?

Well, XBMC and music on the Zune are easy since they both recognize and can consume Windows file shares.  As an added bonus the XBox 360 can consume everything as well – though the experience is simply awful.  But the Tivo isn’t so straight forward and video on the Zune isn’t as easy as it should be.

First the Tivo.  Newer generation Tivo devices support multi-room content sharing (something Tivo calls “Multi-Room Viewing” (MRV)).  This along with Tivo Desktop provides most of the functionality I was looking for – but not all.

Open Source to the rescue!  Some enterprising gentlemen backwards engineered the protocol that Tivo uses for MRV and created an application called PyTivo that shares content across the network with any Tivo that supports MRV. 

PyTivo is very straightforward to install and use.  It isn’t 100% point and click, but its close and the forums are friendly and helpful.

The main advantage that PyTivo has over something like Tivo Desktop is that it will transcode content on the fly whereas Tivo Desktop requires that all of the content be stored in Tivo acceptable format.  Pytivo also can push metadata along with the video so that you can get names, descriptions, dates, etc populated which makes the viewing more seamless.

MRV isn’t the most fully functional method for consuming content, but it is acceptable.  The text only navigation is bland – especially after being spoiled with XBMC.  MRV doesn’t support subtitles either which comes up more often than I would have guessed.  But I can live with it, at least until I can get Live TV by some other method. 

Continued – Home Theater Meet PowerShell

Technorati Tags: ,,,

Saturday, February 13, 2010

End of a Decade

No need to write anything new.  It’s all been said before.

With this record during the past decade, it would be foolhardy to look forward … with anything more than restrained hope.  Perhaps we shall yet develop the wisdom to achieve a livable environment, a world of peace and order, a stable economy as free of inflation as of recession, a government brought under control both as to size and to extravagance, and a social order governed by justice and equality.

But, given the halting progress of the last 10 years, that would be quite a big order.

-Chicago Tribune, Dec. 31st  1969. 

You know, those dreadful days when budget deficits soared to unprecedented levels of 20 billion dollars.

Sunday, February 07, 2010

What Do You Consider Speech?

Can the government ban pornography?

Can the government impose morality laws on Hollywood?

Can the government prevent the Metropolitan Museum of Art from displaying Robert Mapplethorpe?

Can the government stop the publication of The Pentagon Papers?

Can the government outlaw donations to the Communist Party?

Can the government ban the showing of Hillary the Movie 30 days before an election?

Can the government ban Fahrenheit 9/11 30 days before an election?

Can the government control what 3 brothers say about a politician?

What if those three brothers are a union?

What if those three brothers are a cult?

What if those three brothers are an LLC?

What if those three brothers are a Corporation?

If your answer to those questions isn’t either all ‘yes’ or all ‘no’ I would love to hear a rationale explanation as to what the difference is – because they all seem the same to me.

Technorati Tags: ,