1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'TiVo Home Media Features & TiVoToGo' started by moyekj, Mar 15, 2008.

  1. Mar 15, 2008 #1 of 10413
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    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.
     
  2. Mar 18, 2008 #2 of 10413
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    I have a newer version available now (v0p1b) with some fixes and support for Linux (and likely other Unix flavors).
     
  3. Mar 18, 2008 #3 of 10413
    Prestond

    Prestond New Member

    44
    0
    Feb 4, 2008
    Hey Kevin,

    Thanks for the program...this is really slick and although I havent received my Tivo yet (its being shipped) this looks to be really cool and I appreciate it. Also am getting into Perl too.

    Thanks again for your efforts...

    Preston
     
  4. Mar 19, 2008 #4 of 10413
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    I have a newer version available now (v0p1c) with some fixes and support for optionally running comskip.
    comskip scans mpeg files for commercials and can spit out cut files which can be imported into popular editors such as VideoRedo, Womble, etc. to make it very easy to edit out commercials.
     
  5. Mar 19, 2008 #5 of 10413
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,485
    174
    Apr 17, 2000
    Nevada
    FYI VideoReDo has it's own commercial detection engine which is available via COM if you're interested in tapping into it.

    Dan
     
  6. Mar 19, 2008 #6 of 10413
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    Dan, that sounds very interesting, can you expand on that a little? I don't currently own VideoRedo, instead I have Womble Mpeg Video Wizard. With comskip it can create a .mls (bookmark) file which I can then import into Womble and spit out a modified .mpg with commercials removed. It's a very simple process, but only issue is I must manually bring up the Womble GUI to start the procedure - there is no command line way of doing it AFAIK.
    If VideoRedo has command line capabilities for automating the whole process that is definitely something I would be interested in.
    comskip has many methods of detecting commercials that can be tweaked. How accurate is the VRD commercial detection engine and are there different methods to select from? Womble has commercial detection capability as well but I find it doesn't work as well as comskip and there is not much tweaking that can be done.
    Thanks.
     
  7. Mar 19, 2008 #7 of 10413
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,485
    174
    Apr 17, 2000
    Nevada
    I've never used comskip so I don't know how it compares to our ad detective. However iit can be completely automated like you want. In fact there is another user here on the forum who has written an app which uses it to automatically commercial scan and convert all .tivo files to .mpg...

    http://www.tivocommunity.com/tivo-vb/showthread.php?t=359550

    I don't believe it has the transcoding abilities of your program but perhaps you two should collaborate and come up with a solution that does it all.

    Dan
     
  8. Mar 19, 2008 #8 of 10413
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    OK thanks. I assume that if you have a cut file one can use it with VRD in batch mode (no GUI) to strip out commercials automatically? Assuming that is possible then one still would also have the option to use comskip instead of VRD ad detection.
    This may push me over the edge to finally buy VRD. I just love the manual editing capabilities of Womble which has what has kept me from VRD.
     
  9. Mar 20, 2008 #9 of 10413
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    I released a newer version today (v0p1d) with some bug fixes.
     
  10. Mar 20, 2008 #10 of 10413
    dlfl

    dlfl Cranky old novice

    6,997
    18
    Jul 6, 2006
    Near...
    Actually, for all practical purposes TiVo-VideoReDo-AutoProcessor (TVAP) already "does it all". It will automatically run a user-supplied batch file to perform the mpeg2-to-mpeg4 encoding using any encoding program with a command-line interface. HandBrake seems to work quite well and a sample batch file for XVID/AVI creation may be downloaded ***here***. The TVAP thread and the readme file give more details.

    TVAP does not schedule TTG transfers however. You must use TiVo Desktop or another program to perform the transfers. I've toyed with the idea of adding the TTG transfer function to TVAP but operation with Desktop is pretty convenient so I haven't been too motivated.

    I applaud your effort!
     
  11. Mar 21, 2008 #11 of 10413
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    Looks like a great utility indeed for those using VideoRedo, great work! No sense me re-inventing the wheel there, so I think this program I will leave targeted at using freely available tools that run both on Windows and Linux. For my next update I will make some slight changes to make encoding phase more generic. Right now I based encoding narrowly on ffmpeg (it's really a great encoder), but there is no reason to narrow it down as such - let the user provide the executable name and arguments and kmttg will simply substitute the input and output file names. Same applies to the commercial removal tool.
     
  12. Mar 21, 2008 #12 of 10413
    kas25

    kas25 New Member

    411
    0
    Mar 10, 2003
    NJ
    Handbrake can convert Mpeg2 or .Tivo files? I thought it was only for dvds.
     
  13. Mar 21, 2008 #13 of 10413
    dlfl

    dlfl Cranky old novice

    6,997
    18
    Jul 6, 2006
    Near...
    It can take mpeg2 files as input but not TiVo files. With TVAP you would be using VideoReDo to convert the TiVo to mpeg2 (while doing Quick Stream Fix and/or Commercial removal in the process.)
     
  14. Mar 21, 2008 #14 of 10413
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    I released a new version (v0p1e) which now allows specification of any encoder you wish instead of being hard coded to ffmpeg. The configuration file changed a little as a result to allow this.
     
  15. Mar 21, 2008 #15 of 10413
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    I discovered today that "mencoder" can use a .edl file produced by "comskip" to automatically cut out commercials detected by "comskip", so my next version I'm integrating it into the flow so that the commercial cutting step is now also completely automated.
    With this last change my goal of automating the entire process (downloading from Tivo all the way to re-encoding with option of having commercials removed) will be achieved.
     
  16. Mar 21, 2008 #16 of 10413
    Berone

    Berone New Member

    108
    0
    Feb 14, 2005
    Kevin,
    Looks like fun. I've downloaded most of the files you reference, but I'm going to hold out until you finish the last change you mentioned. Any chance of you including the setup information for the full work flow? I read the installation notes, but I didn't see how comskip figures into it and I don't see a reference to mencoder. This is all a touch over my head - it's been years since I've done anything like this and I'm a bit rusty. Think there's any chance it can run on a Mac?

    Thanks,

    Anthony
     
  17. Mar 22, 2008 #17 of 10413
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    I've released v0p1f which includes the automated commercial detection and removal and I've updated the config file and documentation appropriately. However be warned I did have a problem with 1 testcase where mencoder once it cut out commercials left the resulting video and audio out of sync. I'll have to test if Womble has the same problem with that video.

    For windows I've included all the binaries you need and it's very easy to get up and running.

    For Linux of course you have extra work to download and compile the 3rd party tools (namely tivodecode and ffmpeg and/or mencoder since curl is already part of most linux distributions). However I had no problems compiling them. The only exception is that comskip has no source code. People have reported success running it using "wine" on Linux.

    For the Mac I would venture to guess it's not much harder to get working than on Linux.
     
  18. Mar 22, 2008 #18 of 10413
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    I did determine that for this testcase "mencoder" caused audo/video sync problems in the resulting mpeg while Womble did not. I also found that ffmpeg seems to run much faster than mencoder for re-encoding.

    So based on the above findings I released v0p1g with following changes:
    * Separated "comskip" from "comcut" steps so that user has option of using
    the bookmark/cut files generated by "comskip" with another program for cutting out commercials.
    * Now include both ffmpeg & mencoder in kmttg_win32_tools.zip
    * In config_distrib.pl file I default ffmpeg as the default choice for encoder
    * Added more notes on using kmttg in the README.txt file
     
  19. Mar 22, 2008 #19 of 10413
    Berone

    Berone New Member

    108
    0
    Feb 14, 2005
    Okay, I got everything downloaded and installed. A couple of glitches for me, but I think they were syntax errors. For now I defaulted back to the defaults and it's currently downloading something, so I'll see what happens and report back. Once I have it running on my windows laptop I think I'll see if I can get it going on the Mac Mini which is our server and Tivo backup.

    Thanks for sharing your hard work - it's a great project.

    Anthony
     
  20. Mar 22, 2008 #20 of 10413
    Berone

    Berone New Member

    108
    0
    Feb 14, 2005
    Kevin,
    Almost worked! Everything up to recoding to the AVI. I got audio but no video. In the perl screen I got the following message:

    Name "main::encoder_args" used only once: possible typo at c:\kmttg\kmttg.pl line 1260

    Don't know if that's related. The mpg with the commercials cut was just fine, though. Any ideas?

    Thanks,

    Anthony
     

Share This Page