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. Jun 3, 2009 #781 of 10917
    moyekj

    moyekj Well-Known Member

    11,376
    126
    Jan 23, 2006
    Mission...
    OK, try this. Download the kmttg.jar file attached here:
    http://code.google.com/p/kmttg/issues/detail?id=13

    Rename kmttg.jar for your current installation and put the attached one above in it's place and then launch and run kmttg as usual and try your video again. The only difference is the addition of -harddup flag to mencoder which for me helped with a/v sync issue with a short test clip. Not sure if it will help timestamp problems but it's worth a shot.

    (With the other flags I found mencoder generated choppy video when played back on Tivo, so those don't seem to be a good option).

    If still no luck then not sure what can be done. As I mentioned before VideoRedo is a MUCH better tool for doing mpeg editing/cutting and worth every penny.
     
  2. Jun 3, 2009 #782 of 10917
    moyekj

    moyekj Well-Known Member

    11,376
    126
    Jan 23, 2006
    Mission...
    Tonight I ran 1 more full test for mencoder. Even with the new option a full 1 hour testcase eventually generated a/v sync problems in the cut mpg file half way through. I ran the exact same source video with same cut points using VideoRedo in kmttg instead and the resulting cut file was PERFECT. Also noticed the cut points made by mencoder were a few seconds off where VideRedo cut them in the right places.

    Bottom line seems to be mencoder is not up to the task of cutting mpeg2 videos without a complete re-encode. If someone is aware of a better free tool for doing the job please let me know. For now I will continue to strongly encourage use of VideoRedo.
     
  3. Jun 3, 2009 #783 of 10917
    bkdtv

    bkdtv New Member

    7,902
    2
    Jan 9, 2003
    DC Metro Area
    My earlier problems with the VideoRedo vbs scripts under Windows 7 were caused by my failure to run VideoRedo as an administrator. I uninstalled the beta version and reinstalled the latest version, but that didn't fix the problem. So I ran VideoRedo as an administrator (right-click, run as administrator) and that did fix the problem. Installing as an administrator isn't enough.

    I did run into the problem mentioned a few pages back:

    When using VideoRedo, the comskip and comcut (VideoRedo's adcut) don't work together. The comskip step creates an edl file and kmttg looks for a VPrj file, which doesn't exist.

    Code:
    >> Running qsfix on E:\TiVo Recordings\Breaking Bad - ABQ_Sun_May_31\Breaking Bad - ABQ_Sun_May_31.mpg ...
    C:\Windows\system32\cscript.exe //nologo "C:\Program Files (x86)\VideoReDoTVSuite\vp.vbs" "E:\TiVo Recordings\Breaking Bad - ABQ_Sun_May_31\Breaking Bad - ABQ_Sun_May_31.mpg" "E:\TiVo Recordings\Breaking Bad - ABQ_Sun_May_31\Breaking Bad - ABQ_Sun_May_31.mpg.qsfix" /t1 /d /q /na 
    qsfix job completed: 00:00:48
    ---DONE---
    (Renamed E:\TiVo Recordings\Breaking Bad - ABQ_Sun_May_31\Breaking Bad - ABQ_Sun_May_31.mpg.qsfix to E:\TiVo Recordings\Breaking Bad - ABQ_Sun_May_31\Breaking Bad - ABQ_Sun_May_31.mpg)
    >> Running comskip on E:\TiVo Recordings\Breaking Bad - ABQ_Sun_May_31\Breaking Bad - ABQ_Sun_May_31.mpg ...
    "C:\Program Files (x86)\kmttg\comskip\comskip.exe" --ini "C:\Program Files (x86)\kmttg\comskip\comskip.ini" "E:\TiVo Recordings\Breaking Bad - ABQ_Sun_May_31\Breaking Bad - ABQ_Sun_May_31.mpg" 
    comskip job completed: 00:01:45
    ---DONE---
    vprj file not found: E:\TiVo Recordings\Breaking Bad - ABQ_Sun_May_31\Breaking Bad - ABQ_Sun_May_31.VPrj
    
     
  4. Jun 3, 2009 #784 of 10917
    moyekj

    moyekj Well-Known Member

    11,376
    126
    Jan 23, 2006
    Mission...
    It is documented in VideoRedo_configuration that you need edit comskip.ini to enable .VPrj file creation. However I'm already working on this and other similar issues (like looking at task dependencies and enabling what is needed even if not enabled in GUI) for next release.
    For this case you bring up I will be using the comskip --videoredo option so that it will output .VPrj regardless of comskip.ini setting.
     
  5. Jun 3, 2009 #785 of 10917
    KateS

    KateS New Member

    7
    0
    Apr 19, 2009
    Thank you Moyeki – Running the chmod command from Terminal seems to have done it. kmttg decrypted a .tivo file and is busy encoding it.

    Quick followup:
    1. I notice that ffmpeg is running in a single thread and cpu; since I've got 8 cores available, is there a way of directing it to use more than 1?
    -Would it be to use "-threads" in the ffmpeg setup? If so, how would I add that to my encoding profile, and how many would I specify?
    -I'm currently using the ff_h264_high_rate profile.
    -Status: after 01:20:00 it's on 1046 mb of a 3gb show; For a high quality encoding at full resolution, HB & VH usually take about the same length of time as the show – an hour for an hour-long show (~6gb). so it looks like this is running about 8x slower. I figure I must have to change the configuration somehow… can you help?​

    2. Is there anything that provides "VRD QS fix" functionality for Mac users?
    If not, what do other Mac users do? Jump into Parallels to run a quickstrem fix, then come back to the Mac for transcoding?

    To answer your question: kmttg downloaded and installed the tools on it's own. I originally installed v0p6b. When v0p6c was released I swapped out the .jar file per the release notes.
     
  6. Jun 3, 2009 #786 of 10917
    AudioNutz

    AudioNutz New Member

    318
    0
    Nov 9, 2008

    I can answer that one. I use
    Code:
    -threads auto
    as part of my argument for ffmpeg, because I may run kmttg on more than one computer, and I want it to choose the threads based upon availability. Just start your encoding profile like:
    Code:
    FFMPEG -y -i INPUT -threads auto -s 320x240... blah, blah, blah
    I've discovered that there is a bug in (The Mac version of) HandBrake that causes really poor performance when you try to force the aspect ratio to correct itself. Avoid using HandBrake on a Mac, or suffer with the speed. On the other hand, I'm getting 2/1 time ratios on my old Dual G5 server with only 2 cores. (30 minutes to encode a 1hr show)

    If you're doing an "encode" as your last step of the kmttg process, you won't need it on a Mac. The ffmpeg encode process actually corrects the streams, and the little hiccups are gone.

    I tired the VRD QS fix on a PeeeCeee once, and wasn't impressed, becuse it was actually cutting out part of the show where the hiccups were happening. This was causing a second of the dialog to be removed from the show. I get angry when the punchline of the jokes are missing in the sitcoms.​
     
  7. Jun 3, 2009 #787 of 10917
    AudioNutz

    AudioNutz New Member

    318
    0
    Nov 9, 2008
    This leads me to a question of my own. When I unzip kmttg, I notice that there is a kmttg.jar file there, but there is always a kmttg unix type file sitting there also. I always swap both of these out, as I assume that this is the thing that handles auto-transfers.

    Kevin,
    Am I right? If not, can you explain what this is for?
     
  8. Jun 3, 2009 #788 of 10917
    moyekj

    moyekj Well-Known Member

    11,376
    126
    Jan 23, 2006
    Mission...
    That is odd since kmttg installation is supposed to be setting proper permissions on its own and I know through some help with Mac testing that it does work at least for some people - guess I'll have to look into that some more.

    It sounds like it would be a good idea to add a config option where you can specify number of cores to use during encoding. I'll add that to next release. As it is now you can just edit the encode/ff_h264_high_rate.enc file and add in -threads # option somewhere in the middle of the FFMPEG line, or alternatively copy the ff_h264_high_rate.enc to a different name of your choice and make the edit.
    Note that when you compare vs. HB & VH encoding times what you encode to has a huge effect. H.264 has by far the most complex/longest encoding times compared to most other encodings. I consistently find in general ffmpeg is much faster than HB given very similar encoding recipes.

    VideoRedo is currently only for Windows unfortunately (though I hear a Mac version is in the works but getting less priority than h.264 encoding). I know next to nothing about Mac platform & software so perhaps someone like AudioNutz can chime in. In general though there seems to be very few batch capable editors to do this properly so I think VideoRedo has that capability cornered for now. [/QUOTE]
     
  9. Jun 3, 2009 #789 of 10917
    AudioNutz

    AudioNutz New Member

    318
    0
    Nov 9, 2008
    I spoke too soon, and I need to correct myself. I have a license for "VisualHub" on Mac, so I use a slightly different argument that allows "-threads auto". I just tried this with the public version of ffmpeg, and it doesn't like it.

    I would suggest trying "-threads 8" for your 8 core machine.
    This is an example:
    Code:
    # Description (single line, keep short)
    <description>
    ffmpeg engine, 320x240 libx264 codec
    
    # Encode command or script (single line)
    # Known keywords: FFMPEG, MENCODER, PERL, INPUT, OUTPUT, PWD
    <command>
    FFMPEG -y -i INPUT -threads 8 -s 320x240 -aspect 320:240   -r 29.97   -vcodec libx264  -g 150  -qmin 25  -b 560k  -level 13 -loop 1 -sc_threshold 40 -partp4x4 1 -rc_eq blurCplx^(1-qComp) -refs 3  -qmax 51 -maxrate 700k -keyint_min 40    -async 50  -acodec libfaac  -ar 48000 -ac 2 -ab 128k OUTPUT
    
    # Encoded output file extension
    <extension>
    mp4
     
  10. Jun 3, 2009 #790 of 10917
    moyekj

    moyekj Well-Known Member

    11,376
    126
    Jan 23, 2006
    Mission...
    The kmttg file is a convenience script to launch the kmttg.jar file via command line on linux platforms. For Windows (and maybe Mac) when you install Java it makes a file association automatically to .jar files such that it knows what command to execute if a user double-clicks/launches the file. Under the hood what is being executed is java -jar file.jar (or javaw -jar file.jar for Windows). I assumed Mac OSX (which has mostly unix roots) would have to launch that way as well but sounds like perhaps not.
    When running kmttg in auto transfers mode it has to ultimately launch kmttg as "java -jar kmttg.jar -a", so with the convenience script that would be "kmttg -a" on Linux & Mac platforms. I'm surprised you were able to get away with swapping/renaming those 2 files, but I don't know enough about Mac platform to understand how it might work anyway.
     
  11. Jun 3, 2009 #791 of 10917
    AudioNutz

    AudioNutz New Member

    318
    0
    Nov 9, 2008
    The Mac Terminal command that I've been using to start auto transfers on Mac is:
    Code:
    /Applications/kmttg_v0p6c/kmttg -a &
    (The "&" symbol at the end just allows me to close the Terminal window after the auto transfers begin, so that I don't have it cluttering my screen)

    When I run the following:
    Code:
    /Applications/kmttg_v0p6c/kmttg.jar -a
    I get a Permission denied error, even if I change the permissions of the .jar file to all 7's.
     
  12. Jun 3, 2009 #792 of 10917
    moyekj

    moyekj Well-Known Member

    11,376
    126
    Jan 23, 2006
    Mission...
    OK, so this is exactly same as Linux/Unix model which is what I expected. To launch in GUI mode from command line you would simply not include the "-a" argument.
     
  13. Jun 3, 2009 #793 of 10917
    AudioNutz

    AudioNutz New Member

    318
    0
    Nov 9, 2008
    When I want the GUI, I double click on the kmttg.jar file, and it magically springs to life. :D
     
  14. Jun 3, 2009 #794 of 10917
    cherry ghost

    cherry ghost Well-Known Member

    5,483
    36
    Sep 13, 2005
    Chicago
    No luck with this or the newer mencoder. I'll keep using this kmttg.jar. Oh well, no big deal. Probably time to try out VideoRedo.
     
  15. Jun 4, 2009 #795 of 10917
    moyekj

    moyekj Well-Known Member

    11,376
    126
    Jan 23, 2006
    Mission...
    ==================
    v0p6d (06/04/2009)
    ==================
    http://code.google.com/p/kmttg/wiki/release_notes

    NOTE: If upgrading a previous kmttg version in same installation directory, be sure to copy the new encode folder with updated profiles.

    ENHANCEMENTS
    * SHOW column alphabetical sort now also sorts episodes of same show in date order

    * GUI mode will now remember tivo name selected on exit next time you start

    * Added encoding cpu_cores config option and added multi-core flags to all encoding profiles
    NOTE: If upgrading a previous kmttg installation be sure to copy the new encode folder
    with updated profiles. NOTE: New keyword CPU_CORES added to encoding profile files.

    * Added --videoredo option to comskip if VideoRedo is configured so that .VPrj file is created
    without need to edit comskip.ini

    * comskip task now shows &#37; complete for each phase (only comskip, not adscan)

    * Added task dependency checking - will automatically add missing tasks if needed.
    For example if Ad Cut is selected without Ad Detect and Ad Detect output file is not
    available then automatically enables Ad Detect job.

    * Added auto transfer START and SHUTDOWN messages so that there is a record of
    when auto transfers service/background jobs are started and stopped.

    * Added -harddup option to mencoder for better audio/video sync for cut mpeg files

    * Changed comskip/comcut labels to Ad Detect/Ad Cut

    * Added season # to AtomicParsley processing (so that mpeg4 videos get season # metadata)

    FIXES
    * Fixed auto mode crash problem related to unmapped mpaaRating when generating pyTivo metadata file.

    * Tool installer fix for Mac systems when setting executable file permissions to properly handle
    directories with spaces.

    * Filter out pyTivo beacons (previously pyTivo server was being treated as a Tivo)

    * Fix to apply toolTipsTimeout change when modified in config
     
  16. Jun 4, 2009 #796 of 10917
    bkdtv

    bkdtv New Member

    7,902
    2
    Jan 9, 2003
    DC Metro Area
    Great improvements!

    For next version, you might consider adding the ability to resize the JOB MONITOR columns. With the new version, you can resize the TIVO/FILE columns, but not the JOB MONITOR columns.

    For a future version, you might consider separating the TIVO/FILE listings and the JOB MONITOR listings. I was going to suggest a horizontal layout option, but most users probably don't have large, widescreen monitors as I do. A better alternative might be tabs across the top or down the left side -- you could have separate tabs for Files, TiVo, and Jobs (x), where x is the number of currently queued jobs. You could have one tab for TiVo, or separate tabs for each added/detected TiVo. On the Files and TiVo tabs, you could display the "start jobs" button and job options below the file/program listings.

    Edit from below: If a future version moves "Files" to a separate tab, it would be a nice if we could select a compatible video file on that tab and click "send" to push it to a particular TiVo.

    Eventually, you might enhance the "auto transfers" function to work in two directions, so one could automatically "send" (push) back recordings with commercials removed.

    For a future version, you might also consider the addition of a graphical space indicator for the selected TiVo. I have no need for this, but I know a number of people like that feature in TiVoPlaylist. A horizontal bar would probably work well as a space indicator; you could ignore suggestions / deleted items, or you could display those in a different color. Of course, the user would have to enter their capacity in File|Configure.

    I don't think you'd want similar job monitor and space indicator graphs on the screen at the same time, so that might make more sense for a future version that separates the TiVo and JOBS listings into separate tabs or columns. In the meantime, you could display a numeric value (&#37; available and/or available capacity in GB) in the status window when the user selects the TiVo. Or you could add a traditional status bar at the bottom of the window, and display the info there.

    A status bar at the bottom could also show other information, such as jobs completed, jobs remaining, and total job run time. If you were to implement tabs at some point, you could show specific information in the status bar for each selected tab.
     
  17. Jun 5, 2009 #797 of 10917
    abmcconnell

    abmcconnell New Member

    5
    0
    Aug 24, 2005
    Hi,

    Just started using this app. On "improvement" might be that you start asking for contributions. I think you've done a fine job here. Running on Mac 10.5.7. Straightforward install and it works.

    Cannot figure out why unencrypted .Tivo file (.mpg after decrypt) has no sound when played back via Quicktime, though all seems fine if I use VLC or ship the resulting .mpg back to the Tivo unit and play it there.

    Thoughts?

    -Alex
     
  18. Jun 5, 2009 #798 of 10917
    moyekj

    moyekj Well-Known Member

    11,376
    126
    Jan 23, 2006
    Mission...
    From what I recall Quicktime player does not support AC3 audio by default (supports Apple's AAC format instead). There may be extra codecs/plugins available to enable that. VLC comes with codecs for almost everything by default which is why it works there.
     
  19. Jun 5, 2009 #799 of 10917
    ajayabb

    ajayabb Member

    429
    0
    Jan 11, 2007
    Moorestown NJ
    Running KMTTG with Windows XP and Videoredo TV suite. QS fix launches without a problem but I get the following error with Ad detective



    adscan failed (exit code: 3 ) - check command: C:\WINDOWS\system32\cscript.exe //nologo "C:\Program Files\VideoReDoTVSuite\AdScan.vbs" "H:\My Tivo Recordings\Land of the Lost - Flying Dutchman_Fri_Jun_05.mpg" "H:\My Tivo Recordings\Land of the Lost - Flying Dutchman_Fri_Jun_05.VPrj" /q
    vprj file not found: H:\My Tivo Recordings\Land of the Lost - Flying Dutchman_Fri_Jun_05.VPrj
     
  20. Jun 5, 2009 #800 of 10917
    moyekj

    moyekj Well-Known Member

    11,376
    126
    Jan 23, 2006
    Mission...
    There are no further errors reported below the above? VideoRedo is exiting with exit code 3 (exit code 0 is what is normally expected) and not creating the .VPrj file for some reason, so that is the problem.
    Try bringing up a "cmd" window and run the above command from there to see if there are any errors reported. If still no clues then run without the /q argument at the end to see if there is any more information provided.
    If still no luck then open VideoRedo in graphical mode and run AdScan on that same mpg file manually to see if there are any issues.
     

Share This Page