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. Apr 6, 2008 #101 of 10413
    Philipp5

    Philipp5 New Member

    19
    0
    Mar 5, 2008
    Here is a newbie guide to installing kmttg for the non computer savvy crowd out there:

    1. Download the kmttg program with its tool here and extract the files in the zip archive to any directory you like
    2. Download and install Active Perl version 5.8 here
    3. Reboot your PC
    4. Go to the directory where you extracted the zip file and doubleclick on kmttg.pl. Once open go to File/configure to configure the program as follows (only the first time).
    5. Enter the name of your Tivo (find it in your Tivo under Account & System Info)
    6. Enter the network address of your Tivo (something similar to 192.168.1.2). You can find that number in your Tivo under Settings/Phone&Network.
    7. Check on Enable File browser
    8. Under Default Path enter the same directory used by your Tivo Desktop (My Tivo Recordings)
    9. Under MAK enter the Media Access Key (in your Tivo under Account & System Info)
    10. Under Output Dir enter any directory where you would like to store your converted recordings
    11. Click ADD and then OK
    12. You're Done!
     
  2. Apr 6, 2008 #102 of 10413
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    Anthony, try this attached kmttg.pl. I suspect it will solve the hanging issue you were having. I was able to reproduce a hang on a Linux system as well and this version seemed to fix it. Let me know how it goes...
     

    Attached Files:

  3. Apr 6, 2008 #103 of 10413
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    Wow, there is something very wrong in config.ini then as it's treating that entry as another Tivo instead of entering file mode. Please email me your config.ini file so I can take a look (blank out the MAK setting if you wish). Looks like I need to beef up the configuration error checking some more...
     
  4. Apr 6, 2008 #104 of 10413
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    v0.2j just released with some bug fixes:
    ------------------
    v0.2j (04/06/2008)
    ------------------
    BUG FIXES:
    * Fix to properly deal with file browser default paths with spaces.
    * Re-implemented Unix systems background process forking to workaround issues with hanging processes in previous implementations.
     
  5. Apr 7, 2008 #105 of 10413
    Berone

    Berone New Member

    108
    0
    Feb 14, 2005
    Kevin,
    Now we're making progress! That got the download to work all the way. I also have the decoder working. Now I have to suss out comskip. It seems to be hanging the same way the download hung. I'll bang away at that tomorrow. Can I run comskip at the command line by pasting the syntax from the kmttg box? Also, can I use mencode for the final encoding (to avi or mp4)? There is a ffmpeg for the Mac, but it looks like a real pain to install. I'd like to test it with the more readily available software.

    Thanks,
    Anthony
     
  6. Apr 7, 2008 #106 of 10413
    Berone

    Berone New Member

    108
    0
    Feb 14, 2005
    Correction - it's hanging in the Comcut sequence, not comskip. Which program handles the encoding to the cut mpg file?

    Thanks,
    Anthony
     
  7. Apr 7, 2008 #107 of 10413
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    mencoder handles the actual commercial cutting. You should see the mencoder command kmttg is executing in the text area.

    As far as mencoder for re-encoding that should work OK. Personally I tried mencoder and found that ffmpeg was much faster and just as good. You can use Google to find mencoder settings for encoding for different target devices. Here's one example for mencoder arguments for kmttg equivalent to my sample ffmpeg encode for my Cowon A3 Portable Media Player:
    Code:
    -i INPUT -vcodec libxvid -trell -max_bframes=2 -s 800x480 -b 1600k -r 29.97 -acodec libmp3lame -ac 2 -ar 48000 -ab 128k -y -f avi OUTPUT
    
    Anthony, I'm hoping you are taking notes of everything you have done to get things working on OS X so we can include an OS X installation guide in the documentation?
     
  8. Apr 7, 2008 #108 of 10413
    Berone

    Berone New Member

    108
    0
    Feb 14, 2005
    Let's start with, does this look right?

    CUTTING COMMERCIALS IN /Volumes/KAYLEE/Tivo/Doctor Who - Blink (Recorded Fri Mar 7 2008 05 00AM SCIFI).mpg ...
    /Applications/kmttg/mencoder/mencoder "/Volumes/KAYLEE/Tivo/Doctor Who - Blink (Recorded Fri Mar 7 2008 05 00AM SCIFI).mpg" -edl "/Volumes/KAYLEE/Tivo/Doctor Who - Blink (Recorded Fri Mar 7 2008 05 00AM SCIFI).edl" -oac copy -ovc copy -of mpeg -o "/Volumes/KAYLEE/Tivo/Doctor Who - Blink (Recorded Fri Mar 7 2008 05 00AM SCIFI)_cut.mpg"

    I was taking notes but the issues wandered around so much that lost track of what was going wrong. Once I have it all working I'll back up over the details.
     
  9. Apr 7, 2008 #109 of 10413
    Berone

    Berone New Member

    108
    0
    Feb 14, 2005
    Kevin,

    Okay, back to you! The comskip ran fine and the comcut which froze in kmttg ran fine in terminal. Aside from not actually cutting the commercials, but that's a different problem. I'm running the same process again now to see if I get the same results.
     
  10. Apr 7, 2008 #110 of 10413
    Berone

    Berone New Member

    108
    0
    Feb 14, 2005
    Didn't get the same results. 3 1/2 hours so far scanning for commercials in a Star Trek episode. TVLand has a lot of commercials, but not that many. No .edl file created. One .txt file completely empty and one .log file that seems related to comskip. I'm going to abort and try something else. Lots of cookie files appearing in the output directory. Is that where they should be? I have hidden files revealed on the mac, so maybe that's why I'm seeing them.

    Anthony
     
  11. Apr 7, 2008 #111 of 10413
    Berone

    Berone New Member

    108
    0
    Feb 14, 2005
    Tried again -same thing. The commands will run from Terminal but not within Kmttg. The resultant ...cut.mpg file was incredibly out of sync but that's a different problem to solve.
     
  12. Apr 7, 2008 #112 of 10413
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    I know what the problem is with hanging mencoder command on Unix systems. I will release a fix today or tomorrow some time.
     
  13. Apr 8, 2008 #113 of 10413
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    New version just released with a good update for unix based systems:
    ------------------
    v0.2k (04/08/2008)
    ------------------
    BUG FIXES:
    * Re-implemented Unix systems background process forking once again to workaround issues with hanging processes in previous implementations. As a bonus in the new implementation now any errors returned by background processes are displayed in the kmttg text area. Will need to evaluate the same implementation for Windows platform since currently the Windows platform does not catch and display background process errors.
     
  14. Apr 9, 2008 #114 of 10413
    Berone

    Berone New Member

    108
    0
    Feb 14, 2005
    Yeah, baby! That did it. We have everything but the final encode working. There are a lot of steps to installing ffmpeg, including having to get the audio codecs properly installed. I'm going to beat on that tomorrow.

    You do nice work!

    Anthony
     
  15. Apr 9, 2008 #115 of 10413
    Berone

    Berone New Member

    108
    0
    Feb 14, 2005
    Well, 6 1/2 hours later and I still can't get ffmpeg working. I got ffmpegX to work just fine, but the object of the exercise is to do everything with one interface. I tried using the ffmpegX install within kmttg, since it's a working install, but this is the error that I got:

    *ERROR* encoder failed (exit code: 1) - check above /Applications/kmttg/ffmpeg/ffmpeg command
    FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
    Mac OSX universal build for ffmpegX
    configuration: --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
    libavutil version: 49.0.0
    libavcodec version: 51.9.0
    libavformat version: 50.4.0
    built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
    input: I/O error occured
    Usually that means that input file is truncated and/or corrupted.

    Mean anything?

    Thanks,
    Anthony
     
  16. Apr 9, 2008 #116 of 10413
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    Did you specify INPUT and OUTPUT keywords (which represent the input and output files) in your kmttg configuration setup? For ffmpeg you need to have "-i INPUT" and "-o OUTPUT" as part of your ffmpeg arguments. I'm not familiar with ffmpegX, perhaps the input and output file specification format may be different.
     
  17. Apr 9, 2008 #117 of 10413
    Berone

    Berone New Member

    108
    0
    Feb 14, 2005
    I used the configuration line that you gave me, so yes. ffmpegX is an OS X gui for ffmpeg. I read a suggestion to extract ffmpeg from the package to use it command line, which is one of the things I tried. I also tried everything else I could find. Unfortunately when I got errors I couldn't get around them or find a reference to solving them. Hence 6 1/2 (now almost 8) hours trying to solve it.
     
  18. Apr 9, 2008 #118 of 10413
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    So sounds like ffmegX wasn't meant to work command line...
    So what was wrong with mencoder? Can't you just use that? Here's sample mencoder arguments that work for me:
    INPUT -ovc xvid -xvidencopts max_bframes=2:bitrate=1600:trellis -vf scale=800:480 -ofps 29.97 -oac mp3lame -lameopts mode=0:br=128 -of avi -o OUTPUT
     
  19. Apr 9, 2008 #119 of 10413
    nickhaas33

    nickhaas33 New Member

    38
    0
    Dec 11, 2006
    I noticed today that I had 190 entries in my nowplaying and a couple did not make it through to the KMTTG list. Is there a limit to how many can be in the now playing list. I was using .2J of KMTTG

    Thanks!
     
  20. Apr 9, 2008 #120 of 10413
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    I figured this day would come :) Yes, the Tivo server will only return at most 128 items at a time. As part of it's return XML the server indicates how many items total you have <TotalItems> vs. how many items it returned for this query <ItemCount>. That can be used to determine that there are additional entries you need to ask for. For subsequent calls as part of the URL you can then specify an item offset <AnchorOffset> as well as number of items to retrieve - i.e. for example you add something like the following to the usual URL: &AnchorOffset=129&ItemCount=10. In short, for more than 128 entries, multiple calls to the Tivo server are necessary to grab all items.
    Anyway, though I'm aware of all the details I haven't implemented it in kmttg yet - mostly I was waiting to see if anyone would run into the limit before bothering to look into it. Guess that time has come ;)
     

Share This Page