Monday, July 05, 2010

Why Students Hate School

Most students hate school because they believe that it is intended to build human capital but all of their classes have near zero real world application.

Since the classes are worthless they feel like they are wasting their time learning things that they don't need. 

If students understood more clearly that the goal of school is to get through school they would have an easier time putting up with the nonsense.  But, if too many understood this the value of the signal would likely diminish.

Technorati Tags: ,,

Saturday, May 08, 2010

MDL: Script to Convert MPG to AVIs

The MPG videos that I have are not getting along with XBMC.  To get around this I need to convert them all to AVI format.

avidemux has a great command utility and PowerShell has the power to batch the process.

$avidemux = New-Object System.Diagnostics.ProcessStartInfo
$avidemux.FileName = "D:\avimux\avidemux2_cli.exe"
$avidemux.windowStyle ="Hidden"

foreach
($SourceVideoFile in (Get-ChildItem @("D:\videos\") -recurse -include @("*mpg", "*.mpeg") | sort-object name))
{      
    $SourceVideoFile.fullname
    $avidemux.arguments = "--autoindex --load ""{0}"" --save ""{1}"" --output-format AVI --quit" -f $SourceVideoFile.fullname, ($SourceVideoFile.directoryname + "\" + $SourceVideoFile.basename +".avi")
    $avidemuxProcess = [System.Diagnostics.Process]::Start($avidemux)
    $avidemuxProcess.WaitForExit()
}

All done!  The videos all converted in a couple of hours.

Technorati Tags: ,,

Saturday, April 03, 2010

MDL: How to Share Databases with Multiple XBMC HTPCs

I’ve raved about how great XBMC is already.  Just to demonstrate how truly great it is, I went out and bought a Nettop so that I could install XBMC on my primary TV.

The one problem with this setup is that each install of XBMC maintains a separate database of content.  This is problematic for a couple of reasons.

First, I have OCD really bad and it bugs me beyond belief if the pictures, posters and details associated with all of the music, movies and TV shows are out of whack.

Second, XBMC keeps track of what you have already watched and you can choose to hide that content if you wish.  This feature isn’t all that useful if it only tracks watched content on a TV by TV basis.

So what is the solution?  It turns out that XBMC can be configured to run off of MySQL.  And since MySQL is designed for use by more than one connection, more than one XBMC can be setup to use a single database!

I am well adept at Google-Fu but couldn’t find any decent documentation on how to set this up so it took me some time.  But don’t fret, my sweat is your gain.

Step 1: Download and install MySQL (default everything is fine).  I’m running Windows so downloaded the Windows Community version 5.1.45.  The instructions will reflect this setup, but if you are running linux you should be smart enough to translate from Windows to *nix anyway.

Step 2: Once MySQL is installed and running, log into the database by opening a command prompt and typing: ‘mysql –u root –p’

Step 3: Create a user xbmc with password xbmc: ‘CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';’

Step 4: Create a couple databases:

“CREATE database xbmc_video”
“CREATE database xbmc_music”

Step 5: Grant the new user access to create and modify a new database:  “GRANT ALL ON *.* TO 'xbmc';”

note: yes, I am fully aware that there are more secure ways to accomplish this, but its a media database for Christ’s sake!

Step 6: Create a file called advancedsettings.xml and place it in %appdata%\xbmc\userdata\

Step 7: setup advancedsettings.xml to look just like this.  Note, if you didn’t follow my directions exactly you will need to modify the details to make your setup.

<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>localhost</host>
        <port>3306</port>
        <user>xbmc</user>
          <pass>xbmc</pass>
          <name>xbmc_video</name>
    </videodatabase>
    <musicdatabase>
        <type>mysql</type>
        <host>localhost</host>
        <port>3306</port>
        <user>xbmc</user>
          <pass>xbmc</pass>
          <name>xbmc_music</name>
    </musicdatabase>
</advancedsettings>

Step 8: Start XBMC and it will create the database for you. 

Step 9: Configure advancedsettings.xml on your second copy of XBMC making sure to change the ‘host’ entry to be the IP address of the computer hosting MySQL.

And there you go, a single copy of the database that can be shared by many computers running XBMC!

If you have spent a lot of time getting all of your metadata setup exactly the way that you want it, you can export the library before you start and import it when you are complete so that you don’t have to start over.

I also discovered one last benefit to sharing a DB on multiple computers.  The ‘New Content’ is synced on all of the hosts if you have that feature turned on.

One final gotcha – if you are using Windows you have to setup your content using SMB shares and not local drives.  XBMC doesn’t handle the ‘/’ characters correctly yet in MySQL.

Enjoy!  Hopefully I saved you a little time.

Technorati Tags: ,,

Sunday, March 21, 2010

Healthcare Predictions

With ObamaCare ready to pass here are my predictions on what its effects will be:

  • Higher Insurance Premiums
  • 10s of millions of people still uninsured
  • It will cost more than initially claim leading to spiraling government debt
  • Zero change in the rate of change for life expectancy

I know the above will happen, I only suspect the following:

  • Decreased innovation (measured by fewer patents)
  • Medical clinics legislated into oblivion
  • Increased regulation: limiting competition for doctors, pharma and hospitals

Even with the above failures, proponents will demand more government interventions, failing to admit fault and rolling back their mistakes.

Anyone care to make a wager?

Technorati Tags: ,,

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' "



   5:  



   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:     {



  12:         



  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: ,

Tuesday, January 26, 2010

Why Blackface is Still Funny

Buster Keaton appears in blackface in several movies, including one that I have seen recently College.  I have to admit that it was a bit jarring as I wasn’t expecting it.

However, when Downey appear in blackface for Tropic Thunder it’s pretty funny.  So this poses an interesting dilemma – why do I act with shock at one depiction of blackface and amusement at another depiction of blackface?

While the scenes of Buster Keaton in blackface were funny, it wasn't caused by the appearance of blackface.  Keaton is the Butt of the joke - so desperate to find a job to support his college career that he is willing stoop so low as to pretend being 'colored' to get a waiter job.

However, this comes into conflict with modern sensibilities - there is no shame in ethnicity, so the tension between what the Butt is implying ('colored' people are inferior) and our notions of what is acceptable ('colored' people could be waiters, customers or restaurateurs) prohibit the gag from succeeding in the way that was intended.

In Tropic Thunder Downey's character is also the Butt of the joke, but it is not because he is having to degrade himself.  In fact, the intent is the opposite - the character is so conceited that he surgically alters his appearance.  Downey feels that this simple act of reconstruction actually gives him the full past experience to actually make him black and understand the difficulties that a minority may actually have to endure.

We laugh at Downey because he believes that appearing in 'blackface' makes him more than he is.  We fail to laugh at Keaton because he believes that appearing in blackface makes him less than he is.

Technorati Tags:

Friday, January 22, 2010

Thoughts On Citizens United

Several random thoughts on this wonderful case:
Nothing about this case says anything about corporations as individuals.  The first amendment reads: Congress shall make no law ... abridging the freedom of speech.

If me, my brother Darryl and my other brother Darryl decide to take out an ad on TV saying that politician Bob is a douche and you shouldn't vote for him that's OK.  If we own a private business - that's OK.  If we have incorporated - that's not OK?  I don't get the distinction.  I certainly don't agree with giving Congress the ability to decide who can and who cannot speak or what they can say during certain portions of the year.

This specific case was the showing of an anti-Hillary movie within 100 days of an election.  I assume that people that are upset about this ruling would be OK if it were illegal to show Fahrenheit 9/11 within 100 days of an election?  That seems more than a little odd to me.  Where does the line get drawn?  Does Wag the Dog count as campaign speech?  Or Inconvenient Truth?  Why does GE get to say anything it wants, but Microsoft can't?  Do blogs count as media now?  Or is it only 'traditional' media that should be exempted from barriers to political speech during a campaign?

Once you decide that it is OK to draw lines on who can and cannot speak you have to give someone the power to decide who and what those things are.  And guess what?  Those rules are more likely to benefit the well connected than the average Joe.

Big corporations don't need help influencing the process - they already are.  The barriers are only really effective against those that don't already have power.

 

Technorati Tags: ,

Thursday, January 21, 2010

My Digital Life – Part I: Video

I start with video because it is the most difficult and due to this difficulty has forced my hand in a couple of different ways.

To recap this is what I’m trying to accomplish:

  • No physical media.  Period.
  • Access all video from any device.
    • Zune
    • TVs
    • PSP
    • Laptops
  • Rich metadata associated with the video.

That’s not a very long list but requires a metric crap-ton of software to accomplish.

I 0nly have two TVs and two different personal devices (Zune and PSP), so you would think that this would be easy.  But there are some severe challenges.

First, internet video isn’t very good yet.  Netflix is the best of the options available, but its catalog is still pretty limited.  Hulu has a pretty wide selection of content, but the catalog is really shallow – only a handful of episodes are available at any particular point in time.  This really sucks if you discover a show late and want to get caught up.  All of the other options are worse than terrible.  The network sites have all of the problems of Hulu – only a handful of episodes – but none of the positives.

This forces me to use either traditional cable television or satellite.  As much as I hate my local cable provider and I didn’t really have an option. 

Which brings me to severe challenge number two – a set-top box is usually pretty limiting and my first requirement I said no physical media so I need to figure out how to stream my digital content to whatever set-top box I decided to use.

In order to accomplish everything that I wanted to accomplish I needed flexibility which means CableCard, so I bit the bullet and bought a TivoHD and subscribed to [insert evil cable company here].

I considered several options for my set-top box:

1) An HTPC.  This was actually my first choice.  I really wanted to make this work.  Mostly because it offers the ultimate in flexibility.  Whatever you wanted to do should ultimately be possible with a full PC, right?  Just one problem – there aren’t any CableCard cards available for PC (is that unnecessarily redundant?) if you do-it-yourself.  Kinda bullshit in my opinion, but whatever.  No HTPC for me.

2) [Insert evil cable company here] provided equipment.  Just kidding, I never considered it.  They have crap for interfaces, they are slow and overall – just suck.

3) Tivo.  The first and best DVR.  The interface is so intuitive that my father-in-law had absolutely no problems just figuring it out.  The remote is the epitome of elegant design.  Plus:
*Tivo is aggressively adding internet based content like Amazon Unbox, Netflix, YouTube, Rhapsody.
*There is a well established online community doing third party development to add functionality to the platform (this becomes important later).
*They have a take-it-with-you option with TivoToGo that fits into my everywhere on any device concept.

For my second TV I considered multiple options:

1) First was the XBox 360.  Seemed to be  a logical choice, after all I was using:
*Windows 7 for a media server. 
*It’s a decent Media Center Extender
*It does HDTV natively.  
*It also does Netflix natively with Zune content and other services (I’m certain) to come. 

On paper it looks like the perfect option - however, it sucks.  Every time you start up the extender service it has to rediscover the whole library before you can actually watch/listen to anything.  Media Center is pretty, but that just isn’t enough.

2)  Windows Media Center directly connected from the my media server.  Another seemingly logical choice, especially since it cuts out the middleman of the 360 as described above.

Oddly, I liked it even less than the XBox and I’m not 100% certain that I can explain why.  I think that the primary reason is that it does not do a very good job of handling ripped television shows.  They are displayed in the same flat format that movies are shown as.  It’s options in the realm of internet video are also pretty limited, though better than the 360.

The other major shortfall is the lack of control around metadata.  You have to just trust that Media Center is going to correctly identify the movie and pick the right pictures, descriptions, etc.

3) Boxee, again directly connected to my TV.  Again, I didn’t like it, but have a hard time explaining exactly why.  It’s got a nice interface, but it doesn’t handle multi-episode content all that well.  The internet video plugins work seamlessly with the rest of the interface.  It has tie-ins with social networking if you feel compelled to tell everyone immediately exactly what you are watching and/or listening to.  But it’s missing a certain something. 

4) XBMC.  One thing that you have to admit about XBMC – its gorgeous.  Seriously, check out the screenshots and they don’t even do it justice.  If you like eye candy then there is really no choice other than XBMC.   Both XBMC and Boxee offer total control over your metadata, but XBMC is far better at automatically detecting your content and giving your some control over fine tuning the details.

XBMC also does an amazing job of handling multi-episode content by sorting shows into shows – seasons – then episodes.  It keeps track of what you have already seen and can even hide descriptions for stuff that you haven’t seen so that it isn’t spoiled.

While XBMC does offer an almost unlimited supply of internet content the integration sucks.  It is so bad as to be almost unusable.  Using the plugins that allow streaming off of sites like NBC and CBS completely destroys the continuity of the the eye candy.  Its like losing yourself in the beauty of Avatar and having jack Black wonder onscreen to tell a fart joke.  The rest of the experience more than makes up for this lacking so I’ll overlook it for now.  But at some point I may have to switch to another product just so that I don’t ever have to experience XBMC’s implementation of internet TV.

So that’s it – all of that work just to figure out that I need a Tivo and an HTPC running XBMC.    If you have noted that I haven’t gotten to gigantic challenge number 3 – making it all work together – you can tell that this is going to be a huge pain in the ass.

Technorati Tags: ,,

Wednesday, January 20, 2010

My Digital Life

I’ve been predicting for almost three years that the age of media (DVD, CD, etc) is coming to an end.  Digital is the way to go – and not just for music.

Streaming video content is becoming more than adequate for most users and fairly mainstream.  Unfortunately, nothing really works together the way that it should.  In my perfect world my home would have one device that serves all of my content to any device.

This isn’t really possible today – certainly not easily – but its getting close.  This post is going to serve as an anchor for a series of posts on how I make it all work together.

Here is the scope of what I am trying to do:

Everything digital – no media and make all of the video, documents, music and pictures available from:

  • All four laptops (his, hers and 2 kids)
  • All digital music players
  • TVs
  • Speakers (inside & outside)
  • Social networks

Oh, and I want to protect the most important stuff from a home disaster and the less important stuff from physical failure.

Doesn’t sound too hard does it?

At some point, I’d like to tie in some home automation stuff too (turn off/on lights, close blinds, etc, etc).  Some kitchen automation could potentially be interesting as well.

To start with here are some of the devices/services that I am trying to make work together:

  • Tivo
  • Windows 7
  • XBox 360
  • Wii
  • PSP
  • Zune
  • SanDisk MP3
  • XBMC
  • Flickr (only one account, but multiple people need to manage)
  • Facebook (at least 3 accounts)
  • Twitter
  • Comcast voice
  • Google Voice

Did, I mention that I also wanted all of our phone numbers to kinda work together too?

Technorati Tags: ,

Friday, January 01, 2010

It’s Getting Better All the Time

Whether or not you think 2010 is the start of a new decade, one thing that we can agree on is the explosion of editorials proclaiming that the last decade has been the ‘Worst. Decade. Ever.’

And I admit that there was a lot to be depressed about: 9/11 and the ensuing loss of civil liberties, Guantanamo Bay, Iraq & Afghanistan wars and general TSA nonsense.

The ever escalating War on Drugs and the militarization of the police.

Bush.  Medicare part D.  Exploding deficits. TARP. NCLB.

Obama. TARP.  Exploding deficits.  Basically Bush Part II, only more so.

Kelo and continued erosion of property rights.

Yet in spite of the constant encroachment of government into every aspect of our lives are lives have gotten immeasurably better.

The explosion of digital media: iPods, Netflix, streaming video, Kindle.

Ubiquitous cellular service and smart phones so that we can be connected everywhere all the time (unless, of course, you are an AT&T customer).

Social networks allowing us to keep in contact with those that we care about all the time.

Blogs – which for me, has given me a far better education that anything I have gotten in formal schooling.

Hybrid cars, long last batteries, $300 computers, high speed internet, HDTV, game consoles, self-checkout, Bluetooth, cheap storage, the emergence of Google, the re-emergence of Apple, medical advances too numerous to mention.

The list really just goes on and on.  So the next time you read one of those stories telling you how crappy the last ten years has been ask yourself – do you really want to go back and live with the stuff that was available in 2000?

I know that my answer is a resounding ‘No!