Easier to use pyTivo - pyTivo Desktop

Discussion in 'TiVo Coffee House - TiVo Discussion' started by Dan203, Jan 23, 2017.

  1. Apr 7, 2017 #201 of 2506
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    55,566
    8,106
    Apr 17, 2000
    Nevada

    Advertisements

    Well then that's not the issue. Only two other potential issues I can think of...

    1) There is a slight issue with the naming that could cause it to try to overwrite an existing file during the decryption phase. tivolibre doesn't allow that so if the output file name passed in already exists then it simply fails. Could that be an issue here?

    2) Could your antivirus software be blocking this somehow? I'm using the built in Windows 10 AV on my machine. Are you using something else? If so try adding an exception to it for the whole pyTivo install directory and see if that helps.

    Other then that I'm stumped. I've tried it on every machine I have and it always works, so I'm not sure why it's not for you. Even more perplexing is why that one time it did. If it were a constant failure that would be one thing, but intermittent failure is even harder to diagnose.
     
  2. Apr 7, 2017 #202 of 2506
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    55,566
    8,106
    Apr 17, 2000
    Nevada
    FYI I've just modified the pyTivo server code to fix the naming issue I mentioned. I also changed it so if the decryption fails it will rename the .tmp file to .tivo so you at least don't have to download the file again. I'll release a new version later today.
     
  3. Apr 7, 2017 #203 of 2506
    eherberg

    eherberg Active Member

    397
    226
    Feb 16, 2011
    I don't think it could be the naming. The tmp file gets deleted. I looked at the file name from the time I manually was testing successful decryptions. I was testing with one of my wife's daily chat shows. The file name for yesterday's, for example, is "Rachael Ray - 82224 (TS).TiVo'.

    For AV - I'm using the same as you -- stock windows 10 AV.

    Yeah -- I don't have an idea either. Don't know what else to test. However, I wouldn't sweat it. Command-line decrypt and kmttg still work -- and kmttg's file naming of the TiVo file is a lot more involved than the above. I think I recall seeing the entire episode name in there - and this particular daytime show of my wife's tries to fit the whole description in their episode title. :)
     
  4. Apr 7, 2017 #204 of 2506
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    55,566
    8,106
    Apr 17, 2000
    Nevada
    One more thing I thought of.... are these shows you're testing with from a channel that is H.264? One thing I didn't account for is that H.264 channels always have to be TS, even if the TS option is off. So if these are from an H.264 channel they could be being downloaded using the wrong format and the resulting file could be corrupt. (not sure what happens if you attempt to download a H.264 file using PS container)
     
  5. Apr 7, 2017 #205 of 2506
    lpwcomp

    lpwcomp Well-Known Member

    9,461
    299
    May 6, 2002
    John's...

    Advertisements

    You end up with a much smaller, audio only file.
     
  6. Apr 7, 2017 #206 of 2506
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    55,566
    8,106
    Apr 17, 2000
    Nevada
    According to Kevin (kmttg) this audio only file will also fail to decrypt using tivolibre, so this is my best theory so far.

    I've also been informed that there is currently no way to detect the video format ahead of time, so there is no way to force a TS for H.264 files even if the option is unchecked. So I'm just going to add a warning to my UI so that when you uncheck the TS option it tells you that downloading an H.264 file will result in an unusable file.
     
  7. Apr 7, 2017 #207 of 2506
    eherberg

    eherberg Active Member

    397
    226
    Feb 16, 2011
    No -- this is OTA mpeg2 channel. I was cord-cuttin' before cord-cuttin' was cool. :)

    I just deleted both the pytivo and pytivo-desktop folders from the roaming profile. Just noticed those remained even after uninstalling. Later tonight after my wife goes to bed, I'm going to re-install so those are created fresh and then try again. But for right now - she wants to actually watch some TV instead of watching me play with trying to decode it. :)
     
    Last edited: Apr 7, 2017
  8. Apr 7, 2017 #208 of 2506
    NowPlaying

    NowPlaying Member

    143
    2
    Mar 7, 2002
    Menlo Park,...
    I just wanted to say THANK YOU for this wonderful program. I've been using pyTivo for many years. I just build a new computer and was gathering the pieces to install pyTivo when I came across your program. Wow, so easy! Love it!

    Question on your updates. Do I just install them over my current installation?
     
    Mikeguy likes this.
  9. Apr 7, 2017 #209 of 2506
    eherberg

    eherberg Active Member

    397
    226
    Feb 16, 2011
    I've run out of ideas. Just did a fresh install. Changed the output folder a couple of times just to check. But no change. One thing I've noticed when monitoring the output folder is that I'm not seeing the temp file grow at the same rate as the transfer queue progress bar. I'll see the temp file have an initial size and then later change to another, but it never shows a size that is current with the transfer queue GUI. Does the transfer queue use something internal? Does it write to disk in chunks? Just curious, as when I use kmttg, I can see the file size being written to disk at the same rate as the progress window in kmttg is showing download.
     
  10. Apr 8, 2017 #210 of 2506
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    55,566
    8,106
    Apr 17, 2000
    Nevada
    I don't see it grow in the size column in explorer either. But if I keep right clicking and picking properties then the size there keeps growing.

    I just uploaded one more build. This one fixes the naming issue I mentioned above and if decrypting fails it renames the .tmp to .tivo so you don't have to download it again. Maybe if you try that you can see if the .tivo file it downloads is valid.
     
  11. Apr 8, 2017 #211 of 2506
    lpwcomp

    lpwcomp Well-Known Member

    9,461
    299
    May 6, 2002
    John's...
    Any chance it's a problem with the file name of the target decrypted file?
     
  12. Apr 8, 2017 #212 of 2506
    krkaufman

    krkaufman TDL shepherd

    16,800
    3,213
    Nov 25, 2003
    Anything's possible... Some program I used to use choked on files if parentheses were anywhere in the full path of the file.
     
  13. Apr 8, 2017 #213 of 2506
    eherberg

    eherberg Active Member

    397
    226
    Feb 16, 2011
    Well -- I've hit a wall regarding ideas for this version of pyTivo. Everything I've tried results in a fail on the decrypt. Interestingly, I just went back and put the original pyTivo (wmcbrine version) on my machine -- what the kids would call 'OG pyTivo'. :)

    Tried download and decrypt using that pyTivo -- and 100% success.

    Try download and decrypt using kmttg -- 100% success.

    Decrypt using the command-line tivodecode or tivolibre.exe -- 100% success.

    Only this version of pyTivo gives me a failure.

    These are all using the same parameters between all of the various tests -- parameters like output path, etc.

    So, I don't have any idea what the issue with this particular implementation is, but it's not like I'm left in the cold here or anything. I mean -- I certainly have other options for decode, if needed. In reality - I probably wouldn't need it much anyway. The only thing that is really recorded on the TiVo anymore is the wife's daily news and chat shows. Everything else has pretty much been moved to Plex due to easier whole-home / out-of-home functionality.

    Maybe if somebody else reports similar symptoms, something might shake loose that's common in setup or software between the systems that could explain it - but I'm afraid I just have no idea anymore what could cause the issue only with this version of TTG, where all of the others have success.
     
  14. Apr 9, 2017 #214 of 2506
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    55,566
    8,106
    Apr 17, 2000
    Nevada
    With the new version did it leave behind a .tivo file when the decrypt failed? It should have. If so is the file playable? Can you decrypt it manually? That will tell us if the issue is with the download or the decrypt.
     
  15. Apr 9, 2017 #215 of 2506
    eherberg

    eherberg Active Member

    397
    226
    Feb 16, 2011
    Yeah -- the .tivo file is written to the disk, although not playable. It is easily decrypted manually.
     
  16. Apr 9, 2017 #216 of 2506
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    55,566
    8,106
    Apr 17, 2000
    Nevada
    So the .tivo file that pyTivo downloads is OK? And can be decrypted manually using the tivolibre.exe supplied with install? That makes no sense at all. :confused:

    If there were some issue with how I'm launching the process then pyTivo wouldn't work at all because pyTivo.exe is launched from pyTivoTray.exe using the exact same code I use to launch tivolibre.exe for the decryption.

    I wonder if it's some sort of timing issue. Maybe tivolibre is being launched before the main pyTivo process has let go of the file and there is some sort of access error. That could explain the one time it did work. Maybe I should throw a sleep in there to give it a couple seconds before launching the decrypt process.

    Another thing you could try, if you're willing.... exit out of pyTivo completely. Go to the install folder. Double click on pytivo.exe. That should open a command window with the pytivo output being printed to the window. Now go into the desktop folder and double click pytivodesktop.exe. That will launch the UI. Now try again and when it gets to the end of the download watch the command window with pyTivo running. If there is some sort of error it will be printed there. If you can grab the text of the error and post it here so I can see what's going on.
     
  17. Apr 9, 2017 #217 of 2506
    lpwcomp

    lpwcomp Well-Known Member

    9,461
    299
    May 6, 2002
    John's...
    Does tivolibre use the directshow.dll? Is it possible that the way it is being launched from within pytivo creates an access problem?
     
  18. Apr 9, 2017 #218 of 2506
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    55,566
    8,106
    Apr 17, 2000
    Nevada
    No it doesn't. It does all it's decrypting internally.
     
  19. Apr 9, 2017 #219 of 2506
    eherberg

    eherberg Active Member

    397
    226
    Feb 16, 2011
    Below is the relevant output from the command console. I've only pasted from where the console window showed success in the transfer to the error point in the console window.

    INFO:pyTivo.togo:[09/Apr/2017 21:54:20] Done getting "C:\Video\Rachael Ray - 82120.tmp" from LivingRoom, 3201235432 bytes, 24.50 Mb/s
    INFO:pyTivo:127.0.0.1 [09/Apr/2017 21:54:20] "GET /TiVoConnect?Command=GetStatus&Container=ToGo&Url=http%3A%2F%2F192.168.1.18%3A80%2Fdownload%2FRachael%2520Ray.TiVo%3FContainer%3D%252FNowPlaying%26id%3D82120 HTTP/1.1" 200 -
    INFO:pyTivo:127.0.0.1 [09/Apr/2017 21:54:21] "GET /TiVoConnect?Command=GetStatus&Container=ToGo&Url=http%3A%2F%2F192.168.1.18%3A80%2Fdownload%2FRachael%2520Ray.TiVo%3FContainer%3D%252FNowPlaying%26id%3D82120 HTTP/1.1" 200 -
    INFO:pyTivo:127.0.0.1 [09/Apr/2017 21:54:22] "GET /TiVoConnect?Command=GetStatus&Container=ToGo&Url=http%3A%2F%2F192.168.1.18%3A80%2Fdownload%2FRachael%2520Ray.TiVo%3FContainer%3D%252FNowPlaying%26id%3D82120 HTTP/1.1" 200 -
    INFO:pyTivo:127.0.0.1 [09/Apr/2017 21:54:23] "GET /TiVoConnect?Command=GetStatus&Container=ToGo&Url=http%3A%2F%2F192.168.1.18%3A80%2Fdownload%2FRachael%2520Ray.TiVo%3FContainer%3D%252FNowPlaying%26id%3D82120 HTTP/1.1" 200 -
    INFO:pyTivo:127.0.0.1 [09/Apr/2017 21:54:24] "GET /TiVoConnect?Command=GetQueueList&Container=ToGo&TiVo=192.168.1.18 HTTP/1.1" 200 -
    INFO:pyTivo:127.0.0.1 [09/Apr/2017 21:54:24] "GET / HTTP/1.1" 200 -
    INFO:pyTivo:127.0.0.1 [09/Apr/2017 21:54:24] "GET /TiVoConnect?Command=GetStatus&Container=ToGo&Url=http%3A%2F%2F192.168.1.18%3A80%2Fdownload%2FRachael%2520Ray.TiVo%3FContainer%3D%252FNowPlaying%26id%3D82120 HTTP/1.1" 200 -
    Input file C:\Video\Rachael Ray - 82120.tmp not found: C:\Video\Rachael Ray - 82120.tmp (The system cannot find the file specified)
     
  20. Apr 9, 2017 #220 of 2506
    Dan203

    Dan203 Super Moderator Staff Member TCF Club

    55,566
    8,106
    Apr 17, 2000
    Nevada
    That's weird. That error seems to be coming from tivolibre, and obviously the file is there becuase python is able to rename it to .tivo after it fails.

    I'm leaning toward a timing issue. The writing thread may not have completely released the file when tivolibre is called which is causing it to get denied access. I'm going to try throwing a sleep in there for the next release and see if that helps.

    I really appreciate you running all these tests for me.
     

Share This Page

spam firewall

Advertisements