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. Aug 10, 2010 #2541 of 10411
    Prestond

    Prestond New Member

    44
    0
    Feb 4, 2008
    Hi Kevin,

    Still using this great program for a couple of years now. I recorded Redeye off ABC the other night and I was able to download the .tivo file, but on 2 different pc's when I try to decode the files I am presented with the following error:

    >> DECRYPTING F:\tivo\Red Eye (08_07_2010).TiVo ...
    C:\kmttg\tivodecode\tivodecode.exe --mak MAK --out "F:\tivo\Red Eye (08_07_2010).mpg" "F:\tivo\Red Eye (08_07_2010).TiVo"
    tivodecode failed (exit code: 10 ) - check command: C:\kmttg\tivodecode\tivodecode.exe --mak MAK --out "F:\tivo\Red Eye (08_07_2010).mpg" "F:\tivo\Red Eye (08_07_2010).TiVo"
    processing frame: No error
    Encryption by QUALCOMM ;)

    Invalid MAK -- aborting


    I have no problem with other tivo recordings and all this is the first one I had issue with. Any ideas on what is happening? It errors out if I run straight download and decode and it errors out if I download and then add the file to be decoded..its erroring out during the decode. Its not an invalid MAK, its the same one I use for all my other shows and I have no problem with any other recorded show.

    Any ideas here? I tried searching but all I found was where folks actually had bad MAK #'s.
     
  2. Aug 11, 2010 #2542 of 10411
    bwall23

    bwall23 New Member

    73
    0
    Jun 8, 2009
    Thanks for the response :D

    I downloaded and am using pyTivoMetaGen, which meets my needs for this purpose. I guess one could always set up a custom script to call it and not check the metadata checkbox in kmttg when using it to transfer .tivo files from the TiVo to PC.
     
  3. Aug 11, 2010 #2543 of 10411
    Prestond

    Prestond New Member

    44
    0
    Feb 4, 2008
    Hi,

    Does anybody know what "tivodecode failed (exit code: 10 )" means?

    Thanks!



     
  4. Aug 11, 2010 #2544 of 10411
    moyekj

    moyekj Well-Known Member

    11,134
    27
    Jan 23, 2006
    Mission...
    It's probably due to an incomplete download? Have you checked the source .TiVo file with Mediainfo to see if it is a full length recording? Alternatively if you have at least partial TiVo Desktop installed (i.e. TiVo directshow filter installed) make sure it plays all the way through with Windows Media Player. Would also compare the .TiVo file size to the .mpg file size to see how close they are.
     
  5. Aug 11, 2010 #2545 of 10411
    marbordom

    marbordom Member

    38
    0
    Sep 29, 2007
    Bronx, NY
    I own a TivO HD on which I experienced this curl problem not a Premiere (so cant speak for that one).
    After reinstalling Windows 7 (using gparted I messed up the Windows partition) I am using this combination now:
    -- kmttg ---
    v0p7l
    --- JAVA ---
    latest 32 bit version from Sun (since 64 bit wont allow service to start)
    --- curl --- (cygwin version)
    curl 7.20.1 (i686-pc-cygwin) libcurl/7.20.1 OpenSSL/0.9.8o zlib/1.2.5 libidn/1.18 libssh2/1.2.5
    Protocols: dict file ftp ftps http https imap imaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
    Features: IDN IPv6 Largefile NTLM SSL libz

    With this combination curl gets going.
    So my final thoughts here are that at least two issues were hitting:
    1) some version or curl with some dll from windows causes a stall of the Tivo download (not in TS, cant say)
    2) due to this stall a curl binary will still be running in taskmgr. This causes the Tivo http server to stay connected. Since there is a limit of one download per Tivo it is required to terminate that stalled curl and either wait or reboot the Tivo. Exiting kmttg does not terminate this curl process. Latter brute force approach ist not always necessary. Sometimes a wait will let the http interface come back to live . Otherwise you get "http server busy" message or "transient error" from curl.

    Sure is that the root cause is not clear and there are workarounds which will work for some but not for all - very much what I expect from the Windows world.
     
  6. Aug 12, 2010 #2546 of 10411
    moyekj

    moyekj Well-Known Member

    11,134
    27
    Jan 23, 2006
    Mission...
    FWIW I did find a fairly simple & standard way using DOM for parsing xml files which is part of normal Java distribution which made it easy to parse get seriesId out of .TiVo metadata information. That is already checked in to source tree and will be part of next release. (Note that when starting from downloads instead of .TiVo files seriesId was already taken care of). If desired I can upload a beta kmttg.jar with that change, but since you already are using a different metadata generator perhaps it's a don't care at this point.
     
  7. Aug 18, 2010 #2547 of 10411
    rrr22777

    rrr22777 New Member

    532
    0
    Jul 31, 2002
    any idea why my downloads keep failing with error below?


    >> DOWNLOADING C:\kmttg\The Colbert Report (08_17_2010).TiVo ...
    C:\kmttg\curl\curl.exe --retry 3 --anyauth --globoff --user tivo:MAK --insecure --cookie-jar C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\cookie2802852220877324220.tmp --url http://192.168.0.201:80/download/The Colbert Report.TiVo?Container=/NowPlaying&id=552718 --output "C:\kmttg\The Colbert Report (08_17_2010).TiVo"
    Download failed to file: C:\kmttg\The Colbert Report (08_17_2010).TiVo
    Exit code: 7
     
  8. Aug 18, 2010 #2548 of 10411
    moyekj

    moyekj Well-Known Member

    11,134
    27
    Jan 23, 2006
    Mission...
    Some shows apparently have glitches in them that prevent downloads from completing, and in some cases a reboot might cure problems. I don't run into the issues so far with my S3s but some do. Easy way to check is paste the url from the command above into your browser to do the download (actually if you just click on the link in your post it should work for you). Username is "tivo", password is your 10 digit MAK #. If that still fails (you get an incomplete download) then it's a TiVo issue that you can't really get around - re-recording the show if it airs again is one possibility.
     
  9. Aug 19, 2010 #2549 of 10411
    jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    I've run into periodic download failures from my S3's too. There is no error given - data transfer just simply stops - the relatively new retry logic does not get it going again. I've even tried using curl directly and had the same issue. I haven't yet found if there are any command line options that would make the problem go away.

    One further piece of information - I don't know if it's relevant or not, but I wrote a perl version of a kmttg-like program, but it does the download in native perl instead of using curl underneath. I had periodic problems with it where a transfer would simply stop because the socket interface returned EWOULDBLOCK as an error code. I changed the perl module (I didn't like doing this) to tolerate this condition by simply sleeping for a bit and then retrying. Since I made this change, I haven't had a failure.

    I've seen something similar on a podcast downloader named juice. Transfers would halt because of EWOULDBLOCK.

    Is it possible that this is the underlying problem people are encountering when using curl? I'm not sure, but I though I'd throw that out there.
     
  10. Aug 19, 2010 #2550 of 10411
    moyekj

    moyekj Well-Known Member

    11,134
    27
    Jan 23, 2006
    Mission...
    Exit code 7 from curl is "COULD NOT CONNECT".

    I virtually never have any issues with downloads from both my S3s and I have literally done thousands of downloads by now. Once or twice I remember a condition where no downloads would start at all and a reboot was in order, but I've never had partial download issues. Also for recent posts about troubles with Win7 downloads and curl hangups I could not reproduce on Win7 laptop, so apparently I'm not a good test subject for debugging these problems.
    However I've seen enough posts indicating that downloading with other methods typically have same/similar problems as with curl, so I would more likely suspect TiVo server side problems than the client side pulling shows.
     
  11. Aug 19, 2010 #2551 of 10411
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    Hmm... I'm kind of excited to see what comes with the changes implemented in r1130 and above. I know I could download and compile to get a first-hand look, but I want to see where K. is going with this...

    The pithy change descriptions are intriguing! :D
     
  12. Aug 19, 2010 #2552 of 10411
    jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    I did some digging on curl and EWOULDBLOCK errors, and found that some changes were introduced into version 7.18.2 of curl to address these errors. I'm not sure if this solves the problems I've been having - the release notes were very vague - but I thought it was worth further investigation. The current version of curl is 7.21.1; the version installed by kmttg on my system is 7.18.0 - at least 10 versions behind current, and 2 versions behind the one that had the fix I wanted. I downloaded 7.21.1 and am trying it now. Since my problem is sporadic in nature, it will probably take some time before I am confident that this fixes the issue - I will let you know.

    In the meantime, anybody who is having transfer failure issues could try this out themselves. Just download and install the new version into a different directory and then point kmttg to that directory - you can always restore the old version if it doesn't help.
     
  13. Aug 20, 2010 #2553 of 10411
    bwall23

    bwall23 New Member

    73
    0
    Jun 8, 2009
    I am also having a problem with pyTivoMetaGen and it appears incorrect XML parsing causes it.

    Not sure if you're going after seriesID by pulling it from the 2nd XML chunk gen'd by tivodecode/tdcat, because that's the only place it exists for files from my TiVoHD.

    If you pad a recording to start/stop before and/or after it's scheduled time, the XML chunk output includes info for the show before and/or after the one you recorded. This is within the section <vActualShowing></vActualShowing>. The only way to get the correct info for the show actually recorded is to pull it from the section <showing></showing>.

    In the case where you pad the recording to start a minute early and end a minute late, the 2nd XML chunk contains 4 separate
    Code:
    <series>
       <uniqueId>######</uniqueId>
    </series>
    sections. Three in the <vActualShowing> section for the pre-pad show, your recorded show and the post-pad show. The other (and correct one all the time) is in the <showing> section.
     
  14. Aug 20, 2010 #2554 of 10411
    moyekj

    moyekj Well-Known Member

    11,134
    27
    Jan 23, 2006
    Mission...
    Yes, I always use the 2nd xml chunk file.
    Try out beta version of kmttg.jar in this zip file to see if it works for you. It looks for seriesId under <showing>/<program>/<series>/<uniqueId>
     
  15. Aug 21, 2010 #2555 of 10411
    bwall23

    bwall23 New Member

    73
    0
    Jun 8, 2009
    Running that beta now. At first glance it appears to get a seriesId for all .TiVo files I've tried it on so far. I'll need to verify it's pulling the correct seriesId. I do see other problems with this beta version where description, episodeTitle, isEpisode, isEpisodic, episodeNumber, etc. are being pulled from <vActualShowing> which is not the right place to get it from since padded recordings causes other program info to appear in that section, unless you can somehow identify which <element> in <vActualShowing> corresponds to the recorded program. In any case, there is no additional info for the recorded program in <vActualShowing><element> that isn't in <showing>.

    If it would help, I can zip up a couple xml examples and attach them.
     
  16. Aug 21, 2010 #2556 of 10411
    moyekj

    moyekj Well-Known Member

    11,134
    27
    Jan 23, 2006
    Mission...
    I think I just need to update it so everything is pulled from within <showing> and hopefully that should be correct. I'll post another version when ready.
     
  17. Aug 21, 2010 #2557 of 10411
    bwall23

    bwall23 New Member

    73
    0
    Jun 8, 2009
    Thanks.

    Just as an FYI, I have some .TiVo recordings that are missing some metadata, like description and/or episodeTitle, for some reason. Looking at the XML there isn't even a <description> or <episodeTitle> section. What happens in that case? Do you leave them out of the generated metadata file since pyTiVo doesn't care?
     
  18. Aug 21, 2010 #2558 of 10411
    moyekj

    moyekj Well-Known Member

    11,134
    27
    Jan 23, 2006
    Mission...
    OK, all keys are now parsed within <showing> only, so I believe should now be correct. Try this new beta version.
    For cases where certain keys don't exist they are left out of pyTivo file.
     
  19. Aug 21, 2010 #2559 of 10411
    bwall23

    bwall23 New Member

    73
    0
    Jun 8, 2009
    Excellent!!!

    Works great so far (tried about 50 files and comparing the XML with the beta output).

    Only one discrepancy, but I'm not sure if it will cause any issues with anything. On some programs you are setting "isEpisode : false" when the XML has "isEpisode : true", on others you get it correct.

    Thanks again for a great program!
     
  20. Aug 21, 2010 #2560 of 10411
    moyekj

    moyekj Well-Known Member

    11,134
    27
    Jan 23, 2006
    Mission...
    Looking at the code, I search for both "isEpisode" and "isEpisodic". But if isEpisodic exists it overrides the value of isEpisode. i.e. for final pyTivo file is basically:
    isEpisode = isEpisodic || isEpisode
    Can't recall why but it is intentionally coded that way, but perhaps because old way of parsing wasn't too smart. In any case in latest code I've commented that out so that isEpisode = isEpisode. Don't know if you want another jar file posted with tat update or not...
     

Share This Page