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
#3,552 ·
I also have both version 3 and 4 of vidredo on my computer just to help me see differently which one I am running for the time being. vers 3 processes tivo files and 4 for TS and m2ts.

But the problem is, settings from the previous instance are retained, sometimes just for a short while and sometimes till reboot.
That's actually a VideoRedo issue. For COM jobs VideoRedo registers the last VRD that you run GUI for, so if you have more than 1 version of VRD installed that creates issues. i.e. If last time VRD you ran was version 3 then COM will use version 3 next time you invoke from kmttg. Note that version 4 of VRD should be superset of version 3, so you should just use version 4 for everything.
 
#3,553 ·
That's actually a VideoRedo issue. For COM jobs VideoRedo registers the last VRD that you run GUI for, so if you have more than 1 version of VRD installed that creates issues. i.e. If last time VRD you ran was version 3 then COM will use version 3 next time you invoke from kmttg. Note that version 4 of VRD should be superset of version 3, so you should just use version 4 for everything.
That makes sense. I was trying to keep them separate mostly so I visually could tell what each was doing when looking up and trying different things but now that I know what causes it, I will just switch it all to 4.

Going back a little to the adcut, I have parsed thru the script as far as I can understand, but am guessing the reason it renamed the file to mpg even though it is using the proper encoding/cutting format, is probably related to something onthe backend cscript command or a setting for locked files that I cannot change to the correct file. It is no big deal to rename the file to the proper container, but isthere a specific command you can think of off the top ofyour head that I can change or setting to have it basically follow whatever encoding to the right extension? don't have the code in front of me, but on output file does the argument need to be say output.filetype 7 to get the proper extension instead of outputfiletype 1 or whatever? I ask because I think I could modify the script to detect via extension of input to change the encode setting so I could use the same kmttg setup for all three types, just in my custom scripts for qsfix and adscan it do a check on the input filename and then set the output encode setting. For example if I have three files in kmttg and have one with mpg extension, my modified version of your scripts would make it so it automatically sets the encode to mpeg-2, and if the second file is .ts then my qsfix would check that and set it to h264 transport stream, and then do the same for adcut, extension check and then encode change.

I know it might not be able to do that because of how you backend process things, but was wondering if it is possible and if you could help a bit with the commands I need to look at. I have some programming knowledge butit is dusty obviously.
 
#3,554 ·
I use vidredo and qsfix which is part of vidredo. I process most everything (non tivo HD and replaympg files too) thru kmttg in the manner noted.

You cannot qsfix without vidredo, though there are other ways to accomplish this which basically fixes audio sync issues and a few other things (mainly that vidredo cannot handle multiple dimensions say 1900x1200 and 1280 x 720 in the same file so it forces all video to one stream for processing)

You can use the free comskip and adcut but I found it is just worth the money to use videoredo, I didn't want to spend the money as you can do it all with public tools, but I did just to make life easier. Also they used to be on the ffmpeg list of shame for violation of their license, don't know if that is still the case or not, but anyway that is another discussion.

Scroll back a few pages and then a few pages more and look at kmttg window while reading the process I use and it might make more sense. My next post is related to something that might be a bug but since you are starting out might confuse you, so you might just skip over it to keep your sanity.
Sorry, still could not find it. But thanks for the help.

As for VRD, I thought the Beta version of 4 would re-install over 3, but it hasn't?

So how do I force VRD to use version 4?
 
#3,555 ·
Going back a little to the adcut, I have parsed thru the script as far as I can understand, but am guessing the reason it renamed the file to mpg even though it is using the proper encoding/cutting format, is probably related to something onthe backend cscript command or a setting for locked files that I cannot change to the correct file. It is no big deal to rename the file to the proper container, but isthere a specific command you can think of off the top ofyour head that I can change or setting to have it basically follow whatever encoding to the right extension? don't have the code in front of me, but on output file does the argument need to be say output.filetype 7 to get the proper extension instead of outputfiletype 1 or whatever? I ask because I think I could modify the script to detect via extension of input to change the encode setting so I could use the same kmttg setup for all three types, just in my custom scripts for qsfix and adscan it do a check on the input filename and then set the output encode setting. For example if I have three files in kmttg and have one with mpg extension, my modified version of your scripts would make it so it automatically sets the encode to mpeg-2, and if the second file is .ts then my qsfix would check that and set it to h264 transport stream, and then do the same for adcut, extension check and then encode change.

I know it might not be able to do that because of how you backend process things, but was wondering if it is possible and if you could help a bit with the commands I need to look at. I have some programming knowledge butit is dusty obviously.
kmttg passes arguments to the scripts which defines the input and output file names. The flow was all designed based on .TiVo/mpeg2 files as inputs which is why it's the way it is. You could modify the output file name inside the script, however that would result in kmttg complaining about adcut step failing since it would not see the intended file name created. I think I gave an example already of how you could use an encoding profile or "custom" task to do the file renaming which is still an option.
 
#3,559 ·
Another quick question about QSFix:

What is the best stage to use QS Fix? Can you use it at multiple stages (like after you decrypt)?
Best to do it before any other processing. Which is why in the flow of kmttg it comes right after decrypt. On another note, not sure about this but I think maybe if you qsfix a TiVo file it will not play back correctly on the TiVo.i might be wrong, it might be that way on the replaytv instead but I seem to remember it. It will play fine as a mpg file but lose the TiVo info unless you have it set up to create and handle it another way.
 
#3,560 ·
Best to do it before any other processing. Which is why in the flow of kmttg it comes right after decrypt. On another note, not sure about this but I think maybe if you qsfix a TiVo file it will not play back correctly on the TiVo.i might be wrong, it might be that way on the replaytv instead but I seem to remember it. It will play fine as a mpg file but lose the TiVo info unless you have it set up to create and handle it another way.
I have QS Fixed some files and then made them into mpg --> mp4 flavor. I am seeing some glitches.

IF instead I go, QS Fix, then mpg --> AVI (XVID) I see no artifacts, which is another reason why I am liking AVI.
 
#3,561 ·
kmttg passes arguments to the scripts which defines the input and output file names. The flow was all designed based on .TiVo/mpeg2 files as inputs which is why it's the way it is. You could modify the output file name inside the script, however that would result in kmttg complaining about adcut step failing since it would not see the intended file name created. I think I gave an example already of how you could use an encoding profile or "custom" task to do the file renaming which is still an option.
Got it, I was basically wondering if I could change it via the script with some argument I just didn't know or if it was in the basic programming so you answered that for me. I remember your suggestion, I am just always the kid who asks why because it helps me understand better.

I used to program in the old days (I bet I am older than most TiVo users) but never got around to the new tools and arguments and such, so I have slight interest in how it works but not enough time to learn a whole new programming language or even dust off the old cobwebs in the past. Maybe someday I will get to learn java, it seems so helpful, but similar to Linux, I just don't know it and that is life I guess. On another note, I see the goodness of Linux but the different arguments for different distributions makes me tear my hair out (as anyone who also reads the deal database posts will see me currently complaining about).
Thanks for your help and response as always.
 
#3,562 ·
I have QS Fixed some files and then made them into mpg --> mp4 flavor. I am seeing some glitches.

IF instead I go, QS Fix, then mpg --> AVI (XVID) I see no artifacts, which is another reason why I am liking AVI.
The glitches are probably processing power on the machine doing the conversion, which can cause the issue. Hence why I mostly use avi/xvid even though it is a bit larger. Are you using vidredo to convert to mp4 because I think other tools do it better, like video.net. Try the same file you are getting glitches on in video.net to convert and see if it still has the glitches. Also some set top boxes don't handle it so well or are very picky about the audio format, mostly because it is new and the apple connection vs xvid which wad kinda the standard till recently.
 
#3,563 ·
I updated to the latest kmttg version on my PC but I'm still not able to get the Disk Usage display to show free space (blue color). The entire display is yellow unless I also have a "save until I delete" show in which case that portion is green and the rest yellow. Is this a known issue?
 
#3,564 ·
I updated to the latest kmttg version on my PC but I'm still not able to get the Disk Usage display to show free space (blue color). The entire display is yellow unless I also have a "save until I delete" show in which case that portion is green and the rest yellow. Is this a known issue?
Have you installed a larger than stock drive in your TiVo and have you so informed kmttg?
 
#3,565 ·
I updated to the latest kmttg version on my PC but I'm still not able to get the Disk Usage display to show free space (blue color). The entire display is yellow unless I also have a "save until I delete" show in which case that portion is green and the rest yellow. Is this a known issue?
You have to enter your total disk space available at the top of the Disk Usage window and then press enter.
 
#3,566 ·
The glitches are probably processing power on the machine doing the conversion, which can cause the issue. Hence why I mostly use avi/xvid even though it is a bit larger. Are you using vidredo to convert to mp4 because I think other tools do it better, like video.net. Try the same file you are getting glitches on in video.net to convert and see if it still has the glitches. Also some set top boxes don't handle it so well or are very picky about the audio format, mostly because it is new and the apple connection vs xvid which wad kinda the standard till recently.
Got it. Thanks.
 
#3,567 ·
Have you installed a larger than stock drive in your TiVo and have you so informed kmttg?
You have to enter your total disk space available at the top of the Disk Usage window and then press enter.
Ok, I see that it only thinks I have a drive the size of what is currently in use. If I enter the actual size it shows the amount free, but then it forgets once I leave the program. Not too helpful.
 
#3,568 ·
Ok, I see that it only thinks I have a drive the size of what is currently in use. If I enter the actual size it shows the amount free, but then it forgets once I leave the program. Not too helpful.
That's not the proper behavior. Once you enter it once it saves it to config.ini under <diskSpace> key so you don't have to enter it again. Works for me for all 3 of my Tivos and I have never heard any others complain it doesn't behave that way.
 
#3,569 ·
Ok, I see that it only thinks I have a drive the size of what is currently in use. If I enter the actual size it shows the amount free, but then it forgets once I leave the program. Not too helpful.
Did you press the enter key after typing in you disk space number?
 
#3,570 ·
That's not the proper behavior. Once you enter it once it saves it to config.ini under <diskSpace> key so you don't have to enter it again. Works for me for all 3 of my Tivos and I have never heard any others complain it doesn't behave that way.
Did you press the enter key after typing in you disk space number?
Ok, found the problem. I put the folder in "Program Files x86" so it didn't have permission to update the configuration file. Now it works as expected. Thanks for giving me an idea of what to look for.
 
#3,572 ·
Problem: KMTTG is copying shows it has already copied.

My wife and I record Pan AM on Sunday nights, and we have KMTTG set up to automatically copy it and decrypt it as an auto transfer. This has worked fine ever since the season started. Recently, my wife has gone back to watch old episodes and pulled them back to one of our Tivos. Some episodes she doesn't finish right away so we have a copy of an old episode sitting on the Tivo again. Well, when KMTTG runs it's auto transfers, it sees the old episode and copies and decrypts it again. Even though it already did that episode in the past. It winds up deleting the original copy on the computer and puts a new copy in its place. So now, for some episodes on the computer, I have a copy of a copy of a copy with an altered modified date that now puts it out of order in the folder list as displayed on the Tivo.

Why is KMTTG doing this? I thought it wasn't supposed to recopy episodes that it has already processed. This concerns me because it is automatically overwriting the first generation copy with a third generation copy and makes me wonder what other shows it might be doing this to.

please help.

ETA: I have turned off overwrite files for now to prevent this, but that means I have to monitor KMTTG more closely to make sure it successfully copies all the new shows.

Jeff
 
#3,573 ·
Problem: KMTTG is copying shows it has already copied.

My wife and I record Pan AM on Sunday nights, and we have KMTTG set up to automatically copy it and decrypt it as an auto transfer. This has worked fine ever since the season started. Recently, my wife has gone back to watch old episodes and pulled them back to one of our Tivos. Some episodes she doesn't finish right away so we have a copy of an old episode sitting on the Tivo again. Well, when KMTTG runs it's auto transfers, it sees the old episode and copies and decrypts it again. Even though it already did that episode in the past. It winds up deleting the original copy on the computer and puts a new copy in its place. So now, for some episodes on the computer, I have a copy of a copy of a copy with an altered modified date that now puts it out of order in the folder list as displayed on the Tivo.

Why is KMTTG doing this? I thought it wasn't supposed to recopy episodes that it has already processed. This concerns me because it is automatically overwriting the first generation copy with a third generation copy and makes me wonder what other shows it might be doing this to.

please help.

ETA: I have turned off overwrite files for now to prevent this, but that means I have to monitor KMTTG more closely to make sure it successfully copies all the new shows.

Jeff
Likely because kmttg uses ProgramId stored in history.ini to track what has previously been processed, but the round trip of downloading, decrypting and then sending back to TiVo results in new/different/missing ProgramId. I can't recall if transfers back to TiVo actually even have a ProgramId or not, but try enabling "Do not process recordings without ProgramId" in Auto Transfers config which may solve the problem. Other option is to "push" back to your TiVo instead of "pull" which results in a copy-protected show which can't be downloaded by kmttg.
 
#3,574 ·
... try enabling "Do not process recordings without ProgramId" in Auto Transfers config which may solve the problem.
Will do, thanks!

Other option is to "push" back to your TiVo instead of "pull" which results in a copy-protected show which can't be downloaded by kmttg.
This doesn't meet the WAF necessary. ;) She wants it all to work the same, whether it's getting content from the computer or other Tivo. She likes using the links in the now playing list for both the computer and other Tivo. I've tried showing her the vidmgr interface, but she doesn't like the concept of going to a completely different menu to get what she can already do from the now playing list.

Jeff
 
#3,575 ·
Will do, thanks!

This doesn't meet the WAF necessary. ;) She wants it all to work the same, whether it's getting content from the computer or other Tivo. She likes using the links in the now playing list for both the computer and other Tivo. I've tried showing her the vidmgr interface, but she doesn't like the concept of going to a completely different menu to get what she can already do from the now playing list.

Jeff
You might also consider changing the auto transfer for each show so that it only looks for that show on the TiVo on which it is initially recorded.
 
#3,576 ·
This version introduces option to use free tool ProjectX for QS Fix and Ad Cut tasks in lieu of VideoRedo. ProjectX demux is a useful utility for fixing glitches in mpeg2 streams similar to VideoRedo QS Fix. ProjectX also has option to take comskip files as input to cut out identified commercial segments and thus can serve as a much better option to mencoder for Ad Cut task. VideoRedo is still best option if you have it, but now you have option to use the free ProjectX software instead if you wish. Thanks to "kiva.xen" for identifying ProjectX as a viable free alternative to VideoRedo for QS Fix as a feature request.

This version also introduces option to resume downloads from pause point (File->Resume Downloads) if desired. Thanks to forum member "opieant" for pointing out ability to resume downloads for TiVo shows.

Finally there's also a fix to delete shows option using iPad protocol in this release for cases when start time is earlier or later than in schedule.

See release_notes for details of this release.
 
Top