# Streambaby - new streaming application

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

1. #221 of 3453

### YoavNew Member

Jan 12, 2007
So I've always been curious as to how netflix avoids the issue. I thought it might be because they adjust their bitrate to match the network connection AND are already on a slow connection...

I'm still trying to understand the buffer limitation... is the following a fair explanation of the 1.1G limit?:
Code:
           A                          B
|--------------|--------------------------|
right now

So if you're at the 'right now' point in a stream, A represents the area you can trivially rewind to, B is the area you can fast forward to that has already been downloaded but not yet seen, and anything outside requires the 'tiny image mode'.

Is the 1.1G limit on A+B? or just B? (I was hoping it's just B). If so, and the application knows where it's at (another if?). Would it not be possible to slow down the transfer so that B doesn't fill up to 1.1G (or even just send a sigstop / sigcont to ffmpeg to force it to pause once in a while)?

2. #222 of 3453

### westside_guyAnnoyingly ephemeral

464
1
Mar 13, 2005
The soggy...
At least based on some tests I did streaming a file that is about 1.15G in size, it unfortunately appears to be a limit on A+B. I'd love to be wrong on that though (since most of my movie rips are in the 2G range).

3. #223 of 3453

### moyekjWell-Known Member

11,336
119
Jan 23, 2006
Mission...
Yoav, the buffer limitation right now is pretty simple:
Once you open a stream and send it to Tivo it will only accept ~ 1.1 GB worth of data to be stored in it's stream buffer. Beyond that limit it will automatically close the stream. So if I understand your representation it's A+B as westside_guy replied above. Streambaby does know exactly what time point you are at while playing back a stream which is why the workaround to start a new stream once buffer endpoint is reached is possible. Problem is of course, as soon as you start a new stream the old buffer contents are thrown out and a new buffer starts to build up.
There was some interesting discussion in this thread that possibly you can have more than 1 stream at a time sent to a Tivo which if so could lead to some interesting possibilities (if nothing else it could be used to make a smooth/quick transition between streams) but I don't think it's been explored very much yet.

4. #224 of 3453

### windracerjoined the 10k club

11,647
14
Jan 3, 2003
St. Pete, FL
Well, I was able to send some .avi files through streambaby tonight (running under Galleon) and ffmpeg kicked off just fine.

I did get the "failed to open stream" message once when I tried a particular .wmv file. But when I tried a different one (again, .wmv), it worked as expected (ffmpeg kicked off):

Code:
root     15136 14576 86 20:29 ?        00:00:07 ffmpeg -ss 0.0 -i /mnt/media/Video/Home Movies/ffla_award.wmv -acodec ac3 -ac 2 -ab 192k -vcodec mpeg2video -f vob -sameq -async 1 -v 0 tcp://127.0.0.1:8500
I was able to send plain MPEG-2 across as well (no ffmpeg for those either).

edit: the .wmv I was having problems with turned out to be a bad file. The video stream is WVP2 for some reason and my ffmpeg can't handle it. So it wasn't streambaby's fault.

5. #225 of 3453

### ajayabbMember

429
0
Jan 11, 2007
Moorestown NJ
I wonder why I get an incompatible video stream error with windows. I guess for some reason ffmpeg isnt transcoding with my setup on Galleon

6. #226 of 3453

### moyekjWell-Known Member

11,336
119
Jan 23, 2006
Mission...
Perhaps in your Galleon setup ffmpeg is not in your path? I don't know exactly how Galleon setup is but perhaps in the master script that starts Galleon you should check or ensure that the right ffmpeg is included in PATH.

7. #227 of 3453

### ajayabbMember

429
0
Jan 11, 2007
Moorestown NJ
I see Windracer has been able to activate transcoding thru Galleon. I wonder if my wrapper text differs from his. The classpaths seem to go thru the HME directory which contains ffmpeg.

8. #228 of 3453

### windracerjoined the 10k club

11,647
14
Jan 3, 2003
St. Pete, FL
What if you try explicitly telling streambaby where your ffmpeg is located? It looks like you can add 'ffmpeg.path=' to the streambaby.ini file and point to where your ffmpeg.exe is.

My own ffmpeg is under /usr/bin, which is in my Linux path when Galleon starts, so that could be why my install can invoke ffmpeg but yours can't.

9. #229 of 3453

### ajayabbMember

429
0
Jan 11, 2007
Moorestown NJ
did you move the streambaby ffmpeg folder over to the galleon.bin folder?

10. #230 of 3453

### kearygriffinNew Member

346
0
Jan 31, 2008
Actually, what I think may work is setting
lib.native=c:\path\to\streambaby\native
to wherever the native directory for streambaby is located. (Which contains the win32 ffmpeg libraries & executables)

It should automatically then look for both ffmpeg.exe and the libraries there.

11. #231 of 3453

### ajayabbMember

429
0
Jan 11, 2007
Moorestown NJ

Still no dice. Still getting incompatible video stream with following .ini settings

#
# ./streambaby --help for more configuration file options
#

dir.1=G:\videos
#dir.1.name=Someones videos
#dir.2=/media/disk
#dir.2.name=External Drive
# Ip address to bind to
# most people don't need to change this.
#ip=192.168.1.37
# port to use
port=7289
lib.native=C:\Program Files\streambaby-0.19a

12. #232 of 3453

### kearygriffinNew Member

346
0
Jan 31, 2008
Try changing that line to read:
lib.native=C:\Program Files\streambaby-0.19a\native

And restarting.

13. #233 of 3453

### vitocorleoneNew Member

14
0
Dec 30, 2005
Thanks for pointing that out - I defined both the lib.native and the preview.cache directories and, having followed windracer's instructions, it works FLAWLESSLY now - just as if I was running the service independently (only now I can still use Galleon for ToGo!). I'm very happy. Now to give it a genuine long test-run with a full movie....

(FYI - I had copied both the cache and native directories to the root of Galleon as well in case it doesn't work in some other directory; I never tried pointing the ini file to a directory outside of Galleon)

14. #234 of 3453

### ajayabbMember

429
0
Jan 11, 2007
Moorestown NJ
Ffmpeg still won't launch.

15. #235 of 3453

### windracerjoined the 10k club

11,647
14
Jan 3, 2003
St. Pete, FL
Nope ... because those files don't come with the Linux version (my native folder is empty).

Once you guys get it working on Windows, let me know the extra stuff and I'll update my post in this thread. Looks like the lib.native setting is working for vitocorleone but not ajayabb.

16. #236 of 3453

### ajayabbMember

429
0
Jan 11, 2007
Moorestown NJ
Did you point preview.cache to the same directory as lib.native?

17. #237 of 3453

### kearygriffinNew Member

346
0
Jan 31, 2008
I enabled google-code SVN access for people who want to follow along with the bleeding edge of streambaby development:

I'm trying to use git locally and push/pull from google code SVN. I've never used git or svn before, so hopefully I'm doing things correctly. (I've been using mercurial for a couple of years, but I think the time has come to switch to git. So far the basics look very simple, and all I really need at this point are the basics).

The changelog file should always be main/changelog.txt listing the latest changes.

And for those of you who do try this, I'll try to explain the most controversial of the changes for the next revision:

I've changed the icons used for streambaby. I was a little worried about the license for the previous set of icons. Although the license said it was OK to use in open source software, it wasn't what I would call a real open source license. I wasn't sure if it was OK to mix the images with both the GPLed code, and I wasn't sure whether it was OK to host the icons on google code if they weren't one of the standard google-code licenses. The new icons are GPL/LGPL.

Having said that, I think the new icons look pretty good, and I've made it easier for people to change them if they wish. I'm hoping this will keep those people happy who don't like the new ones

18. #238 of 3453

### jmemmottNew Member

393
0
Jul 12, 2003
Santa Cruz, CA
You may be looking at two different "streaming" modes, however. From the little I have looked into Netflix streams from the Silverlight/PlayReady DRM side, it appears that Netflix is using Windows Media Services rather than progressive downloads. The WMS server streams via Real Time Streaming Protocol (RTSP) which provides two-way out of band communications to monitor quality and allow the client to invoke DVR like commands (stop, pause, reposition, ... ) on the server side. This also allows it to be designed not to allow or need more than about one minute or so of media data on the client. This chunk is small enough it can be processed entirely in memory and should never be committed to any permanent storage during the process according to Microsoft : no disk buffers at all!

19. #239 of 3453

### YoavNew Member

Jan 12, 2007
20. #240 of 3453

### herbmanMember

120
0
Apr 8, 2008
Of course then, the question is... how to stream over RTSP/MMS instead of plain-jane HTTP? RTSP would be a better protocol for all streaming anyway.