Synchronizing Media Center TV shows to an iPod Video

Part of my justification for getting a new iPod would be that it would have video support, and I could use it to watch recorded TV shows while I'm on the bus or waiting in line somewhere. I figured that somebody in the world must have written some software to automatically synchronize TV shows recorded on a Media Center PC to an iPod Video. I mean, right?

Apparently not. Or at least I couldn't find any software to do that, free or commercial. Sure, there are various tutorials for converting MCE videos to iPod-compatible files, but they all involve manually running 3 different programs and then importing the video into iTunes by hand. There must be an untapped marked for an MCE plugin that automatically converts and syncs TV shows to an iPod. Somebody could make a killing here!

In the meantime, it looked like I would have to write my own program to do this. These were the requirements I had:

  1. Plop the iPod into the dock
  2. Go to bed
  3. Wake up, the iPod automatically has all the TV shows I recorded the day before

I wrote a small C# program that does the following things:

  1. Check if I have deleted any recorded shows from the Media Center PC. If so, delete the iPod versions out of the iTunes library.
  2. Find all of the new TV shows that the MCE recorded since last syncing to the iPod.
  3. Take each new show and convert it from a .dvr-ms file to a .mpeg2 file using DVRMSToolbox.
  4. Convert the .mpeg2 file to an MPEG-4 file using ffmpeg, shrinking the video to 320x240 at 512 kbps.
  5. Delete the temporary MPEG 2 file.
  6. Save the .mp4 file into the iTunes video library folder.
  7. Force iTunes to update its library database and sync to any connected iPods (using iTunes Library Updater).

Next I created a Scheduled Task to run MCEiPodSync every day at 3:00 AM:

MCEiPodSync

Now all I have to do is plug in the iPod and go to bed. Sweet! Here is a pic of the iPod playing Full House (it was on while I was testing):

Full House

Here's a link to the source code for my little program if anybody's interested: MCEiPodSync.cs. You just have to switch the const strings at the top to point to the correct path to your Recorded TV and iTunes library folders.

Posted on August 7, 2006
Comments (7) Trackbacks (0)
  1. Heh, I have a similar app, but I’m stuck in the stoneages: mine downloads the latest The American Life, converts it from Real Audio to mp3 using some illegal Russian hackware, and then… well, it used to upload itself to my phone, but ActiveSync 4.2 has mucked with it, it seems.

  2. Heh it’s not surprising that it broke, considering what a POS ActiveSync is :). For the same reason, I am afraid that new iTunes updates will break mine..

  3. have you tested this with itunes 7?

  4. I was too afraid to upgrade to iTunes 7 so I haven’t tried it yet 🙂

  5. I am trying to remove the commercials! All i got was a program to find them, but it wont delete them! What do i do!

  6. Great code. Thanks for this.

    I have two questions though:

    1. In the code you mention an iTunes Library Updater profile file. Presuamably it contains the arguments for the program, but what does the syntax look like. Can you give an example?

    2. How do you stop ITU deleting all your music files as well as MP4 files when you purge videos with no MCE equivalent. I have tried to use the /s switch for ITU but it deletes my whole collection!

    Thanks.

No trackbacks yet.

Me

Apps

CubeCheater Piratizer

Search

Archives

Site Tasks