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 30, 2019 #12261 of 12874
    ACraigL

    ACraigL Member

    716
    1
    Feb 12, 2003

    Advertisements

    @moyekj Been a loooong time since I posted here, but continue to be a faithful kmttg user. I literally use it every day to save me on my rail commute. I've had an minor issue for a while and wanted to throw it your way for a possible feature consideration.

    I've noticed that the encoded output of the video file can be variable. Like if the program is one hour in duration, sometimes I get a file that's 57 minutes. If I run the same job again, it might be similar by a few seconds or much closer to the original length. I always seem to get cut out of the most critical parts of the show!

    So my ask would be a tolerance setting. Like, if the output is more than X seconds delta from the original recording length, rerun the job Y times. That way you could automate the opportunity for a more complete recording, but not run it into an endless loop. There's probably some logic that needs to be worked out (use cases and such) but thought I'd pitch the idea and see if you think it has any merit. Thanks!

    (for the record, I know the program has nothing to do with the resulting encoded video file, but thinking this is a good automation opportunity, in-line with the goals of the application. :) )
     
    Last edited: Aug 30, 2019
  2. Aug 30, 2019 #12262 of 12874
    minimeh

    minimeh Vanity Phrase Here

    346
    76
    Jun 20, 2011
    San Francisco
    You might want to look into pyTivo Desktop for downloading shows. It has logic much like you are suggesting. See Easier to use pyTivo
     
  3. Aug 30, 2019 #12263 of 12874
    ACraigL

    ACraigL Member

    716
    1
    Feb 12, 2003
    Was this for me? If so, I don't think the issue is downloading the show, but in the encoding. But I'll experiment with both.

    EDIT: Using PyTiVo I see there are packet errors when downloading. So you may be right. I guess the question is how do I automate the downloads through pytivo and the processing through kmttg?

    EDIT EDIT: I used google! Is this still a valid setup?
    pyTivo Discussion Forum :: View topic - KMTTG and pyTivo Installation Instructions for Windows
     
    Last edited: Aug 30, 2019
  4. Sep 3, 2019 #12264 of 12874
    reneg

    reneg Well-Known Member

    1,129
    226
    Jun 19, 2002
    Updated kmttg to version 2.4m, as well as java & Windows last week:
    Code:
    java version "1.8.0_221"
    Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
    Java HotSpot(TM) Client VM (build 25.221-b11, mixed mode, sharing)
    
    Code:
    Edition: Windows 10 Pro
    Version: 1903
    Installed on 8/29/2019
    OS  Build: 18362.295
    
    I am now seeing kmttg lock up on almost a daily basis. Not responsive to input nor will it repaint the screen after minimizing it and restoring the window to normal size after about a day of running. Anyone else seeing problems? I turned on kmttg debug to see if anything strange is getting logged.
     
    Last edited: Sep 3, 2019
  5. Sep 3, 2019 #12265 of 12874
    minimeh

    minimeh Vanity Phrase Here

    346
    76
    Jun 20, 2011
    San Francisco

    Advertisements

    I too have been seeing the UI just freeze lately. Same Windows and Java versions that you listed. I also run Malwarebytes for real time protection. Maybe something there?

    So far, I just take the path of least resistance and close out kmttg and start a new instance. I guess I really should try running with -d for debugging info.
     
  6. Sep 3, 2019 #12266 of 12874
    kpeters59

    kpeters59 Well-Known Member

    3,042
    631
    Jun 19, 2007
    Houston, Texas
    I'm pretty sure that my current KMTTG window has been running non-stop for the last month without any real issue.

    And I run it regularly via RDP from 4 different workstations.

    -KP
     
  7. Sep 4, 2019 #12267 of 12874
    reneg

    reneg Well-Known Member

    1,129
    226
    Jun 19, 2002
    Thanks for confirming that it's just not me seeing an issue.
    Are you currently running 2.4m of kmttg? 2.4l of kmttg was solid for me for many months. Have you updated java or Windows lately? My windows system rebooted last night after more OS updates, so I took the opportunity to reinstall 2.4l of kmttg to see if I get back to stable.
     
  8. Sep 4, 2019 #12268 of 12874
    worachj

    worachj Well-Known Member

    1,475
    117
    Oct 13, 2006
    Eagan, MN
    I've been running 2.4m of kmttg without any problems. But I'm using the 64-bit java version and have a different build for windows 10.
     
  9. Sep 4, 2019 #12269 of 12874
    reneg

    reneg Well-Known Member

    1,129
    226
    Jun 19, 2002
    I just had another kmttg freeze on 2.4l, so it leads me to believe that the problem may be in java or windows. I installed the 64 bit version of java which matches your build.
     
    Last edited: Sep 4, 2019
  10. Sep 4, 2019 #12270 of 12874
    kpeters59

    kpeters59 Well-Known Member

    3,042
    631
    Jun 19, 2007
    Houston, Texas
    Yes.

    -KP
     
  11. Sep 5, 2019 #12271 of 12874
    slowbiscuit

    slowbiscuit FUBAR

    4,583
    571
    Sep 19, 2006
    In the ATL
    Same here, it's always running on a server via RDP so I can have auto-skip. No issues on 2.4l, Java 1.8 221
     
    kpeters59 likes this.
  12. Sep 5, 2019 #12272 of 12874
    ThAbtO

    ThAbtO TiVoholic by the bay TCF Club

    12,306
    1,069
    Apr 6, 2000
    SF Bay Area
    Something that I would like to be added.....

    In the FILES tab, have a checkbox for "Auto-Start Jobs" toggle option. This is to allow me to drag-drop files into it and do the jobs chosen and remove from the files list, but would still remain in jobs box.

    What I currently do is (with jobs checked), drag files in, start jobs, remove from files.
     
  13. Sep 6, 2019 #12273 of 12874
    minimeh

    minimeh Vanity Phrase Here

    346
    76
    Jun 20, 2011
    San Francisco
    I ran kmttg from a command window with debug turned on:
    Code:
    java -jar kmttg.jar -d
    and boy howdy am I seeing something strange!

    After a day or so the GUI was unresponsive. However, the threads doing skip monitoring and auto downloads were chugging along just fine, so technically not locked up. I closed kmttg, opened up the debug log, searched for "error" and found:
    Code:
    1  >>>autoConfig.java: com.tivo.kmttg.main.autoConfig.parseAuto(line 74): entry={type=title, tivo=Sixto, keyword=startalk, keywords=[]}
    2  >>>autoConfig.java: com.tivo.kmttg.main.autoConfig.parseAuto(line 212): entry={type=title, tivo=Bedroom, keyword=dummy for bedroom NPL updates, keywords=[]}
    3  >>>tivoTab.java: com.tivo.kmttg.gui.tivoTab.atomicCB(line 369): button=Button@50426a2[styleClass=button]'Run AtomicParsley'
    4  >>>file.java: com.tivo.kmttg.util.file.isFile(line 49): f=C:\Users\pdellera\kmttg\AtomicParsley\AtomicParsley.exe
    5  >>>nplTable.java: com.tivo.kmttg.gui.table.nplTable.GetSelectedRows(line 836):
    6  >>>TableUtil.java: com.tivo.kmttg.gui.table.TableUtil.GetSelectedRows(line 155):
    7  >>>log.java: com.tivo.kmttg.util.log.getDetailedTime(line 244):
    8  >>>gui.java: com.tivo.kmttg.gui.gui.text_o(line 2885): s=No rows selected
    9  >>>tivoTab.java: com.tivo.kmttg.gui.tivoTab.atomicCB(line 369): button=Button@50426a2[styleClass=button]'Run AtomicParsley'
    10 >>>file.java: com.tivo.kmttg.util.file.isFile(line 49): f=C:\Users\pdellera\kmttg\AtomicParsley\AtomicParsley.exe
    11 >>>nplTable.java: com.tivo.kmttg.gui.table.nplTable.GetSelectedRows(line 836):
    12 >>>TableUtil.java: com.tivo.kmttg.gui.table.TableUtil.GetSelectedRows(line 155):
    13 >>>log.java: com.tivo.kmttg.util.log.getDetailedTime(line 244):
    14 >>>gui.java: com.tivo.kmttg.gui.gui.text_error(line 2885): s=No rows selected
    15 >>>SkipService.java: com.tivo.kmttg.rpc.SkipService.monitor(line 111):
    
    Lines 1 and 2 are for context and show normal auto download configuration file parsing.

    Then line 3 shows that the "Run AtomicParsley" button from the Files tab was clicked. That is followed by trying to get the file to run AtomicParsley from the table (lines 5-7) followed by a message of "No rows selected" in line 8. Lines 9-13 are again processing the button click event for "Run AtomicParsley" with an error message of "No rows selected".

    Line 15 is the normal start of skip service monitoring.

    So what's strange about all of that? There was no user interacting with kmttg, much less the Files tab at the time. The Files tab was not active or visible, and I am not sure if I have pressed the "Run AtomicParsley" button ever.

    The same sequence of events repeat later in the debug file. Then this juicy variation occurs:
    Code:
    1  >>>autoConfig.java: com.tivo.kmttg.main.autoConfig.parseAuto(line 74): entry={type=title, tivo=Sixto, keyword=startalk, keywords=[]}
    2  >>>autoConfig.java: com.tivo.kmttg.main.autoConfig.parseAuto(line 212): entry={type=title, tivo=Bedroom, keyword=dummy for bedroom NPL updates, keywords=[]}
    3  >>>gui.java: com.tivo.kmttg.gui.gui.getSelectedTivoName(line 1735):
    4  >>>gui.java: com.tivo.kmttg.gui.gui.getCurrentTabName(line 1730):
    5  >>>log.java: com.tivo.kmttg.util.log.getDetailedTime(line 244):
    6  >>>gui.java: com.tivo.kmttg.gui.gui.text_error(line 2885): s=This command must be run from a TiVo tab with selected tivo shows.
    7  >>>file.java: com.tivo.kmttg.util.file.isFile(line 49): f=C:\Users\pdellera\kmttg\auto.ini
    
    Again, lines 1 and 2 are for context and show normal auto download configuration file parsing.

    Lines 3-6 are about identifying the active tab and Tivo box name. Then line 6 is an error message saying "This command must be run from a TiVo tab with selected tivo shows." That message is issued from a procedure "getAddSelectedHistoryMenuItem()" only. That procedure is fired off only when the menu item "Add selected to history file" is clicked.

    Again, no user interacting with kmttg and to my knowledge I've never used that menu item.

    Further on in the debug log the "Run AtomicParsley" sequence repeats again.

    In the auto log, I see correlation of the messages "No rows selected" and "This command must be run from a TiVo tab with selected tivo shows." and auto skip servicing:
    Code:
    {"type":"whatsOnSearch"}
    
    2019_09_05_11:20:23 READ: MRPC/2 79 496
    2019_09_05_11:20:23 READ: Content-Type: application/json
    IsFinal: true
    RpcId: 14456
    Type: response
    
    {"whatsOn": [{"collectionId": "tivo:cl.321134782", "contentId": "tivo:ct.412035473", "channelIdentifier": {"channelNumber": "1111", "sourceType": "cable", "stationId": "tivo:st.110901431", "type": "channelIdentifier"}, "offerId": "tivo:of.ctd.110901431.1111.cable.2019-09-05-18-00-00.3600", "activeAudioStream": {"language": "en", "type": "audioStream"}, "availableAudioStream": [{"language": "en", "type": "audioStream"}], "playbackType": "liveCache", "type": "whatsOn"}], "type": "whatsOnList"}
    2019_09_05_11:20:29 ERROR: No rows selected
    2019_09_05_11:20:30 ERROR: No rows selected
    2019_09_05_11:20:30 WRITE: MRPC/2 237 24
    Type: request
    RpcId: 14457
    SchemaVersion: 17
    Content-Type: application/json
    RequestType: whatsOnSearch
    ResponseCount: single
    BodyId:
    X-ApplicationName: Quicksilver
    X-ApplicationVersion: 1.2
    X-ApplicationSessionId: 0xc13f7e5
    
    {"type":"whatsOnSearch"}
    
    2019_09_05_11:20:31 ERROR: No rows selected
    2019_09_05_11:20:32 READ: MRPC/2 79 496
    2019_09_05_11:20:32 READ: Content-Type: application/json
    IsFinal: true
    RpcId: 14457
    Type: response
    
    {"whatsOn": [{"collectionId": "tivo:cl.321134782", "contentId": "tivo:ct.412035473", "channelIdentifier": {"channelNumber": "1111", "sourceType": "cable", "stationId": "tivo:st.110901431", "type": "channelIdentifier"}, "offerId": "tivo:of.ctd.110901431.1111.cable.2019-09-05-18-00-00.3600", "activeAudioStream": {"language": "en", "type": "audioStream"}, "availableAudioStream": [{"language": "en", "type": "audioStream"}], "playbackType": "liveCache", "type": "whatsOn"}], "type": "whatsOnList"}
    2019_09_05_11:20:40 WRITE: MRPC/2 237 24
    Type: request
    RpcId: 14458
    SchemaVersion: 17
    Content-Type: application/json
    RequestType: whatsOnSearch
    ResponseCount: single
    BodyId:
    X-ApplicationName: Quicksilver
    X-ApplicationVersion: 1.2
    X-ApplicationSessionId: 0xc13f7e5
    
    {"type":"whatsOnSearch"}
    
    2019_09_05_11:21:01 READ: MRPC/2 79 496
    2019_09_05_11:21:01 READ: Content-Type: application/json
    IsFinal: true
    RpcId: 14460
    Type: response
    
    {"whatsOn": [{"collectionId": "tivo:cl.321134782", "contentId": "tivo:ct.412035473", "channelIdentifier": {"channelNumber": "1111", "sourceType": "cable", "stationId": "tivo:st.110901431", "type": "channelIdentifier"}, "offerId": "tivo:of.ctd.110901431.1111.cable.2019-09-05-18-00-00.3600", "activeAudioStream": {"language": "en", "type": "audioStream"}, "availableAudioStream": [{"language": "en", "type": "audioStream"}], "playbackType": "liveCache", "type": "whatsOn"}], "type": "whatsOnList"}
    2019_09_05_11:21:02 ERROR: This command must be run from a TiVo tab with selected tivo shows.
    2019_09_05_11:21:02 ERROR: No rows selected
    2019_09_05_11:21:10 WRITE: MRPC/2 237 24
    Type: request
    RpcId: 14461
    SchemaVersion: 17
    Content-Type: application/json
    RequestType: whatsOnSearch
    ResponseCount: single
    BodyId:
    X-ApplicationName: Quicksilver
    X-ApplicationVersion: 1.2
    X-ApplicationSessionId: 0xc13f7e5
    
    I don't know why this is happening but I'll keep looking.

    [EDIT]
    And it just occurs to me why the mysterious button and menu event clicks!

    When I found the GUI frozen, I tried clicking various elements to get a response. Of course there was no visible feedback at all from the GUI to indicate that it had processed the clicks. One of the things that I knowingly clicked was the Files tab which did not visibly bring up the Files tab--the Tivo box tab was still displayed. Then I clicked the visible "Prune skip table" button to no effect other than I did hear a ding. So actually, the Files tab had the logical focus even though not being visibly displayed. What I was actually logically clicking was the "Run AtomicParsley" button even though it was not visible. When the GUI is normal, you can switch between a Tivo tab and the Files tab and see that the two buttons share much of the same screen space.

    Similar events are true with the mystery "Add selected to history file". I had clicked the "Auto Transfers" menu item, which dropped down the menu logically but not visibly. Then I must have clicked on the screen where the "Add selected to history file" logically occupies the screen space.

    The good news is that makes whatever is happening to the GUI thread a lot less scary (no random jumping into code).

    The next time your GUI freezes, you can prove this out by clicking the Files tab (which won't appear) then click the visible "Prune skipTable" button a couple of times. You should hear a ding, see the error message in the messages window, and see the same in the auto log.
     
    Last edited: Sep 7, 2019
  14. Sep 6, 2019 #12274 of 12874
    reneg

    reneg Well-Known Member

    1,129
    226
    Jun 19, 2002
    One thing that I've also noticed is that kmttg is still running when it stops refreshing the display and responding to input. I haven't figured out a way to revive it when it gets in this condition other than closing it out and restarting it. I had turned debug off because it was very chatty with skipmode monitor running, but have turned it back on again. I've reinstalled VideoRedo, kmttg, run system file checker on Windows, and made sure my drivers were up to date.
     
  15. Sep 6, 2019 #12275 of 12874
    ThAbtO

    ThAbtO TiVoholic by the bay TCF Club

    12,306
    1,069
    Apr 6, 2000
    SF Bay Area
    Lately, I have seen a few occasions while it was adscanning, the progression stays at 0%. I had to stop the job and restart.
     
  16. Sep 6, 2019 #12276 of 12874
    minimeh

    minimeh Vanity Phrase Here

    346
    76
    Jun 20, 2011
    San Francisco
    Practically speaking, in the scenario outlined, the files would appear for only a blip in time in the Files tab anyway. So perhaps the files in the Files tab should be removed after their jobs have completed processing?

    Or wouldn't it be even better to drag and drop files directly to the jobs view and bypass the intermediate step entirely?
     
  17. Sep 6, 2019 #12277 of 12874
    ThAbtO

    ThAbtO TiVoholic by the bay TCF Club

    12,306
    1,069
    Apr 6, 2000
    SF Bay Area
    I don't think that works yet, and I haven't tried.
     
    Last edited: Sep 6, 2019
  18. Sep 6, 2019 #12278 of 12874
    minimeh

    minimeh Vanity Phrase Here

    346
    76
    Jun 20, 2011
    San Francisco
    Right. I meant as long as you're asking for an enhancement, would that not be a better implementation to ask for?
     
  19. Sep 6, 2019 #12279 of 12874
    ThAbtO

    ThAbtO TiVoholic by the bay TCF Club

    12,306
    1,069
    Apr 6, 2000
    SF Bay Area
    Yes, it might.
     
  20. Sep 6, 2019 #12280 of 12874
    minimeh

    minimeh Vanity Phrase Here

    346
    76
    Jun 20, 2011
    San Francisco
    The behavior I am seeing is so far out of bounds that I don't think there really is another way than restarting.

    Kind of reminds me of programming in machine code or C and bollocking the stack pointer with a stack overrun and a return from a procedure jumps into random code. But this is Java which is very well hardened against that sort of thing.
     

Share This Page

spam firewall

Advertisements