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. Dec 29, 2013 #6201 of 10413
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    That is a can of worms I'm not touching and is done for good reason. If you really want it you can try making your own build of kmttg. The relevant code is in "removeSpecialChars" method in tivoFileName.java:
    https://sourceforge.net/p/kmttg/code/HEAD/tree/trunk/src/com/tivo/kmttg/main/tivoFileName.java

    And instructions on how to build from source are here:
    https://sourceforge.net/p/kmttg/wiki/build_from_source/
     
  2. Dec 29, 2013 #6202 of 10413
    roadhowl

    roadhowl New Member

    3
    0
    Aug 10, 2011
    The ".kmttg_settings" file did the job. Thanks very much!
     
  3. Dec 29, 2013 #6203 of 10413
    ThAbtO

    ThAbtO TiVoholic by the bay

    6,724
    8
    Apr 6, 2000
    SF Bay Area
    There are some characters that cannot be used in filenames, such as the Question Mark (?), Asterisk (*), Quotation Marks ("), but some may be used, period _(.), comma (,), Apostrophe (') on PCs. Not sure on the MACs.
     
  4. Dec 30, 2013 #6204 of 10413
    lpwcomp

    lpwcomp Active Member

    8,081
    2
    May 6, 2002
    John's...
    I am in the process of switching to VideoRedo for the decrypt and have encountered an issue. Since it uses VideoRedo Qsfix for this, it creates a .qsfix file that gets renamed to a .mpg file at the end. However, if the .mpg file already exists, the rename fails and the .qsfix file gets deleted. All of this w/o notice. Since I have "Overwrite existing files" enabled, this is not the expected behavior.
     
  5. Dec 30, 2013 #6205 of 10413
    ALbino

    ALbino Lurker Series 2

    109
    0
    Jun 24, 2002
    Just out of curiosity, are there any benefits to using VideoRedo to decrypt?
     
  6. Dec 31, 2013 #6206 of 10413
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    Doesn't sound right unless you have the .mpg file write protected or in use somehow such that it can't be deleted/replaced. As a test I did following experiment (on Windows Vista laptop):

    Starting files:
    file1.TiVo
    file1.mpg

    From FILES mode selected file1.TiVo and only enabled "decrypt" task (with VRD set to decrypt).
    Clicked START and kmttg generated the file1.mpg.qsfix file and then renamed to file1.mpg without issue. I verified the date on file1.mpg was updated.
     
  7. Dec 31, 2013 #6207 of 10413
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    A couple of advantages I can think of:
    1. VRD can handle decrypting TS .TiVo files properly
    2. You can combine decrypt and QS Fix as 1 step
     
  8. Dec 31, 2013 #6208 of 10413
    lpwcomp

    lpwcomp Active Member

    8,081
    2
    May 6, 2002
    John's...
    Possibly tied up by pyTiVo or Win 8 is doing something weird.

    I just tried it again with both of my pyTiVos down.

    This is the file I selected to decrypt:
    Code:
    Miss Fishers Murder Mysteries.S01E01.Cocaine Blues.TiVo	4.53 GB 	D:\Video
    This is the log:
    Code:
    container=mpeg, video=mpeg2video
    >> Running qsfix on C:\kmttgmpegs\Miss Fishers Murder Mysteries.S01E01.Cocaine Blues.mpg ...
    C:\WINDOWS\system32\cscript.exe //nologo C:\kmttg\VRDscripts\qsfix.vbs "C:\kmttgmpegs\Miss Fishers Murder Mysteries.S01E01.Cocaine Blues.mpg" "C:\kmttgmpegs\Miss Fishers Murder Mysteries.S01E01.Cocaine Blues.mpg.qsfix" /l:C:\Users\JL5282~1.SUT\AppData\Local\Temp\VRDLock8268540284528016202.tmp /c:mpeg /v:mpeg2video 
    qsfix job completed: 0:00:10
    ---DONE--- job=qsfix output=C:\kmttgmpegs\Miss Fishers Murder Mysteries.S01E01.Cocaine Blues.mpg.qsfix
    (Renamed C:\kmttgmpegs\Miss Fishers Murder Mysteries.S01E01.Cocaine Blues.mpg.qsfix to C:\kmttgmpegs\Miss Fishers Murder Mysteries.S01E01.Cocaine Blues.mpg)
    
    There are some odd things going on but I am too tired to pursue it further right now. Will get back on it after sleep.

    I lied, I tried a couple more things, but based on the log, it sure looks like to me that if the mpg file already exists in the output directory, it never actually decrypts the .tivo file but simply runs qsfix on the .mpg file.

    Don't pursue it any further at this point, unless you want to. I need to try a stock version of kmttg, assuming I can get it to work, since I suppose it's possible that my local mods are screwing something up although none of my code is in areas that should cause this particular problem.
     
  9. Dec 31, 2013 #6209 of 10413
    RBeatse

    RBeatse Member

    37
    0
    Jan 6, 2005
    Salt Lake...
    I just upgraded a WIn7 PC to Win 8.1 and I'm trying to get KMTTG to work. I've installed Java and the application but when I click the jar file, I get a message that flashes on the screen that says (since it only flashes on the screen timing a screen shot is tough)

    If you click the picture you can see the error message larger, sorry.

    [​IMG]

    I have tried re-installing both Java and KMTTG and rebooting but I get the same message. Can anyone help?
     
  10. Dec 31, 2013 #6210 of 10413
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    I can't really read the text in the picture but sounds to me like you are exploring inside the kmttg zip file and then double clicking on kmttg.jar which doesn't work. You have to fully extract the zip file to some location (don't put it under Program Files) and then double click on kmttg.jar there.
     
  11. Dec 31, 2013 #6211 of 10413
    RBeatse

    RBeatse Member

    37
    0
    Jan 6, 2005
    Salt Lake...
    Thanks for looking but no, I have extracted it to a new locations, 2 different times to two separate locations and they all do the same thing. This makes me think it is a Java issue but I can't figure out what.

    I went to Java dot com and downloaded from there and then I also went to the link provided in the instructions to make sure I also got the 32 bit version and installed that. None of those things have helped.
     
  12. Dec 31, 2013 #6212 of 10413
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    Bring up a "cmd" window and execute the following (if I can read the text right in the image):
    Code:
    cd "c:\Users\Paula\Documents\kmttg_v10pk"
    kmttg.jar
    
    If executing kmttg.jar command doesn't work then try this instead:
    java -jar kmttg.jar

    This way you'll be able to read the error messages since the console window will remain.
     
  13. Dec 31, 2013 #6213 of 10413
    lpwcomp

    lpwcomp Active Member

    8,081
    2
    May 6, 2002
    John's...
    I installed and ran a stock kmttg and got the same result. If the .mpg file exists in the output directory, it just runs qsfix on that rather than decrypting the .tivo file.
     
  14. Dec 31, 2013 #6214 of 10413
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    Not if you specifically start from .TiVo file in FILES tab. Let me look into it more closely. But I'm curious why you have existing .mpg file already along with .TiVo file?

    EDIT: You're right it does pick up the .mpg file instead of .TiVo file as a starting point. But the rename still works for me.
     
  15. Dec 31, 2013 #6215 of 10413
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    Looking at the current code, the "qsfix" task specifically starts by looking to qsfix the .mpg file if it exists, else the .TiVo file otherwise. This makes sense if you don't have at least a partial install of TiVo Desktop such that decrypting .TiVo files is not possible. So not sure if changing to look for .TiVo file 1st is the right thing to do here. I suppose if the context is from "decrypt" task then that would be a reasonable thing to do, but for general "qsfix" probably not.
     
  16. Dec 31, 2013 #6216 of 10413
    lpwcomp

    lpwcomp Active Member

    8,081
    2
    May 6, 2002
    John's...
    Transitioning from ps download/tivodecode to ts download/VideoRedo.

    At this point I have no idea what is actually happening. I had assumed that the rename wasn't happening based on the date and the fact that the content of the .mpg was not changing. The rename may be happening and the date not changing may be some weirdness with Win 8.1.
     
  17. Dec 31, 2013 #6217 of 10413
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    I checked in some changes just now that if running qsfix in context of "decrypt" task, then look for .TiVo file as starting point instead of .mpg file. Original logic still applies assuming starting point as .mpg file when it exists if running qsfix from "qsfix" task context.
    If you svn update and build from source again you can test the change.
     
  18. Dec 31, 2013 #6218 of 10413
    lpwcomp

    lpwcomp Active Member

    8,081
    2
    May 6, 2002
    John's...
    Thanks for the quick response. It may be awhile before I can test it. There appears to be a conflict with my mods and more recent releases. I am still running v1p0k_beta.

    I may have to start over and re-apply my mods by hand. This is using Eclipse Kepler release.
     
  19. Dec 31, 2013 #6219 of 10413
    RBeatse

    RBeatse Member

    37
    0
    Jan 6, 2005
    Salt Lake...
    So this is the error I get


    Microsoft Windows [Version 6.3.9600]
    (c) 2013 Microsoft Corporation. All rights reserved.

    C:\Users\Paula>cd ..

    C:\Users>cd ..

    C:\>cd c:\kmttg

    c:\kmttg>kmttg.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: C:\kmttg\kmttg/jar
    Caused by: java.lang.ClassNotFoundException: C:\kmttg\kmttg.jar
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: C:\kmttg\kmttg.jar. Program will exit.

    c:\kmttg>java -jar kmttg.jar
    'java' is not recognized as an internal or external command,
    operable program or batch file.

    c:\kmttg>


    Any thoughts?
     
  20. Dec 31, 2013 #6220 of 10413
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    The NoClassDefFoundError error usually happens when default class is not defined in a manifest file. However, kmttg.jar has proper manifest file which properly defines the main class:
    Main-Class: com.tivo.kmttg.main.kmttg

    So not sure why your Java installation is not finding it...

    Try this. You first have to figure out full path to javaw.exe which you can do with command:
    ftype jarfile

    For me above returns:
    jarfile="C:\Program Files (x86)\Java\jre7\bin\javaw.exe" -jar "%1" %*

    Then take the full path to javaw.exe and add -cp kmttg.jar com.tivo.kmttg.main.kmttg which explicitly defines the class to use. i.e. In example above it would be:
    "C:\Program Files (x86)\Java\jre7\bin\javaw.exe" -cp kmttg.jar com.tivo.kmttg.main.kmttg

    (Do above from your c:\kmttg folder)
     

Share This Page