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. kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    I finally get around to incorporating your changes and now you can't use Streambaby ;-) Sorry.

    One little feature streambaby has that may make playing around with this issue a little bit easier is the ability to stream "raw" files. I use this for testing streaming various filetypes to the TiVo.

    If you have a video file you want to stream to the TiVo via Streambaby, copy or rename the file to end in ".raw". So for instance if you have "video.mpg" copy/rename it to "video.raw".

    Now create a second file in the same directory called "video.raw.fmt". This is a simple text file that contains one or two lines (the second line is optional).
    The first line should contain the mime type that streambaby will tell the TiVo the .raw file is. The second (optional, will use the default if not included) line tells Streambaby what "Content-Type: " header to use when when the Tivo requests the raw file from streambaby. Because of the way the TiVo works these could be two different values.

    As far as I can remember the only current format that streambaby uses the second line for (the Content-Type: ) is .TiVo files which requires a different mimeType (which is passed to the Tivo when you tell the Tivo to stream a file) than content-Type: (which is passed after the TiVo requests the file you told it to stream) is the .TiVo format.

    So for example, if the .raw file is a .TiVo file, the .fmt file should look like:
    video/mpeg
    video/x-tivo-mpeg

    for .mpg (ps) files:
    video/mpeg

    for MP4 files:
    video/mp4

    You may need to be careful about extra line feeds at the end of the file, I'm not sure how good a job the code does stripping them out...

    Hope this helps a little bit.

    Keary
     
  2. t1c4l

    t1c4l New Member

    15
    0
    Apr 13, 2009
    I've tried renaming one of my avi (XviD) files to .raw and I created a .raw.fmt file for it but can't seem to get it to work. I've tried all the mime types you've suggest plus many others but I have a feeling TiVo only supports the one you've listed and I've tried.

    Another things I've been looking at is that ffmpeg has an option to output mpeg format in Transport Stream by using the -f mpegts switch instead of using the -f vob (vob is Program Stream).

    I've tried customizing the ffmpegexe.transcode command line to use -f mpegts instead of -f vob but it doesn't make any difference as I still get this error so I am not sure if this is all there is to it (ie. change from program stream to transport stream)

    Can you explain to me the flow of video data with Streambaby?

    From what I can see ffmpeg is used to transcode the video input and then send it to Streambaby on local TCP port 8501 which it is listening on. After this I am unsure how the video stream gets to TiVo. I assume at some point Streambaby is simply passing this data on to TiVo and making no further change to it?

    I can still use pyTivo with no problem to pull/push videos so I don't know what exactly is different between the two different methods of steaming video to TiVo.
     
  3. kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    This won't work-- Using the raw file format assumes the file has already been transcoded to a format that the TiVo supports (mpeg ps/mp4/.TiVo on US TiVos) and the fmt file just tells Streambaby the mimetypes to use for this file. Since neither XVID or AVI files are natively supported this method won't work. What you should be doing is using ffmpeg (or something else) to transcode the file to a supported format (which might be mpeg ts on aussie units) and using the .fmt file to inform Streambaby of the mimetypes.

    This would be correct to get ffmpeg to generate a transport stream (I am assuming, haven't really used ffmpeg to get a TS before), however the mimetypes that Streambaby then tells TiVo the file is might be incorrect. (Depends on what mimetype the Aussie TiVos wants for TS files...)

    This is why it might be easier to use the .raw method, where you manually run ffmpeg to transcode the video file into format we think the TiVo wants, and then set the mimetypes in the .fmt file. This bypasses all of the transcoding/ffmpeg usage in streambaby.


    It's pretty straightforward, ffmpeg is run with certain options and the output is dumped directly to the TiVo. The TCP port is basically just used to pipe the output to Streambaby, which then just pipes it over to the TiVo as it is requested. No further processing is done by streambaby.
    Note: This is only true when videos are transcoded. For MPEG PS and MP4 files, the files are assumed to be able to streamed as-is to the TiVo with no transcoding needed. In this case FFMPEG is never run/used and the whole file is simply sent to the TiVo.
     
  4. t1c4l

    t1c4l New Member

    15
    0
    Apr 13, 2009
    Hmmm i've tried TIVO, MPEG2 PS, MPEG2 TS and MP4 files now as raw with their mime types in the .fmt file and I always get the 0xffff error.

    Code:
    10/31/09 24:55:45 RawStreamingModule: opening raw file with mimeType: video/mpeg, contentType: video/mpeg
    10/31/09 24:55:45 NamedStream: Registering named stream: 6244032b-cd20-4358-91ce-2ef8c41298cc.stream
    10/31/09 24:55:46 ViewScreen: error=ERROR: 0xffff sample.raw
    
    For MPEG2 TS I've tried the following mimes and none worked:

    video/mp2t
    video/mpeg2
    video/x-mpeg2-ts
    video/mpegts
    video/mpeg2ts
    video/ts

    It is almost as if none of the namedstreams can be registered, regardless of container format or mime type. To me it looks like they have broken something in this new TiVo update.

    Any other suggestions? :confused:

    Maybe if I can get a small sample.mp4 file with a sample.mp4.fmt file that has been verified that works on other TiVo's I could then confirm whether it works on the Aussie TiVo's. Maybe I am not encoding the test mp4 file correctly.

    Am I right to say if I find that it doesn't allow streaming of raw mp4 files then they have broken something in regards to registering streams/resources and that it is nothing to do with changing mpeg stream from program to transport?
     
  5. Nov 1, 2009 #1645 of 3415
    Dot.AY

    Dot.AY New Member

    1
    0
    Nov 1, 2009
    Just thought I would add another Aussie with a Tivo HD getting the 0xFFFF error

    Really frustrating StreamBaby in PytivoX is possibly the best thing about owning Tivo

    Has someone already posted a .log file for this error?
     
  6. Nov 1, 2009 #1646 of 3415
    angusj

    angusj New Member

    5
    0
    Jul 25, 2009
    Sydney
    "With the latest release of Software the .tivo files that are moved from the TiVo to the PC and back now use transport streams instead of program streams. This was necessary for us to support H.264 in NZ for both MRV and TiVo Desktop."

    see http[colon]//forums.whirlpool.net.au/forum-replies.cfm?t=1295400&p=10#r183

    (Sorry about the mangled url, I don't yet have enough posts to be allowed to post clickable urls.)
     
  7. Nov 1, 2009 #1647 of 3415
    westside_guy

    westside_guy Annoyingly ephemeral

    464
    1
    Mar 13, 2005
    The soggy...
    I can run 0.27 just fine on OS X 10.5.8, but when I've tried out r239 and now r253 with the exact same streambaby.ini file I get:

    Code:
    $ ./streambaby
    Initializing StreamBaby svn-r253...
    11/01/09 11:26:52 FFmpegJavaVideoModule: Unable to load FFmpeg native libraries
    java.net.BindException: Can't assign requested address
            at java.net.PlainSocketImpl.socketBind(Native Method)
            at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
            at java.net.ServerSocket.bind(ServerSocket.java:319)
            at java.net.ServerSocket.<init>(ServerSocket.java:185)
            at com.tivo.hme.host.http.server.HttpServer$PortInterface.<init>(HttpServer.java:204)
            at com.tivo.hme.host.http.server.HttpServer$Port.<init>(HttpServer.java:169)
            at com.tivo.hme.host.http.server.HttpServer.start(HttpServer.java:79)
            at com.unwiredappeal.tivo.streambaby.host.Listener.<init>(Listener.java:103)
            at com.unwiredappeal.tivo.streambaby.host.Main.<init>(Main.java:137)
            at com.unwiredappeal.tivo.streambaby.StreamBabyMain.main(StreamBabyMain.java:152)
    error: Can't assign requested address
    usage: Main [--port <port>] [--ip <ip>] class
    $
    
    Note that the initial "Unable to load FFmpeg native libraries" is not part of this problem - but I'm including that line for completeness' sake.

    Can anyone provide any guidance as to why I can't run the svn versions?
     
  8. Nov 1, 2009 #1648 of 3415
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    The newer SVN versions are much less forgiving to having an incorrect ip= in the streambaby.ini file (they actually adhere to it, where as older versions didn't always bind to the "correct" ip address). Make sure you have the right IP address in the file. (Or remove the line completely, and streambaby will attempt to autodetect)
     
  9. Nov 1, 2009 #1649 of 3415
    westside_guy

    westside_guy Annoyingly ephemeral

    464
    1
    Mar 13, 2005
    The soggy...
    Oh, shoot, I've been bitten by that one before - and I thought I had the correct IP address in there... but you're correct, that was the issue.

    Thanks, sir.
     
  10. Nov 3, 2009 #1650 of 3415
    t1c4l

    t1c4l New Member

    15
    0
    Apr 13, 2009
    Is anyone able to provide me with a smallish .mp4 file (under 10MB) with an .mp4.fmt file that has been verified to work on Streambaby outside of Australia and New Zealand? This way I can try and use these same files to try on my Aussie TiVo to see if it works.

    Because if I find that it doesn't work, then this could point to something entirely different than just a change from program to transport streams.
     
  11. Nov 3, 2009 #1651 of 3415
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    Here you go - this has been verified to work for a long time now and has been used by many for testing purposes. mp4 container, H.264 video, AAC audio:
    http://tivostream.googlecode.com/files/test.mp4
     
  12. Nov 3, 2009 #1652 of 3415
    t1c4l

    t1c4l New Member

    15
    0
    Apr 13, 2009
    Thanks mokeyj.

    Have you tried playing this file as .raw on Streambaby with a .raw.fmt file in the same folder? If you can please rename the .mp4 to .raw and then create a text file with .raw.fmt extension then Streambaby won't use ffmpeg to stream to TiVo. In .raw.fmt file please add video/mp4 on first line and leave second line blank.

    I'll test this file out as soon as I get home tonight.

    Cheers.
     
  13. Nov 3, 2009 #1653 of 3415
    t1c4l

    t1c4l New Member

    15
    0
    Apr 13, 2009
    Looks like playing of raw mp4 files doesn't work. Streambaby log is below.
    They must have completely changed the way video data needs to be sent to the TiVo. I don't think there is going to be an easy way to work out how to send it to the TiVo properly.

    Code:
    11/03/09 20:29:08 VideoModuleHelper: GetVidInfo: file:/C:/Downloads/VIDEOS/test.raw
    11/03/09 20:29:08 VideoModuleHelper: Guessing bitrate for file:/C:/Downloads/VIDEOS/test.raw to: -115663312
    11/03/09 20:29:08 HostContext: key=mpos:file:/C:/Downloads/VIDEOS/test.raw applicationId=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:08 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:08 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:08 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:08 HostContext: key=mpos:file:/C:/Downloads/VIDEOS/test.raw value=0
    11/03/09 20:29:08 HostContext: key=mpos:file:/C:/Downloads/VIDEOS/test.raw value=0applicationId=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:08 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:08 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:08 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:08 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:08 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:08 VideoModuleHelper: quality setting is above quality of video, streaming normally
    11/03/09 20:29:08 HostContext: key=mpos:file:/C:/Downloads/VIDEOS/test.raw applicationId=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:08 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:08 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:08 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:08 HostContext: key=mpos:file:/C:/Downloads/VIDEOS/test.raw value=0
    11/03/09 20:29:08 HostContext: key=mpos:file:/C:/Downloads/VIDEOS/test.raw value=0applicationId=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:08 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:08 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:08 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:08 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:08 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:08 VideoModuleHelper: quality setting is above quality of video, streaming normally
    11/03/09 20:29:10 ButtonScreen: action=right
    11/03/09 20:29:10 HostContext: key=mpos:file:/C:/Downloads/VIDEOS/test.raw value=0
    11/03/09 20:29:10 HostContext: key=mpos:file:/C:/Downloads/VIDEOS/test.raw value=0applicationId=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:10 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:10 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:10 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:10 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:10 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:10 ViewScreen: Desc: test.raw
    11/03/09 20:29:10 PreviewWindow: pWidth: 1280
    11/03/09 20:29:10 PreviewWindow: preview parent=BView[#2616,bounds=0,0,1280x720]
    11/03/09 20:29:10 HostContext: key=mpos:file:/C:/Downloads/VIDEOS/test.raw applicationId=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:10 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:10 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:10 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:10 HostContext: key=mpos:file:/C:/Downloads/VIDEOS/test.raw value=0
    11/03/09 20:29:10 HostContext: key=mpos:file:/C:/Downloads/VIDEOS/test.raw value=0applicationId=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:10 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
    11/03/09 20:29:10 HostContext: applicationIdStr=com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:10 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:10 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:10 HostContext: compKey=XXXXXXXXXXXXXXXXXX-and-com.unwiredappeal.tivo.streambaby.StreamBabyStream
    11/03/09 20:29:10 ViewScreen: goto position: 0, vidlen: -1
    11/03/09 20:29:10 ViewScreen: Position not in buffer, starting new stream
    11/03/09 20:29:11 Application: Already initialized, not re-initing.
    11/03/09 20:29:11 ViewScreen: Openening stream at position: 0(0 secs)
    11/03/09 20:29:11 VideoModuleHelper: Bitrate for quality: 2916
    11/03/09 20:29:11 VideoModuleHelper: quality setting is above quality of video, streaming normally
    11/03/09 20:29:11 RawStreamingModule: opening raw file with mimeType: video/mp4, contentType: video/mp4
    11/03/09 20:29:11 NamedStream: Registering named stream: 659c0916-bda4-49eb-b137-63ab6c655649.stream
    11/03/09 20:29:11 ViewScreen: error=ERROR: 0xffff test.raw
    11/03/09 20:29:11 ViewScreen: error=ERROR: 0xffff test.raw
    11/03/09 20:29:11 ViewScreen: error=ERROR: 0xffff test.raw
    11/03/09 20:29:11 ViewScreen: error=ERROR: 0xffff test.raw
    11/03/09 20:29:11 ViewScreen: error=ERROR: 0xffff test.raw
    11/03/09 20:29:11 ViewScreen: error=ERROR: 0xffff test.raw
    11/03/09 20:29:15 Listener: 
    11/03/09 20:29:15 Listener: connection to receiver closed
    11/03/09 20:29:15 Listener: 
    11/03/09 20:29:15 Factory: HME receiver disconnected
    
     
  14. Nov 3, 2009 #1654 of 3415
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    Yes, I just tried with streambaby in .raw form to be sure and it worked. I already knew it was compatible (note that it already also has moov atom at the front of the file as well as required by TiVo).

    Perhaps you can try a testcase using mpeg2 transport stream container instead of mp4 container and see if it works that way (leave test.raw.fmt as video/mp4):
    http://tivostream.googlecode.com/files/test.ts
     
  15. Nov 3, 2009 #1655 of 3415
    AussieMark

    AussieMark New Member

    8
    0
    Oct 27, 2009
    TiVo in Australia are claiming they have requested TiVO USA to liaise directly with Keary to provide him with the information needed in order to get this fixed. Keary, have you had any contact directly from TiVo on this?
     
  16. Nov 3, 2009 #1656 of 3415
    moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    That would be a first... The capability to stream to Tivos was uncovered by wmcbrine and some reverse engineering. TiVo has not updated HME SDK to officially support streaming and in fact have removed all references to SDK from their web site which to me signals they have little to no interest in providing help for 3rd party software and if anything are discouraging further development.
    There are some major hurdles such as the ~1.1GB stream buffer limit which could really benefit from some help by TiVo to overcome but I wouldn't hold my breath on getting any input from TiVo on this.
     
  17. Nov 3, 2009 #1657 of 3415
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    Yup, I've been wrong before but I would be (pleasantly) amazed if TiVo actually did reach out the open source community...

    This is a new scenario however-- This is the first time that I can think of that TiVo customers have had to pay for an extra option (I believe getting access to networked applications cost an extra AUD 99 in Australia) and then removed rather quickly what I believe (being very biased ;-) is the main benefit of the extra cost.
     
  18. Nov 3, 2009 #1658 of 3415
    t1c4l

    t1c4l New Member

    15
    0
    Apr 13, 2009
    No luck. Same issue again. Error 0xffff.

    Tried leaving it as video/mp4 as suggested, no go. Changed it to video/mpeg, no go as well.

    I did some beta testing for TiVo Australia when it first started, I will try and contact someone there to see if they can point us in the right direction.
     
  19. Nov 3, 2009 #1659 of 3415
    AussieMark

    AussieMark New Member

    8
    0
    Oct 27, 2009
    I hope you're wrong. This is what one of the TiVo staff (NB. Hybrid is the local TiVo operation in AU/NZ) posted on the Australian Whirlpool forum in response to the Streambaby issue ....

    "Craig- Hybrid writes...
    We have asked the TiVo US team to engage directly with the US Streambaby group in the hope they can provide assistance."
     
  20. Nov 4, 2009 #1660 of 3415
    madimoo

    madimoo New Member

    10
    0
    Feb 17, 2009
    Try $199. :(

    (although you can get it for $99 if you ask around nicely, or for free if you buy two TiVo's)

    The problem Hybrid have is that the Streambaby not working issue is starting to create some considerable negative publicity for TiVo, in a PVR market that is quite competitive. I'm sure Hybrid would love the situation to be resolved, but are a bit at the mercy of the US TiVo engineers.

    I saw a post where someone suggested to Hybrid that they pay to fly Keary down to Oz for a few days, share a few beers, shrimp on the BBQ or two, and work out a fix. Sounds like the go. :p:p
     

Share This Page