TiVo Streaming Plugin for Plex TiVoToGo.Bundle

Discussion in 'TiVo Roamio DVRs' started by ke3ju, Mar 6, 2018.

  1. Mar 8, 2019 #181 of 224
    windracer

    windracer joined the 10k club

    12,320
    241
    Jan 3, 2003
    St. Pete, FL

    Advertisements

    That's a known issue on Windows (and to be honest, I'm not really actively working on it, sorry).

    I thought I had corrected all the OS slash stuff. If I get a chance I'll look into it again (again, my primary platform for Plex isn't Windows).
     
  2. Mar 8, 2019 #182 of 224
    windracer

    windracer joined the 10k club

    12,320
    241
    Jan 3, 2003
    St. Pete, FL
    FYI, I've pushed a quick fix for the forward slash stuff. Windows is supposed to work with both kinds, but it's better to not hard code the forward slash.
     
    BrettStah likes this.
  3. jonw747

    jonw747 Active Member

    639
    32
    Aug 2, 2015
    Windows doesn't like forward slashes, it's probably Python handling it in some cases (but not others).
     
  4. HerronScott

    HerronScott Well-Known Member

    7,615
    1,131
    Jan 1, 2002
    Staunton, VA
    While it may not like them, they do work in a number of places like Start, Run C:/Windows/System32 or a cmd prompt like cd /users/default. Honestly I didn't realize this until the post above indicating it should support them. :)

    Scott
     
  5. ke3ju

    ke3ju Ed Ludwig

    327
    90
    Jan 4, 2004
    Seminole, FL

    Advertisements

    There was a Windows 7 patch years ago that made forward slashes work. We found this out at work. A batch file we sent out to 5000 users had a forward slash in it. It worked on our test machines (latest patches applied), but not the field machines (patches not applied). It sucked to say the least. The client told us every machine in the field was up to date, in our defense.

    I think the patch had something to do with POSIX support.
     
  6. jonw747

    jonw747 Active Member

    639
    32
    Aug 2, 2015
    Yeah, it looks like the underlying win32 API called CreateFile() permits either type of slash, so, really what we're dealing with are issues with the command interpreter because "/" is used to specify options.

    Even the cd command which seems the most permissive is going to cause problems if you have a folder named "D" because cd supports a "/D" switch.

    Anyway, thanks to windracer for keeping this project afloat.

    Do you or windracer think it would be possible to workout the issues with recording under Windows and to implement the ability to resume a program from where it was watched last? With both of those, the plug in would be pretty awesome for remote viewing with Plex. I'm not asking if you'd fix the problems running under Windows, just wondering if you think the problems are fixable.
     
  7. ligand

    ligand New Member

    23
    6
    Jun 20, 2010
    Hi. Thanks for creating this plugin. I'm trying to install it on a PMS running on OSX. Both TivoDecode and TivoLibre aren't working in my configuration. I've taking the commands and piped them together and it produced a lot of garbage on my screen. However when the commands run within the plugin I get a "broken pipe" error. I'm copying my the pertinent log entries below:
    2019-03-20 23:40:21,931 (70000f078000) : INFO (__init__:324) - GET URL: http://192.168.25.126:80/download/Whiskey Cavalier.TiVo?Container=/NowPlaying&id=11326

    2019-03-20 23:40:21,932 (70000f078000) : DEBUG (__init__:332) - CMD: "/usr/bin/curl" "http://192.168.25.126:80/download/Whiskey Cavalier.TiVo?Container=/NowPlaying&id=11326" --digest -s -u tivo:0123456789 -c "/var/folders/9q/8cw7cjqd2bb8ypgpnd_5zxmw0000gn/T/cookies.txt"

    2019-03-20 23:40:21,941 (70000f078000) : DEBUG (__init__:337) - PIPED to: "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" -jar "/Users/niten/Library/Application Support/Plex Media Server/Plug-ins/TiVoToGo.bundle/Contents/Resources/TivoDecoder.jar" -m 0123456789 -

    2019-03-20 23:40:21,948 (70000f078000) : INFO (__init__:346) - Starting decoder

    2019-03-20 23:40:23,382 (70000f078000) : INFO (__init__:354) - Unexpected error: [Errno 32] Broken pipe

    2019-03-20 23:40:23,383 (70000f078000) : INFO (__init__:362) - tivodecode/curl terminated



    Nitens-MBP-i7:bin niten$ "/usr/bin/curl" "http://192.168.25.126:80/download/Whiskey Cavalier.TiVo?Container=/NowPlaying&id=11326" --digest -s -u tivo:0123456789 -c "/var/folders/9q/8cw7cjqd2bb8ypgpnd_5zxmw0000gn/T/cookies.txt" | "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" -jar "/Users/niten/Library/Application Support/Plex Media Server/Plug-ins/TiVoToGo.bundle/Contents/Resources/TivoDecoder.jar" -m 0123456789 -

    ?DJ|?????

    A!?䪽?@???????AC-3)???????1???!d???

    ??????AKQ??DTG1A??GA94B???????3|??C?UK?c{

    ?7?????2HU <?o?*??I??Y?Ұ????e???!>?????"Ho?~?M?T7??岱,2[+?j?r???*䑕??I??}????&)???t?#b????}r??gP2?/|#:?bC?;??????w????"y-?*?K??????O+2]<?o?\E??^???߼?b7?????rLo?E??gz]uJ^?#~?.Vw?-?????M?????}?O?⣾X?_??uߝk?'?????3??@2\?Р??̰????Θ*???ʖ???̘?W?̚?h?l?2veOI̕??????T¬??A??(ʒ

    ?2?*u???X2S

    ?{??@?@}????t???)f~r

    ?ͤ??
     
  8. jonw747

    jonw747 Active Member

    639
    32
    Aug 2, 2015
    You may have configured the "Path to Java runtime" wrong. Admittedly the thread has been pretty confusing on the right setting, but you need to specify the path to the java executable, otherwise it's trying to pipe the stream in to a folder rather than an application.

    It could also be a permission error.

    so for instance, if you type:

    /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java

    at a Bash prompt, does it look like it's trying to run java? Or is that actually just a folder that includes java?

    In general, what you want to do is check all the paths/programs/commands in the log output and make sure they're all legit (as much as you can).
     
  9. ligand

    ligand New Member

    23
    6
    Jun 20, 2010
    So "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" is the path to the actual executable. I changed the Java path configuration to be "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin" and now I get:

    019-03-21 21:14:20,880 (700004cb5000) : DEBUG (__init__:180) - Done starting a thread

    2019-03-21 21:14:20,880 (700004cb5000) : WARNING (runtime:1065) - Generating a callback path for a function with no route: <function CreateVideoClipObject at 0x108594500>

    2019-03-21 21:14:20,881 (7000054bb000) : INFO (__init__:378) - Server already running or port in use

    2019-03-21 21:14:20,883 (700004cb5000) : DEBUG (runtime:88) - Sending packed state data (109 bytes)

    2019-03-21 21:14:20,883 (700004cb5000) : DEBUG (runtime:924) - Response: [200] MediaContainer, 1801 bytes

    2019-03-21 21:14:20,938 (7000050b8000) : INFO (__init__:324) - GET URL: http://192.168.25.126:80/download/The Orville.TiVo?Container=/NowPlaying&id=10673

    2019-03-21 21:14:20,938 (7000050b8000) : DEBUG (__init__:332) - CMD: "/usr/bin/curl" "http://192.168.25.126:80/download/The Orville.TiVo?Container=/NowPlaying&id=10673" --digest -s -u tivo:0123456789 -c "/var/folders/9q/8cw7cjqd2bb8ypgpnd_5zxmw0000gn/T/cookies.txt"

    2019-03-21 21:14:20,946 (7000050b8000) : DEBUG (__init__:337) - PIPED to: "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin" -jar "/Users/niten/Library/Application Support/Plex Media Server/Plug-ins/TiVoToGo.bundle/Contents/Resources/TivoDecoder.jar" -m 0123456789 -

    2019-03-21 21:14:20,955 (7000050b8000) : INFO (__init__:354) - Unexpected error: [Errno 13] Permission denied

    2019-03-21 21:14:20,956 (7000050b8000) : INFO (__init__:360) - Self-exit of tivodecode/curl

    2019-03-21 21:14:20,956 (7000050b8000) : INFO (__init__:362) - tivodecode/curl terminated

    It looks like the piped command line is missing "java" now? Can you point me to which folder I should check for permissions?

    Thanks again for the help and the great work
    Niten
     
  10. ligand

    ligand New Member

    23
    6
    Jun 20, 2010
    I just tried it with tivodecode instead and it works!!! :) I'm going to leave it like this for a while and not bother with Tivolibre.

    Niten
     
  11. jonw747

    jonw747 Active Member

    639
    32
    Aug 2, 2015
    The new problem is probably because you're trying to execute a path, rather than running java. You're old setting was probably right, but there's something going wrong either with running java or the other programs referenced.

    I can certainly understand the sentiment of giving up at the point it's doing something useful for you, though. :)
     
  12. ligand

    ligand New Member

    23
    6
    Jun 20, 2010
    You're right on the path change... but the weird part is if I copy and paste the 2 commands on the command line it works. Maybe its because of the version of python I'm using?
     
  13. windracer

    windracer joined the 10k club

    12,320
    241
    Jan 3, 2003
    St. Pete, FL
    Sorry for the delayed response, I've been out of town (out in AZ for my annual spring training trip).

    Since I'm just a tinkerer, and didn't write the original plug-in code, I'm not really the ideal person to implement big new features like that (assuming it's even possible to resume from the last watched point). I'm also not certain what the "ussyes with recording under Windows" you're referring to are. The big Window issue I have logged is the Mind RPC call (for file naming) and I spent a lot of (wasted) time on that trying to get it to work and really don't know why it doesn't.
     
    jonw747 likes this.
  14. windracer

    windracer joined the 10k club

    12,320
    241
    Jan 3, 2003
    St. Pete, FL
    Correct, it's the path to the java runtime including the 'java' (Linux/OSX) or 'java.exe' (Windows) part.

    The broken pipe usually indicates that the "stream" of data from curl (through the pipe to tivolibre) has stopped for some reason. I can't test on OSX, but it's sufficiently Linux-like. It could be a permission thing like @jonw747 suggested: maybe you're running the Plex service as a different user with different permissions than when you're running the debug command-line? From the command-line, if you remove the '-' at the end (which is sending the decoded stream to standard output, so you see all that garbage scroll by) and replace it with '> /some/directory/filename.mp4' you should get a converted file (assuming the curl process finishes successfully). So sorry, more debugging required.
     
  15. jonw747

    jonw747 Active Member

    639
    32
    Aug 2, 2015
    I wasn't sure if my problems with downloading (under Win10) were strictly due to naming, or something else, but I'd download like 3 different (copyable) programs and Plex would maybe show and play back one of them. It might have made a difference whether I used .mp4 or .ts, but I just couldn't get it to work consistently with any of the various things I tried.

    I also use kmmtg but this looks like it might had been a much better way to get a file from tivo over to a mobile device when the TiVo App just isn't in the mood ...
     
  16. ligand

    ligand New Member

    23
    6
    Jun 20, 2010
    I just wanted to say that I love using the TivoToGo Plugin for Plex. I use it everyday to stream content during my commute because the TiVo app's native streaming function is atrocious. @windracer Thank you so much for getting this working.
     
    windracer and BrettStah like this.
  17. windracer

    windracer joined the 10k club

    12,320
    241
    Jan 3, 2003
    St. Pete, FL
    I just stood on the shoulders of giants ... slapped some bandages on it and added some new stuff, but thanks! :cool:
     
  18. kendq

    kendq Member

    31
    2
    Jan 12, 2005
    I am a bit confused, Is there anyway someone could write a DETAILED installation route for windows users? I got as far as installing the plugin and it displays the Box Name with a '0'. I am getting lost on the installation of curl. Will this even work with the Win7 64bit and the Tivo bolt (I am using it for OTA) . Does the Plex have to have the Plex Pass activated? ever thought of a you tube video? would be a lot of Happier Tivo users I know Ive been considering giving up on it because I upgraded to the Bolt because it promissed out of home streaming, should have stuck with my series 2.

    Thanks for giving me hope
    kendq
     
    Last edited: May 26, 2019
  19. windracer

    windracer joined the 10k club

    12,320
    241
    Jan 3, 2003
    St. Pete, FL
    I've done basic testing of the plugin on Windows but my primary platform is Linux. I'm heading out on vacation for two weeks but maybe when I get back if I have time I could put something together. There are other Windows users in this thread that might be able to assist, though.

    If you don't have curl installed, the plugin can "see" your TiVo on the network, but can't retrieve the list of shows (that's why it shows 0).

    It should.

    No, I don't think so (although I am a Plex Pass subscriber).

    Not really. Again, if I have time when I get back from vacation maybe I can put something together, but doing a video would require more time than just writing up some instructions.
     
  20. kendq

    kendq Member

    31
    2
    Jan 12, 2005
    Windracer;
    Thanks for the reply, You already helped quite a bit with those answers, looks like my main issue is to get curl installed,
     

Share This Page

spam firewall

Advertisements