1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HME for Python

Discussion in 'Developers Corner' started by wmcbrine, Jan 28, 2008.

  1. Apr 9, 2008 #61 of 231
    wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    Yeah, I thought of that. The thing is, it well may be performance-related as to whether it shows up or not, but it should not happen, under any circumstances. It should not even be possible to send anything over HME that ever crashes your TiVo, or kills any of its functions. The whole point of the design of HME is to keep things safely sandboxed. So it's failing in a big way.
     
  2. Apr 9, 2008 #62 of 231
    wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    I will say that "Transitions" seems to be working better in 9.3; I haven't had it lose its place yet. But "Effects" still crashes immediately for me.
     
  3. Apr 18, 2008 #63 of 231
    wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    So, have you tried it again?

    I finally got 9.3a on my S3 today, and not surprisingly, everything works fine there, as it did before. (I did have an instance of the icons disappearing, though, requiring an hmeserver restart.) So at this point, I'm thinking to make the Animate/Effects check fail for anything that's not an S3 or HD, running 9.x -- or maybe, being optimistic, just 9.1 and 9.3.
     
  4. Apr 24, 2008 #64 of 231
    jbcooley

    jbcooley New Member

    55
    0
    May 13, 2007
    Any chance of seeing this run on Google App Engine? I think that would be cool to be able to host your tivo apps on google servers. I wish there were a similar service I could use for my .NET SDK.
     
  5. Apr 24, 2008 #65 of 231
    jbcooley

    jbcooley New Member

    55
    0
    May 13, 2007
  6. Apr 24, 2008 #66 of 231
    wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    I'll look into that... I've tried to get it to run as CGI, but couldn't quite make that work, at least not with Apache. I think it should be possible with mod-python, but so far I haven't got that working either.
     
  7. Apr 24, 2008 #67 of 231
    s2kdave

    s2kdave New Member

    515
    0
    Jan 27, 2005
    Yeah, that would be awesome if it does work. The biggest problem is that you can't open your own socket though or access the file system. So you are at the mercy of the web server that google provides. HME keeps a HTTP socket open/connected as long as you are using the app. I can see the google app engine killing the socket after a certain time period.
     
  8. Apr 24, 2008 #68 of 231
    jbcooley

    jbcooley New Member

    55
    0
    May 13, 2007
    This is part of the problem I had with IIS.
     
  9. Apr 24, 2008 #69 of 231
    s2kdave

    s2kdave New Member

    515
    0
    Jan 27, 2005
    That's the exact problem I had to solve with the Apache Tomcat Catnip extensions I made too. Any respectable web server will kill the connection after a certain time period.
     
  10. Jul 24, 2008 #70 of 231
    wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    0.12 -- No big stuff; mostly internal reorganization. Here's hoping that the next release will support video streaming. :)
     
  11. Jul 30, 2008 #71 of 231
    jbcooley

    jbcooley New Member

    55
    0
    May 13, 2007
    If you've got some protocol docs on that, please share. :)
     
  12. Jul 31, 2008 #72 of 231
    wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    I don't. I'm hoping it's easy to reverse-engineer... or that TiVo publishes an updated spec...
     
  13. Jul 31, 2008 #73 of 231
    s2kdave

    s2kdave New Member

    515
    0
    Jan 27, 2005
    It's not going to be an easy reverse engineer. Swivel search uses 2 way SSL certificates (albeit self signed) and I'm willing to bet youtube will do the same. But I definitely am interested in video streaming too so if you do figure it out. please share. :)
     
  14. Jul 31, 2008 #74 of 231
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    Not necessarily. There's no reason to suspect that's the case.

    Swivel Search allows proprietary comms between a TiVo unit and one or more servers at TiVo headquarters. These comms include accessing (at a minimum) guide data from Tribune that TiVo licenses, and is likely obligated to protect from intrustion. I can definitely understand why TiVo would want to lock that down.

    YouTube features open API's that anyone can code against, as far as I can tell. Why would TiVo or Google need to encrypt these sessions ?

    We'll find out soon enough. Someone over on the pyTivo forums is going to set up a capture and see exactly what's going on with the YouTube HME streaming.
     
  15. Aug 1, 2008 #75 of 231
    wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    Then again, maybe it is. :D

    Or maybe that's more educated guessing then reverse engineering... anyway, it works.
     
  16. Aug 1, 2008 #76 of 231
    s2kdave

    s2kdave New Member

    515
    0
    Jan 27, 2005
    Sweet! you rock.
     
  17. Aug 1, 2008 #77 of 231
    s2kdave

    s2kdave New Member

    515
    0
    Jan 27, 2005
    I just tested this equivalent java code and it works. There is one issue though. It has a long pause before starting the video after the please wait goes away (about 13 seconds). I'm guessing it's probably downloading the entire video before starting rather than streaming it. I tested this with the 1.4 HME SDK.

    Code:
    public class TestVideo extends BApplication {
    
        @Override
        public void init(IContext context) throws Exception {
            super.init(context);
            
            getRoot().setResource(createStream("http://192.168.1.114:7288/video/test.mp4"));
        }
    
        public static class TestVideoFactory extends Factory {
    
            @Override
            public InputStream getStream(String uri) throws IOException {
                if (uri.endsWith("test.mp4")) {
                    return new FileInputStream("skatedog.mp4");
                }
                return super.getStream(uri);
            }
            
        }
    }
     
  18. Aug 1, 2008 #78 of 231
    wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    I would say it's buffering, but not downloading the whole video. You can see a similar effect in the YouTube app. I got HME to play (well, play maybe the first half of, before I got an error) an hour-long MPEG-2 video, and it still only took ten seconds or so to start.

    Edit: Actually, I take it back -- the recording was only 23 minutes (only the first part of an hour-long program), and it was played back completely. The error I was seeing was due to premature closure of the second request the TiVo made for the file... why it made a second request is another issue.
     
  19. Aug 4, 2008 #79 of 231
    ebdavison

    ebdavison New Member

    4
    0
    Aug 4, 2008
    I love this idea -- HME from python. I have used Tivo ToGo quite a bit in the past but it has been "broken" lately and has not been downloading anything. I would like to add this feature to your hmeserver but am not sure how to even start. Do you have an app like this already? if not, any pointers on how I would go about getting a start on this?
     
  20. Aug 4, 2008 #80 of 231
    wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    TiVoToGo = HMO. It's outside the scope of HME. You may want to look at pyTivo. Or am I misunderstanding your question?
     

Share This Page