TiVo Community Forum banner
  • TiVoCommunity.com Ambassador Program Now Open! >>> Click Here

New program for 1 step TTG downloads, decryption, encoding - kmttg

2M views 13K replies 921 participants last post by  mattack 
#1 ·
EDIT: This program has evolved a lot since this 1st post and now is written in Java and much easier to install than before (very easy on Windows and Mac OSX)... See http://sourceforge.net/projects/kmttg/ for details or visit the end of this thread for more up to date information.

kmttg is a Perl/Tk program I wrote to facilitate TivoToGo (TTG) transfers that can download, create pyTivo metadata, decrypt, run comskip & comcut (commercial detection and removal) and re-encode multiple shows you select from your Tivos all in 1 step.
You can select one or more shows at a time and then with one click of a button the program will download all the selected items, with the options of also automatically creating a metadata file for pyTivo, decrypting .TiVo files to .mpg, running comskip (commercial detection and removal program), and automatically re-encoding to a more portable format using mencoder, ffmpeg or any other command line encoder of your choosing. The program queues up multiple jobs and displays time, size and speed statistics for ongoing jobs.

For more information, screenshots and download visit:
http://sourceforge.net/projects/kmttg

Web page contains windows executables for all 3rd party tools used. The only other requirement of course is you must have Perl installed. Runs under Windows or Linux - tested with WinXP SP2 & Linux Red Hat Enterprise 4.

If you do try this out would appreciate some comments/feedback. For any programmers out there feel free to tinker and make improvements yourself.
 
See less See more
#4,096 ·
I've been using KMTTG for quite some time and just a few weeks ago it started timing out when fetching the nowshoing information. Times out with both curl & java downloader after 2 minutes. It always says for me to check the MAK.

...

I've tested the server by opeing a new session in my browser and copy pasting the MAK in the auth box and it works fine. I've upgraded kmttg to the lastes release and no change. Suggestions?
I'm suddenly having the same problem with one of my TiVos. I switched CATV providers, and the new provider offers a "free" Premier with their service, so I installed the Premier into the theater and moved the other TiVos around. Since they all got moved around, I renamed them on tivo.com, but now both Bobjour and Tivo Beacon seem to be confused about how many TiVos are on the network, what their IP addresses are, and what their names are. I can't get the TiVo in the guest room to return its NPL in kmttg no matter under which name I try the request.

Have you rebooted the TiVo? That usually fixes such problems.
Yes, numerous times.
 
#4,097 ·
Copy and paste the following into your browser (login=tivo passwd=10 digit MAK) and see if it returns xml with a full set of entries:
Code:
https://10.1.1.2/TiVoConnect?Command=QueryContainer&Container=/NowPlaying&Recurse=Yes&AnchorOffset=0
I know you mentioned you tried logging in with your browser, but it wasn't clear to me if your URL contained Recurse=Yes option.
Under FireFox, it gets a connection reset. Under IceWeasel it just returns a blank page.

Edit: Without the Recurse=Yes option, it returns an XML with many (but not all) of the videos on the TiVo. With the Recurse=Yes option, the tvlog reports:

Code:
Jun 22 08:03:37 (none) [TvHttp:443:83][1395]: write connection timed out, 1:01
 
#4,098 ·
I'm suddenly having the same problem with one of my TiVos. I switched CATV providers, and the new provider offers a "free" Premier with their service, so I installed the Premier into the theater and moved the other TiVos around. Since they all got moved around, I renamed them on tivo.com, but now both Bobjour and Tivo Beacon seem to be confused about how many TiVos are on the network, what their IP addresses are, and what their names are. I can't get the TiVo in the guest room to return its NPL in kmttg no matter under which name I try the request.
Check the IPs, any duplicate IPs?
 
#4,100 ·
OK, I found the problem. For anyone who might have this issue in the future:

The fact the query was failing with the Recurse=Yes get field pointed to a problem with one of the folders. I brought up the NPL in the browser without the Recurse=Yes option and then started drilling into the folders one by one, starting with the newest ones. They all came up fine until I hit The Twilight Zone. This one timed out. I used a different method and looked at the recordings in the folder, focusing on the most recent ones, and there was one which was considerably shorter than all the others. I deleted that recording, and now I can query the TiVo from KMTTG.
 
#4,101 ·
I recently changed to a new router, and before that, I set each of my Tivos to a static IP manually. But now, I have entered the MAC of each device, Tivos and computers, and they get a reserved static IP through the DHCP.

The old Linksys router crashes on me during Tivo transfers, but that was cut down with some internet traffic.
 
#4,102 ·
Turn off TS transfers. i.e. Disable the setting: config-Program Options-Download TiVo files in Transport Stream format.
tivodecode can't handle TS TiVo files properly.
Hey, I have a request. Occasionally I come across a program that only transfers partially due to some error in the program. On my S3 TiVos, I can use tserver to transfer the program, but that is a bit of a manual pain. I haven't tried it yet on the Premier, but the Premier offers the potential option of attempting the transfer via TS, instead of the default PS. Right now, in kmttg, this requires configuring the program to use TS transfers, transferring the file, and then configuring the program back to use PS transfers. This is also a bit of a pain. What would be nice is a button that allows the user to transfer the selected program(s) using the alternate method to the configured one for one-shot attempts to transfer files in PS mode if TS is configured or TS mode if PS is configured.

One caveat: if you do decide to implement this feature, it might be prudent to have it disable the "combine download and tivodecode decrypt" function if implemented, since you say tivodecode does not properly handle transport streams. That, or perhaps better, make it a T instead of a pipe so the .TiVo file is retained in the event of a failure of tivodecode.
 
#4,103 ·
I'm starting to migrate my use of kmttg from my windows laptop pointing to shares on my (mostly headless) debian server to running it on the server only. The laptop is just not as reliable as the always running server; besides since the server is always running, why keep my laptop running for hours on end just to pull shows?

I plan on using kmttg on the server to pull files onto a share intended as a staging area, no further processing on the server. I don't mind running comskip & videoredo later from the laptop when I feel like editing videos. Maybe I'll add wine to support comskip on the server, but it's not a powerful machine. We'll see, that's for later.

I see there's all sorts of nifty ways to run kmttg in the background, even as a daemon, against a list of shows to pull. But is there any way to kick off kmttg in gui mode from my laptop, so I can (say) select a long list of shows to download, and then end? In other words I'd use kmttg in gui mode to build a list of shows to pull, save the list somewhere, end kmttg gui, and then have the daemon process the list.

The ideal addition to that scenario would be to be able to kick off kmttg in gui mode later to monitor and possibly alter the daemon processing (cancel a download, add another show) while the daemon is still processing the download list.

Feasible? Sensible? None of the above?
 
#4,104 ·
Basically you are talking about converting kmttg to a client-server platform. 'Interesting idea, and indeed one I would definitely use if moyekj decides to implement it. Depending on how he has structured the code, it might be a fairly simple thing to accomplish, or it might require a complete rewrite of the code.
 
#4,108 ·
I just thought of something. pyTivo is pointing to the same place for pulls and pushes, /mnt/samba/Videos

Is there any way to configure it to pull into one place but push from another?
I'd like to pull to a work share and push from a 'production' share.
You can push from any share.
 
#4,110 ·
Okay, I missed that, I'll review the vidmgr configuration. Thanks!
Okay, now I'm confused. Let me make clear what I'm doing now and where I'd like to end up. Right now I'm using vidmgr to push to my tivo. vidmgr uses the pyTivo.conf file to figure out where to push from; at least that's what I infer from:

Code:
[pytivos]
pytivo1.config=/usr/share/pyTivo/pyTivo.conf
vidmgr uses pyTivo to do the actual push as well, doesn't he?

I'd like to be able to use the same instance of pyTivo .. currently running as a daemon .. to pull shows from the tivo onto a different share than the push share.

I don't see a way to configure that in pyTivo or vidmgr. Please feel free to push my nose directly into it. :p
 
#4,112 ·
Okay, now I'm confused. Let me make clear what I'm doing now and where I'd like to end up. Right now I'm using vidmgr to push to my tivo. vidmgr uses the pyTivo.conf file to figure out where to push from; at least that's what I infer from:

Code:
[pytivos]
pytivo1.config=/usr/share/pyTivo/pyTivo.conf
vidmgr uses pyTivo to do the actual push as well, doesn't he?
Yes.

I'd like to be able to use the same instance of pyTivo .. currently running as a daemon .. to pull shows from the tivo onto a different share than the push share.

I don't see a way to configure that in pyTivo or vidmgr. Please feel free to push my nose directly into it. :p
That is typically the case. There can be many, many shares. The TTG directory is specified separately, and although it can be the same directory as one of the shares, it does not have to be a share directory. For example, my pyTivo.conf is:

Code:
[_tivo_SD]
audio_lang = en, eng, 0x80, 5.1, ac3

[_tivo_HD]
audio_lang = en, eng, 0x80, 5.1, ac3

[_tivo_00000DEADBEEF]

[Server]
tivo_password = XXXXXXX
tivo_mak = YYYYYYYYYYYY
ffmpeg = /usr/bin/ffmpeg
togo_path = /RAID/Server-Main/Movies/TiVo_TS
debug = True
tivo_username = ZZZZZZZ@zzz.zzz
port = 9032


[pyMusic]
type = music
path = /RAID/Music

[RAID Server]
force_alpha = True
type = video
path = /RAID/Recordings

[DVD]
path = /RAID/DVD
force_alpha = True
type = dvdvideo
fast_index = true

[Unverified]
type = video
path = /usr/share/pyTivo/Unverified
 
#4,113 ·
Okay, now I'm confused. Let me make clear what I'm doing now and where I'd like to end up. Right now I'm using vidmgr to push to my tivo. vidmgr uses the pyTivo.conf file to figure out where to push from; at least that's what I infer from:

Code:
[pytivos]
pytivo1.config=/usr/share/pyTivo/pyTivo.conf
vidmgr uses pyTivo to do the actual push as well, doesn't he?

I'd like to be able to use the same instance of pyTivo .. currently running as a daemon .. to pull shows from the tivo onto a different share than the push share.

I don't see a way to configure that in pyTivo or vidmgr. Please feel free to push my nose directly into it. :p
You need to define a share in pyTivo.

First shutdown vidmgr.

Try opening a browser tab, navigate to http://localhost:9032/, select "Web Configuration", "Add Section", put in whatever you want to name the share, "Save Changes", highlight the new section in the list, put "video" as the type, put in the full path to the directory, put "True" in the force_alpha field if you want it sorted alphabetically, "Save Changes" then "Restart pyTivo".

Restart vidmgr.

If the above doesn't work, shutdown both pyTivo and vidmgr and use a text editor to modify the pyTivo.conf file to add the share. You need to create an entry in the file that looks something like this:
Code:
[Videos]
type = video
path = /mnt/samba/Videos
force_alpha = True
(The "force_alpha" line is optional) Change "Videos" inside the [] to be whatever you want the new share name to be and "/mnt/samba/Videos" to be the full path of the directory you want to use. Save the edited file (you'll be replacing the existing file) Then restart pyTivo and vidmgr.
 
#4,115 ·
pyTivo will handle tivodecode just fine.
Oh, it can spawn an external script on the file after transferring it? I didn't realize. In that case, of course, an external script calling tivodecode and then wine / comskip would be easy to set up. The section that calls a delete would be a bit trickier, but may be reasonable, as well. The trick will b e determining from which Tivo the file was transferred.

William,

When calling the external script, can pyTivo pass the name or IP of the TiVo?
 
#4,116 ·
Crap, I only tested the new ffmpeg using WMP on my computer but for some reason the resulting files did not play at all well on my Xoom - it dropped a lot of frames and was basically unwatchable.
The third time was a charm. This time I ditched ffmpeg and did the transcoding (manually) using handbrake with a Xoom preset I cobbled together from various sources on the net. Also I was finally smart enough to test the files before I was sitting on a plane :) Now I just need to incorporate that into a kmttg preset and I'll be good to go - although doing it manually isn't that big of a burden since handbrake has an encoding queue.
 
#4,117 ·
Oh, it can spawn an external script on the file after transferring it?
No. It will decode while transferring. It pipes it through.

May I suggest that further discussion of pyTivo be taken to the pyTivo thread, or its own thread, instead of the kmttg thread? I only brought it up to point out that it was not necessary to reengineer kmttg in order to do what pyTivo already does.
 
#4,118 ·
I am using KMTTG to copy recordings from a Tivo series 2. The only setting I use is decrypt, which removes the .tivo extension. I can burn the copied recording (.mpg) to a DVD, or copy to a usb thumb drive, and play on my DVD player or laptop, but it doesn't fill the whole screen. Does anyone know the best encode profile to use, that would make it fill the whole screen, without losing any video quality?
 
#4,119 ·
I am using KMTTG to copy recordings from a Tivo series 2. The only setting I use is decrypt, which removes the .tivo extension. I can burn the copied recording (.mpg) to a DVD, or copy to a usb thumb drive, and play on my DVD player or laptop, but it doesn't fill the whole screen. Does anyone know the best encode profile to use, that would make it fill the whole screen, without losing any video quality?
What size screen, 4:3 or 16:9?

Is the video 4:3 or 16:9?

Are there black bars all around or just top and bottom or on the sides?

Does the picture look distorted?

What does it look like when you watch it on the TiVo?
 
Top