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

Streambaby - new streaming application

Discussion in 'TiVo Home Media Features & TiVoToGo' started by kearygriffin, Jan 20, 2009.

  1. Jan 27, 2009 #241 of 3415
    wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    Ah, now that's interesting. VLC supports rtsp. Let me try it the naive way in HME/VLC and see what happens...
     
  2. Jan 27, 2009 #242 of 3415
    herbman

    herbman Member

    117
    0
    Apr 8, 2008
    My experience with VLC's RTP/RTSP *output* is that it's very shaky. In this case, you'd have to get the TiVo to request an rtsp stream that would be served out. What's your vlc sout string look like?
     
  3. Jan 27, 2009 #243 of 3415
    wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
  4. Jan 27, 2009 #244 of 3415
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    I don't have a Tivo/Netflix network sniffing file dump handy but from what I recall it was all HTTP based
     
  5. Jan 27, 2009 #245 of 3415
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    I haven't spent a whole lot of time looking into this, but it did look HTTP based to me:
    HTTP GET /zzz/yyyyyyyyyy.wmv?etime=xxxxxxx&encoded=xxxxxxxxxxxxx
    EDIT: Decided since I don't really know what all of this means, probably better not to post the complete URL
     
  6. Jan 27, 2009 #246 of 3415
    jmemmott

    jmemmott New Member

    393
    0
    Jul 12, 2003
    Santa Cruz, CA
    Using HTTP as a carrier does not preclude the use of RTSP. Http tunneling is often used to traverse firewalls. The question is really whether the media is sent as a progressive download or as a RTSP conversation. I don't have an answer about the Tivo because I have not tried to watch the streams going in and out but RTSP would be consistent with the DRM practices Netflix uses elsewhere.

    (http://www.streamingmedia.com/article.asp?id=10790&c=4)
    "HTTP streaming via Windows Media Services is straightforward, including live streaming, using the Windows Media HTTP Streaming Protocol. In explaining the HTTP Streaming Protocol, Microsoft notes the best use for this type of delivery. Besides the ability to push video streaming content through port 80, which is open on many firewalls to allow traditional web traffic that is delivered via HTTP, the Microsoft HTTP Streaming Protocol "is suitable for streaming delivery at a fixed rate or at a data rate correlating closely to rate at which the video will be displayed by the receiver.""

    "This protocol, like other streaming protocols, also allows back-channel communications between the server and the client, allowing the client player to send feedback to the server to change the transmission rate to a secondary stream, which is referred to as "intelligent streaming" or "adaptive streaming.""

    "In addition, on Windows Media files, HTTP streaming can also be used to send commands like fast-forward, rewind, pause, or location seek (also called click-byte or range request)."
     
  7. Jan 27, 2009 #247 of 3415
    rfryar

    rfryar My Media, My Way

    222
    0
    Feb 15, 2008
    Cottage...
    Thanks for all the hard work already done on this project. It is really taking shape and looks nice.

    I know it was mentioned that moyekj had some prilimiary support for the PyTivo .txt meta files in his streaming application. I was hoping that his initial work could be added to Streambaby to read the .txt files and display them to the screen if they are present.

    Along with the request to read the TXT file would be to have a new icon name/value pair added to the txt file that could point at a "box" image for the movie.

    I am a developer and have contributed to PyTivo, written a plugin for it, and done other work so if your time is booked perhaps I can take a look at this if there is interest.

    Thanks for your efforts!

    Rick
     
  8. Jan 28, 2009 #248 of 3415
    westside_guy

    westside_guy Annoyingly ephemeral

    464
    1
    Mar 13, 2005
    The soggy...
    I was watching a show (via streambaby 0.19a) this evening, and paused it. I had to leave it paused for a few minutes. When I came back, live TV was playing! To make sure one of our dogs hadn't stepped on the remote, I tested it again - and after 5 (?) minutes on pause, my Tivo HD switched over to live TV again.

    Is this a known problem? Or is my Tivo just odd?
     
  9. Jan 28, 2009 #249 of 3415
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    There's code in there from moyekj's original tivostream that is supposed (I think) prevent that by sending a signal to the tivo every 4 seconds or so.

    Now having said that, I think there may be a case when this doesn't work. (I didn't think of it in this context till I saw westsides message). It is only activated when we are receiving events from the TiVo which is usually the case, as it is updating us with the current playing pos/duration/etc.

    However, I think there is a case when the tivo has hit either the end of it's 1.1g buffer or the end of the file where it stops sending events when paused. (Because neither the duration nor the playing position is changing at that point). In this instance I think the TiVo may time out after a while and switch to live TV.

    I'll have to look and see if there is anything I can do about this, but I'm not sure how hard it would be to fix.
     
  10. Jan 28, 2009 #250 of 3415
    Sevenfeet

    Sevenfeet Gentle Giant

    164
    0
    Jun 24, 2000
    Nashville, TN
    Didn't Adobe just publish the official specs for RTSP, sans DRM?
     
  11. Jan 28, 2009 #251 of 3415
    herbman

    herbman Member

    117
    0
    Apr 8, 2008
    They published specs for a flash-related streaming protocol. RTSP is long standardized and available. MS's implementation of it for Windows Media Services (for server 2003 and server 2008) is a little "enhanced", as they usually do.
     
  12. Jan 28, 2009 #252 of 3415
    wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    Oh yeah, I always meant to comment on that... it's a misfeature. Here's what you're currently doing:

    Code:
    // Prevent timeout by sending acknowledge signal every few mins
    if (date > timeout_idle) {
        getApp().acknowledgeIdle(true);
        timeout_idle = date + 4000;
    }
    
    This is in the middle of handleEvent(). So, you only acknowledge an idle event if it's been more than four seconds since the last time you did; if you happened to get more than one event within four seconds, the second event would be ignored (and the TiVo would drop the connection). Moreover, you don't actually acknowledge idle events at all, but rather any event that comes outside of four seconds from the last time you did it. This is all wrong.

    The right thing to do is to just handle the idle event. Here's how I did it in HME/VLC:

    Code:
    def handle_idle(self, idle):
        if idle and not self.stream.speed:
            if self.app.using_vlc:
                vlc.stop()
                self.app.using_vlc = False
        return bool(self.stream.speed)
    
    In my case, as you can see, I'm intentionally not handling idle events when the stream is paused. But I'm getting annoyed with the results, so I'll probably change that.

    In your case, you should probably just take out those lines, and add something like this (not tested):

    Code:
    public boolean handleIdle(boolean isIdle) {
        if (isIdle) {
            getApp().acknowledgeIdle(true);
        }
    
        return true;
    }
    
     
  13. Jan 28, 2009 #253 of 3415
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    Re: Idle timeout

    Thanks, I definitely would have "fixed" it the wrong way (and in a far more complicated way). I never realized (never looked) that there was an actual "EVT_IDLE" event.

    I've put in the code you suggested and will try it out tonight. Basically the logic (if I understand it correctly), assuming I want to always acknowledge idle and not timeout, is in the handle event loop:
    Code:
    If event.code == EVT_IDLE then acknowledge idle
    EDIT: Of course after trying this and looking into it more, I'm wrong again, and should have actually looked closer at what you said and the HME. Fixed.
     
  14. Jan 28, 2009 #254 of 3415
    jasa

    jasa New Member

    23
    0
    Nov 5, 2008
    Earth
    kearygriffin I just wanted to say how much I like what you are doing and that your application rocks !!!!!! although I like to have some minor fixes: first I would love to see some more format support added and also audio formats as well, I have been testing this app or about a week and I really love that you guys found a way to overcome 1.1G limit, but there has been times when it plays some .avi files and gives me incomparable video stream on others, also I would really like to have .flv format supported and maybe add an ability to stream over internet. other than that if you guys work a little on high def menu it will be the best app ever.


    Once again I think that your application is one of the reasons people should by tivo )))
    I am very thankful for all the hard work you guys putt into this app and I will also try to lep out with minor fixes i Might do myself )))
     
  15. Jan 28, 2009 #255 of 3415
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    That's the beauty of these apps that use ffmpeg in the background ... theoretically any format your build of ffmpeg can support, these apps can pass thru (i.e., transcode) for the TiVo.

    That being said, my build of ffmpeg on Ubuntu has .flv support. I was able to transcode an .flv through pyTivo just fine. But even after adding flv to the extensions list of my streambaby.ini file, streambaby says it's an incompatible video stream.
     
  16. Jan 28, 2009 #256 of 3415
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    Yeah, I was being a little to conservative on what I let ffmpeg try to transcode. The next version will have the spigots opened wider to attempt any format. (The current version can actually do FLV with the correct INI options, but it's probably just easier to wait a day or so for the next version).

    I also added FLV to the default extensions list.
     
  17. Jan 28, 2009 #257 of 3415
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    While you're adding, can you add .m4v (mp4 container, pretty much what apple uses for h.264/ac3 streams).
     
  18. Jan 29, 2009 #258 of 3415
    milkrun

    milkrun Milk Run

    10
    0
    Jul 2, 2004
    Menlo Park, CA
    I'm now running pyTivoX 1.1b4 the application is now appearing in the app list and I can stream movies.

    Some strangeness is occuring when I start playing the movie, the signal that the tivo sends is so strange that the TV or my receiver is losing sync. This results in my plasma showing static but I still hear the audio thru the speakers. If I switch to DVD and switch back, I get the stream and the audio again and the movie looks good. I haven't watched an entire movie, but it did fine for the 10 minutes I watched.

    One nitpick I have is that the filenames in Streambaby show the extensions. In this case, .mp4. In pyTivoX they are removed.

    Thanks again for all your hard work.
     
  19. Jan 29, 2009 #259 of 3415
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    I don't know about pyTivoX but that's a setting in the streambaby.ini file (trimextensions= (default:false)).
     
  20. Jan 29, 2009 #260 of 3415
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Ok I'll drop the extensions in the next release.
     

Share This Page