7/31/12

TiVo to Mac - Mountain Lion Edition

With every new OS update from Apple you get a lot of cool new features. Unfortunately you also get a few apps that don't work. One application I rely on for getting TV shows off my Tivo is iTivo. I wrote about it here in a previous post. After I upgraded to the new Mountain Lion OS  I found that iTivo was broken. Now I had to go to plan B if I wanted to watch my favorite TV shows on my iPad or AppleTV. Thankfully plan B works great. It just takes a few more steps. 



UPDATE - 2/20/2013


The work around outlined below works fine but as of 2/20/2013 iTiVo is working again. The application does needs a manual fix however. Please download the latest iTiVo and apply the fix outlined in the this MacITHelp post





Part 1 - Finding Your Tivo


Our first step is downloading your TV show from your TiVo to your Mac. To get download your shows you first have to locate your TiVo on your network and log in. Did you know that you can actually log onto your tivo from any web browser? No, well you can but you need to know the IP address that your Tivo is using. The easiest way to figure that out is to use a free application called LanScan.



You can download LanScan from the Apple App Store here. Once you have LanScan installed start it up and scan your network. You should see a screen like this:


You will notice that my Tivo has the local IP address of 192.168.2.10.  Armed with that information you can now log into your Tivo using your favorite web browser and grab your files.


Part 2 - Logging into Your Tivo


Open up a browser window and type in the IP address you found above. For this login you will want to use a secure login so make sure to type in the "https://" before your IP

           https://192.168.2.10

Once you do that you should see a login screen like this one:




The User Name will always be "tivo" and the password will be your personal Tivo Media Access Key (MAK). If you don't know what your MAK is follow these steps. On your TiVo box go to TiVo Central > Messages and Setup > Account & System Information > Media Access Key. Write that number down, you will use it a lot to get things working. 

Once you log onto your box you will now see all your current recordings.


To download a show just click the download MPEG-PS link and your file will be transferred from your Tivo to your Mac. Remember though that it will be encrypted so your next step will be to decrypt the file.


Part 3 - Getting the Decryption Software


The software to decode the TiVo files isn't a standard Mac application and runs under UNIX. To get things to work you will need to download and install a small UNIX application then build a script to use it.

Don't worry, it may seem daunting but I've done all the leg work so this is going to be easy. I've included a lot of screen shots for each step so just follow along. First you need to download a file set called MacOSX_tools from an application called kmttg.

Once you have it downloaded and decompressed it open up the folder and find the file called tivodecode. It's at the bottom and only 66KB in size.


You now need to start channeling your inner UNIX geek and use the terminal to copy the "tivodecode" file to a specific location on your Mac. 


Part 4 - Loading the decryption Software


Open up the terminal application. You will find it in the Utilities folder inside the Application folder. 



Once it's open you need to go to the /usr/sbin location where you will install tivodecode. Type in 

    cd /usr/sbin

Now type in "sudo cp"  and drag the tivodecode file you downloaded to the terminal screen. When you drag a file onto the terminal screen it will automatically that files current location and type it in for you. Now finish the command by typing a "."  The period says 'copy this file to my current location'. So the full second command  might look like this:

  sudo cp /FTP/kmttg_MacOSX_tools_v0p8l/tivodecode/tivodecode .

After you you are sure you have the command correct hit the return key. You will be prompted for your password and then the command will be executed. Hopefully everything will work fine and tivodecode will be installed. To check if it was copied you can perform the list command to see.

  ls -al /usr/sbin/tivodecode
  -rwxr-xr-x@ 1 root  wheel  57096 Jul 30 16:32 /usr/sbin/tivodecode

You should see tivodecode listed rather than "No such file or directory".



Part 5 - Creating a script to decode your Tivo Files


Now that you have installed the software you will want an easier way to run tivodecode rather than use the terminal. The easiest way is to create a script. To do that use Apple's own Automator application located in the applications folder. Find it and open it up. 





Once it is up select "New" from the file menu and "Application" as the type of Automator file you want to create. You will only need a 3 step script to decode your Tivo files. Here's a picture of the script.



Your first step is to select the "Files & Folders" icon on the left then drag the "Ask for Finder Items" into the window pane on the right.  In the "Prompt" section just type in "Choose a Tivo file" and fill the folder location you normally use when you download your Tivo files.  

Now select "Utilities" from the Library and drag "Run Shell Script" to the Window pane on the right.  First make sure the "Shell" is set to "/bin/bash". In the Shell Script window type the following:

/usr/sbin/tivodecode -m <MAK> -o "/Folder/tivofile.mpg" "$@"

Remember to insert your real MAK address into the command and the real path to your output file. 

If you have Growl installed you can add this final step. It isn't really required but it does help you to know when your file is done decrypting.  In the "Utilities" menu find "Show Growl Notification" and drag it to the right side of the window. Now type in a title and description. 

Now that you are done editing save the file and make sure it's saved as an application in the "File Format" drop down menu.




Part 5 - Running the Script


This is the fun part. You have all the pieces in place to download your Tivo recordings & decrypt them. Start up the appliclation you just created and select a .TiVo file.

Once selected you will see the command you set up to run with your real MAK. If you want to change the location of the file or the file name you can do so here. Just highlight the text you want to change and type in a new name or path. 

Once you hit continue your file will process in the background and eventually you will see the notification that your file is done decrypting. VOILA!! you are finished. 

As you can see, it would be much easier to use the iTiVo application but until someone fixes it you have a work around. It's a lot of steps but nothing difficult. Let me know how it works out for you. When iTiVo pushes out an update I'll let you know.


UPDATE - 

It seems that some people are getting a "Bad CPU type" error when they try to run tivodecode. This is probably due to the compiled version downloaded above. There's a couple of things you can try to fix it. 

Download tivodecode from Source Forge. You can try the latest version or an old version.

Some people have also had success extracting tivodecode from the old, non-working, iTivo application.  Open the iTivo package contents by control+clicking on the iTivo application and selecting "show package contents". In the Contents/Resources folder you should find a copy of tivodecode. Drag a copy to the desktop (option+drag) and then move that version of the tivodecode file to /usr/sbin to see if things work. 





33 comments:

  1. Thanks a ton for the help. This is a great workaround. If someone could please update Mountain Lion support for Itivo that would be awesome!

    ReplyDelete
  2. This sounds like a great workaround, but I'm stuck on the last step.

    I keep getting the following error when I run the script.

    - Bad CPU type in executable (126)

    My shell script says

    /usr/sbin/tivodecode -m 1234567890 -o "/Users/myhomedirectory/Desktop/tivofile.mpg" "$@"

    - the 1234567890 is my real MAK in the script

    - the myhomedirectory is my real home directory in the script

    Help.

    Rich dG

    ReplyDelete
  3. Rich - I think the problem may be the type of CPU in your Mac. Are you running an Intel processor or Core Duo? It probably means you need to either compile tivodecode for your Mac or perhaps download a different version that has a compatible binary.

    You can try this download: http://www.macupdate.com/app/mac/23433/tivo-decoder/

    This pre-packaged script contains it's own version of tivodecode. That version is different than the one I directed you to.

    Bruce

    ReplyDelete
  4. Hi Bruce,

    I have a MacBook Pro Mid 2010 Intel Core i5 2.4 GHz.

    Tried that TiVo decoder from MacUpdate and got the same error
    - Bad CPU type in executable

    What should I try next?

    Thanks,
    Rich dG

    ReplyDelete
  5. Same for me. . . Core 2 Duo
    Appreciate all the help and effort

    P.

    ReplyDelete
  6. For those having issues with the "Bad CPU type" error here's a couple of things to try. Download the latest or past versions of tivodecode at Source Forge

    http://sourceforge.net/projects/tivodecode/files/

    You can also extract a version from the old, non-working, iTivo application by control+click on the iTivo application and selecting "show package contents". In the Contents/Resources folder you should find a copy of tivodecode. Drag a copy to the desktop (option+drag) and then move that file to /usr/sbin to see if things work.

    Good luck & let me know what works for you!

    ReplyDelete
  7. Extracting from iTivo did the trick. Thanks!

    P.

    ReplyDelete
  8. Ramanda - Sorry to hear the UNIX copy isn't working for you. Can you tell me what the error is you are getting? Unfortunately UNIX is unforgiving you you have to type e-x-a-c-t-l-y the right command to get things to work. Did you cut and paste the commands I listed? That should work for you as long as the path to your download location is correct. Another example on the copy command would be:

    sudo cp /Users/ramanda/downloads/kmttg_MacOSX_tools_v0p8l/tivodecode/tivodecode .

    ReplyDelete
  9. extracting from iTivo failed with a -1 error.
    -: -c: line 0: syntax error near unexpected token ‘-1’

    ReplyDelete
    Replies
    1. a-ha! < > are not supposed to be left in the command. The MAK has no special characters in it.

      Delete
  10. @Anonymous - Glad you figured it out. Sorry for the confusion. It's hard to write out explicit instructions that everyone will understand.

    ReplyDelete
  11. Extracting the tivodecode from iTiVo also worked for me.

    Thanks,
    Rich dG

    ReplyDelete
  12. if you don't want to mess around for renaming the output file, use this line in your script:

    /usr/sbin/tivodecode -m 1243456678 -o "$@.mpg" "$@"

    Thanks for this article

    ReplyDelete
  13. Unfortunately, no matter the file selected, during Step 4, when I do the sudo cp step, I keep getting something like this (the path varies depending on which tivodecode file I have selected):

    sudo: cp/Users/daniel/Desktop/tivodecode: command not found

    The file just won't copy to /usr/sbin/

    Any thoughts?

    ReplyDelete
  14. It appears that by just navigating to /usr/sbin/ by entering that in "Go To Folder" I was able to drag and drop it in with my password. Apologies for the confusion!

    ReplyDelete
    Replies
    1. I have the same problem. Maybe they've locked it down even further. Are you on Virgin Media in the UK?

      Delete
  15. My web browsers will not connect to my TiVo HD at https://10.1.0.102. Yes that is the correct IP address. I don't even get a request for username and password. The browser (Safari or Firefox) just waits for a response that does not come. Any ideas? Do I have to turn on web access on my TiVo HD or something?

    ReplyDelete
  16. My now playing list is only showing 50 out of 126 total items, any idea how to view the remaining shows? Much Thanks!

    ReplyDelete
  17. Here's the great news: iTivo for Mac has a new Beta version that seems to fix the problems of previous versions. Go to this page and download the latest version:

    http://code.google.com/p/itivo/downloads/list

    The fix seems to work and a new release version should be out soon. For now the beta seems to work fine.


    Bruce

    ReplyDelete
  18. i greatly appreciate the advice so far but i'm getting stumped in Part 4 when the utility terminal prompts me for a password. (1) i don't know which password i am supposed to enter and (2) the terminal does not allow me to type any characters.

    it's worth noting that i know absolutely nothing about UNIX and this could be purely user error.

    ReplyDelete
  19. I have everything working, to where i dont use the "Ask for Finder Items", just the raw script. just drag file on it and it decrypts it - but it wont accept multiple files at one, what do i add to make that work?

    ReplyDelete
  20. @wewrfgdgseretyhfdgf

    UNIX is kind of harsh sometimes and like any programing language takes time to learn. The answer to your question is something called a Do Loop. You can do a search and find info about it or... You can look at my latest TiVo post and see that there is a fix for iTiVo that will allow you to download & Decrypt multiple Tivo files. Take a look at this post:

    http://macithelp.blogspot.com/2013/02/continuing-adventures-with-itivo.html

    You should be able to download the latest copy of iTiVo, make a few changes and have everything up and running in no time. Good luck!

    ReplyDelete
  21. I got your Automator app working because I had already downloaded a great many files using Tivo Transfer (part of Toast) and needed to convert them. iTiVo seems to only allow you to convert them if it also gets to download them. So tivodecode and the Automator app seemed to be ideal. However, it's tedious to do one file at a time. Could you offer any advice on how to use Automator to do a multi-file selection, or a whole folder? I see the "Allow Multiple Selection" checkbox in the Ask for Finder Items step, but there's got to be more steps to get it to go from one file to the next.

    You may ask why I need this if I have Toast to convert them. Toast won't do full HD resolution like tivodecode does.

    ReplyDelete
  22. @Collector

    I hope you know that there is a fix to iTiVo that allows you to download multiple files. After you download the latest version and apply a fix outlined in this post:

    http://macithelp.blogspot.com/2013/02/continuing-adventures-with-itivo.html

    You should once again be back in business. Just select multiple files from your Tivo and you can download and decrypt in one step. But to apease the masses I will take a look at setting up a multiple file decrypt script and post it for you once I figure it out.

    ReplyDelete
    Replies
    1. Yes, I'm aware. But since I already have over 200 shows transferred and archived (1.06 TB) in .tivo format, it would be a GREAT help to be able to decode them in batches apart from iTiVo. Thanks so much for any help you can give. I'm a long time Mac user, but this is my first real attempt at using Automator to accomplish anything like this. And I know next to nothing about Unix.

      Delete
    2. @Collector

      This one is for you! I just put up a new post.

      http://macithelp.blogspot.com/2013/03/workflow-processing-multiple-files-tivo.html

      It walks you through the set up required to process downloaded .TiVo files. Let me know how that works for you.

      Delete
  23. works great. i had to zoom in to the screenshot to see that the pass input was set to as arguments, but all is well now, thanks!

    What we the variable be to reuse the name of the original file in the output file with the new .mpg extension?

    ReplyDelete
  24. oh, and, what about using the .tivo file's location as the destination path?

    thanks!

    ReplyDelete
  25. I get tivodecode to output a .mpg file; however, when I open open the file I receive an error message: "The file could not be opened. A required codec isn't available." Running Mac OS X 10.7.5 on a 15-inch 2011 early MacBook Pro.

    ReplyDelete
  26. Sorry for my hiatus - Here's some insights into some of the issues that have popped up.

    A .mpg is a file type that isn't supported by Quicktime out of the box. You can watch the file directly using an application like VLC. You can also install Perian (http://perian.org/) or Flip4Mac (http://www.telestream.net/flip4mac/). If you wish, you can also use any Video trans-coding application like Handbrake to first convert the file then edit it.

    If you need some insight into alternate scripting locations or downloading multiple files I wrote up another post about it here:

    http://macithelp.blogspot.com/2013/03/workflow-processing-multiple-files-tivo.html

    ReplyDelete
  27. Thank you for the info on .mpeg! Thank you

    ReplyDelete
  28. Here is another easy guide https://www.idealshare.net/video-converter/play-tivo-files-on-mac-ipad-itunes-apple-tv-wmp-quicktime.html

    ReplyDelete