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. Nov 20, 2008 #381 of 10413
    AudioNutz

    AudioNutz New Member

    318
    0
    Nov 9, 2008
    moyekj,
    Go ahead and add this to your documentation: (If you would like to give me credit for this part of your docs, I'm ok with that too.) ;)

    MACINTOSH INSTALLATION INSTRUCTIONS
    1. INSTALL XCODE TOOLS
    The Tk module for the Perl GUI will need the X11 environment to be compiled, installed, and executed. Locate your Mac OS X installation DVD, and install the XCode Tools.

    2. INSTALL PERL (ONLY IF NEEDED)
    Most Macs with “Tiger” (Mac OS X 10.4.x) or “Leopard” (Mac OS X 10.5.x) already have Perl 5.8.x installed, so you can skip to the part below where you install the Tk module

    Kmttg is written in Perl and uses the Tk module for GUI. Perl versions 5.8.x is confirmed to work as long as you have the proper Tk module.
    Note that Macintosh ActivePerl version does not include Tk module by default and therefore requires more work to install – see details below.

    If by some miracle your Macintosh does not have Perl installed:
    http://www.activestate.com/Products/activeperl/
    Click on Get ActivePerl
    Click on Download by free download version
    Click on Continue
    For 5.8.x version (on right side) scroll down and find the relevant installation file for your system
    Download and install on your system. NOTE: This step can vary depending on your system so is not documented here.

    INSTALLING Tk MODULE USING Terminal and X11
    http://search.cpan.org/~ni-s/Tk-804.027/
    If you are using Safari, make sure that your browser is not set to “Open safe files after downloading.
    Download the latest release.
    Move the Tk-804.028.tar.gz to your /System/Library/Perl/lib folder I suppose you can put it anywhere you like. I just put it here to keep things tidy.
    Change permissions of this folder, so that you have rights to install software here. (Make a note as to what the permissions were, as you will want to change them back later)
    Open a Terminal window, and execute the following commands: (May differ if you’ve changed the install location)
    BUILD EXAMPLE
    cd /System/Library/Perl/lib
    tar -zxvpf Tk-804.028.tar.gz
    cd Tk-804.028
    perl Makefile.PL
    make
    Now go to your “Utilities” folder on your Hard Drive, and open an X11 window.
    In the X11 window, type the following commands :
    Cd /System/Library/Perl/lib/Tk-804.028
    make test
    (Stand back and watch this happen)
    sudo make install​
    Perl and Tk are now ready. Change the permissions for “/System/Library/Perl/lib” back to what they were when you began. (This step may not be necessary, but I like to keep my Mac tidy)

    STARTING KMTTG
    Macintosh
    Simplest way to run:
perl path/kmttg.pl​

    BUILD AND INSTALL 3rd PARTY TOOLS
    Macintosh is exactly the same as Linux instructions that are already published.
     
  2. Nov 20, 2008 #382 of 10413
    moyekj

    moyekj Well-Known Member

    11,149
    33
    Jan 23, 2006
    Mission...
    Thanks AudioNut. I added an html document with your instructions (with credit given to you) to the Google project area.
     
  3. Nov 21, 2008 #383 of 10413
    kevinmtu

    kevinmtu New Member

    4
    0
    Sep 30, 2008
    Thanks AudioNutz for the Mac instructions! I will give it a try on my Mac later today and let you know how it goes.
     
  4. Nov 22, 2008 #384 of 10413
    AudioNutz

    AudioNutz New Member

    318
    0
    Nov 9, 2008
    UPDATE on the Mac instructions...

    Mac OS X 10.5.x (Leopard) is working great, but I haven't been able to get mencoder to play nice with comskip with Mac OS X 10.4.x (Tiger)

    If anyone would like to volunteer a (working with comskip) version of mencoder, I would appreciate it...
     
  5. Nov 27, 2008 #385 of 10413
    bigbopper

    bigbopper New Member

    19
    0
    Feb 22, 2005
    I installed kmttg v0p5f and ActivePerl 5.10 and could not get kmttg to launch. I SUSPECT the problem to be that ActivePerl 5.10 installed Tkx, not TK. I uninstalled AP5.10 and installed AP5.8.8, which installed Tk. Bingo, kmttg launched on the first try.
     
  6. Dec 2, 2008 #386 of 10413
    citivolus

    citivolus New Member

    93
    0
    Jul 3, 2002
    just want to say that I too am having this exact problem and am eagerly awaiting a fix!

    great program btw!
     
  7. Dec 3, 2008 #387 of 10413
    moyekj

    moyekj Well-Known Member

    11,149
    33
    Jan 23, 2006
    Mission...
    Had some discussions with Dan and we narrowed it down to an issue with VideoRedo not being able to run this function in service mode, however I don't think it's high on priority list to be resolved so I wouldn't expect a fix anytime soon. Perhaps if Dan is monitoring this thread he can comment further.
     
  8. Dec 5, 2008 #388 of 10413
    ehagberg

    ehagberg Member

    93
    0
    Dec 27, 2004
    Montclair, NJ
    Any chance adding closed caption data extraction to kmttg has been considered?

    t2sami can do it, but with all the automated functionality already integrated in kmttg, it would get that last step done all at once, rather than leaving another manual piece to the video download/commercial-cut/re-encode process.
     
  9. Dec 5, 2008 #389 of 10413
    ehagberg

    ehagberg Member

    93
    0
    Dec 27, 2004
    Montclair, NJ
    So far I've only seen this when trying to cut commercials from "Chuck" and not other HD shows (though I've not tried this on too many other HD shows), but it consistently fails at the comcut stage with this error:

    I:\kmttg\Chuck - Chuck Versus the Sensei_Mon_Dec_01_cut.mpg size=66.22 MB elapsed=00:01:00 (9.26 Mbps)
    *ERROR* comcut failed (exit code: 5) - check above C:\Documents and Settings\Eric.TALTOS\Desktop\kmttg\mencoder\mencoder.exe command
    Using SSE optimized IMDCT transform
    Using MMX optimized resampler
    Limiting audio preload to 0.4s.
    Increasing audio density to 4.

    1 duplicate frame(s)!
    (...snip...)

    The error window then fills with thousands of errors, mostly of the "1 duplicate frame(s)" type, though occasionally with messages like "ERROR: scr 0.556, dts 0.000, pts 0.300" or "Warning! FPS changed 23.976 -> 29.970 (-5.994005) [4]".

    The original 1-hour show takes 5.something Gb. Eventually the comcut bit fails with:

    Couldn't realloc frame buffer(idx), abort


    PARSE_MPEG12: add_frames(69108) failed, exit

    And leaves just 67Mb or so in the cut file.

    Anyone else have this sort of problem?
     
  10. Dec 5, 2008 #390 of 10413
    moyekj

    moyekj Well-Known Member

    11,149
    33
    Jan 23, 2006
    Mission...
    If there is a batch tool that can do it starting from a .mpg or .TiVo file then it should be possible. If you can supply an example of how to do it I can look into it.
     
  11. Dec 5, 2008 #391 of 10413
    jmemmott

    jmemmott New Member

    393
    0
    Jul 12, 2003
    Santa Cruz, CA
    If you already have t2sami installed, you can use its command line interface during the processing to do the extraction:

    "C:\Program Files\T2Sami\t2extract.exe" -f srt "E:\Tivo\Legend of the Seeker - Bounty.tivo"

    will create "E:\Tivo\Legend of the Seeker - Bounty.srt" for you.

    Just do any cuts first to avoid loosing sync between the A/V and the captions.
     
  12. Dec 5, 2008 #392 of 10413
    moyekj

    moyekj Well-Known Member

    11,149
    33
    Jan 23, 2006
    Mission...
    Thanks. Does it work starting from .mpg files as well or just .TiVo? If it doesn't work on .mpg then it's not very ideal since if one goes off to either automatically or manually remove commercials from .mpg then there's no way to have a corresponding .srt
     
  13. Dec 5, 2008 #393 of 10413
    jmemmott

    jmemmott New Member

    393
    0
    Jul 12, 2003
    Santa Cruz, CA

    It will handle either one equally as well as .vob files from DVD's. That is why I made the comment about doing the processing after making cuts. The captions are distributed uniformly throughout and cutting the commercial video also cuts out the closed captioning associated with the commercials...
     
  14. Dec 6, 2008 #394 of 10413
    moyekj

    moyekj Well-Known Member

    11,149
    33
    Jan 23, 2006
    Mission...
    OK great. Sounds like a good flexible tool. I'll look into it.
     
  15. Dec 8, 2008 #395 of 10413
    waynomo

    waynomo My One Time TCF Club

    12,060
    36
    Nov 9, 2002
    Seven...
    First, let me say thank you for all the time and effort you put into this great program!!

    The first few times I started KMTTG a command window opened an the error message 'Use of uninitialized value in concatenation (.) or string at C:\Program Files\KMTTG\kmttg\kmttg.pl line 4210" appeared 10 times. It didn't appear immediately. It appears right about the same time the blue "TOTALS" and "NOTE" messages appears in the job monitor window.

    I added wperl to the start of my shortcut and now the cmd window doesn't appear, but I wanted to make sure the error message wasn't anything to be concerned about.

    I could have sworn I saw somebody address this in an earlier discussion, but I can seem to find a reference to it.

    Thanks again,
    Wayne
     
  16. Dec 8, 2008 #396 of 10413
    moyekj

    moyekj Well-Known Member

    11,149
    33
    Jan 23, 2006
    Mission...
    Yes it's nothing serious, but I have perl in verbose warning mode and usually try and prevent those kinds of warnings so thanks for bringing it up. This issue is for recordings on your Tivos that don't have associated channel numbers and/or names, such as recordings you copied from PC->Tivo for example. This is creating references to an uninitialized hash key in Perl which is where the warnings are coming from.
     
  17. Dec 8, 2008 #397 of 10413
    waynomo

    waynomo My One Time TCF Club

    12,060
    36
    Nov 9, 2002
    Seven...
    That makes sense. I am guessing it is the programs from the Onion News Network. (Downloads) I don't think I currently have any programs on my Tivo that came from my PC.
     
  18. Dec 10, 2008 #398 of 10413
    moyekj

    moyekj Well-Known Member

    11,149
    33
    Jan 23, 2006
    Mission...
    FYI, I already have this integrated and working in development area but just have been sitting on it for a while since the most tedious portion of updating the documentation still needs to be done. I was amazed how fast that program runs. A 1 hour SD show it crunches through in about 5-10 seconds. The .srt file looks to be an easily parsable format too so perhaps integration of captions with tivostream in the future may be possible.
     
  19. Dec 10, 2008 #399 of 10413
    jmemmott

    jmemmott New Member

    393
    0
    Jul 12, 2003
    Santa Cruz, CA
    You could create a streaming subset that works now. The GUI version of T2Sami creates streamable captioned MPEG2's and you have access to all of the programs it is using. None of it will be on the fly. You have to use open captioning with streaming which means a re-encoding step...

    These are the blind alleys I am still working out: I can create streamable captioned MPEG2 files in a single step with T2Sami using mencoder but I have not been able to get a streamable MP4's, captioned or not, using mencoder. It appears I may need to use something else to mux it into the right format afterward if I want to go that route. I can get a streamable MP4's in a single step out of T2Sami with ffmpeg but I can't add the open captions using ffmpeg, only closed captions which won't work with streaming - only for downloading.

    I tried VLC outside of t2sami but the captions it created were so ugly/unreadable, I dropped that path for the time being.
     
  20. Dec 11, 2008 #400 of 10413
    ehagberg

    ehagberg Member

    93
    0
    Dec 27, 2004
    Montclair, NJ
    Nobody? I can easily reproduce this problem, and I've seen that even when the program claims to have been successful, there's just a 50-70Mb file left behind with just a few seconds of video.

    Seems that anything recorded in HD on NBC has this problem (I'm getting the programming from FiOS if that matters).

    Seems like this is likely a bug in mencoder, as the comskip .edl file seems to have valid data.
     

Share This Page