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 21, 2009 #21 of 3405
    westside_guy

    westside_guy Annoyingly ephemeral

    461
    1
    Mar 13, 2005
    The soggy...
    Here's what I get from streambaby.log:

    01/20/09 22:51:39 FFmpegExeVideoModule: FFmpegCmd: /sw/bin/ffmpeg -i /Volumes/foo/bar/2-4 Stasis Leak.m4v
    01/20/09 22:51:39 FFmpegExeVideoModule: VideoInfo:
    uri: file:/Volumes/foo/bar/2-4%20Stasis%20Leak.m4v, Container: mp4, Duration: 1794.9 seconds
    Video: h264 624x480 0.0 fps
    PixAspect: 1.0, Aspect: 1.3
    Audio: UNK 48000HZ 2 channels

    It is probably worth mentioning that I ran handbrake with h.264/ac3 passthrough and "web optimized" checked - the latter lets me stream via tivostream without having to run qt-quickstart. I started doing that because qt-quickstart showed a predilection for corrupting some of my video files.

    $ /sw/bin/ffmpeg -i 2-4\ Stasis\ Leak.m4v
    FFmpeg version UNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: --prefix=/sw --mandir=/sw/share/man --enable-shared --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-x11grab --enable-liba52 --enable-libamr-nb --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-mmx --disable-iwmmxt --disable-altivec
    libavutil version: 49.6.0
    libavcodec version: 51.49.0
    libavformat version: 52.2.0
    built on Nov 16 2008 19:26:44, gcc: 4.0.1 (Apple Inc. build 5465)

    Seems stream 0 codec frame rate differs from container frame rate: 48000.00 (48000/1) -> 29.97 (30000/1001)
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2-4 Stasis Leak.m4v':
    Duration: 00:29:54.9, start: 0.000000, bitrate: 2696 kb/s
    Stream #0.0(eng): Video: h264, yuv420p, 624x480 [PAR 0:1 DAR 0:1], 29.97 tb(r)
    Stream #0.1(eng): Audio: liba52, 48000 Hz, stereo
    Stream #0.2(eng): Data: text / 0x74786574
    Must supply at least one output file
    $
     
  2. Jan 21, 2009 #22 of 3405
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    Thanks westside_guy, that does the trick-- I don't currently recognize liba52 as a synonym for ac3. I'll make the change and upload a new version with the rest of the fixes from this thread tomorrow night.

    And the workaround mentioned in my previous post (actually we can make it a little more specific):
    mp4mod.streamformats=mp4,h264,*

    Should work fine in this case-- The only side effect would be if you happen to have an mp4 with h264 video and something other than aac/ac3 audio streambaby will try to stream it to the tivo (instead of transcoding it, which it should)
     
  3. Jan 21, 2009 #23 of 3405
    westside_guy

    westside_guy Annoyingly ephemeral

    461
    1
    Mar 13, 2005
    The soggy...
    Thanks much, Keary, but... GET SOME SLEEP!! :D

    This is very cool, and I look forward to seeing your updates - just don't burn yourself out.
     
  4. Jan 21, 2009 #24 of 3405
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    They are not installed on a mac. In fact, ffmpeg doesn't come with a mac (which is why I created the pyTivoX package.. so people wouldn't have to deal with that kind of stuff) -- there's a static ffmpeg in there.

    I can compile the shared libs seperately and put them in the distribution if that will make things 'act nicer'... I'm actually toying with a local build of pyTivoX that now uses both methods (pytivo and streambaby). So far so good.. and there's a gui for adding directories.. I'll probably put it up as a beta once it flows a bit better.. and will update the streambaby in there when you have updates...
     
  5. Jan 21, 2009 #25 of 3405
    westside_guy

    westside_guy Annoyingly ephemeral

    461
    1
    Mar 13, 2005
    The soggy...
    I know this was a question for Yoav; but I can tell you their location is going to depend on the method used for installation. People who installed ffmpeg via fink (like I did) will have those libraries in /sw/lib - in fink's case they're currently called:

    /sw/lib/libavcodec.51.49.0.dylib
    /sw/lib/libavformat.52.2.0.dylib
    /sw/lib/libavutil.49.6.0.dylib
    /sw/lib/libswscale.0.5.0.dylib

    Other folks may have installed via MacPorts, which I believe puts things somewhere under /opt.

    And of course if one builds it oneself (blech) it's probably under /usr/local.

    Yoav's pyTivoX pre-packages ffmpeg, so he controls where everything ends up in that case...

    addendum: I see Yoav answered while I was typing! :p
     
  6. Jan 21, 2009 #26 of 3405
    wmcbrine

    wmcbrine Ziphead

    10,364
    22
    Aug 2, 2003
    Missing the up/down arrows on the right side of the window that indicate when there's more of the list above or below the current page. (As I look at it now, tivostream doesn't have these either. Both apps should, though.)

    I also can't get it to actually play anything -- .mpg and .vob files just sit on a grey screen, everything else (including .mp4) says "Incompatible video stream". No error messages on the console or in the log, except "StreamBabyStream[#1,uri=null] warning: resource 2057 not found.", which appears (twice) on opening the app. This is in Ubuntu 8.10 AMD64, working ffmpeg in /usr/bin/, working tivostream. I tried the OpenJDK first, then Sun Java 6, with no change.
     
  7. Jan 21, 2009 #27 of 3405
    fred2

    fred2 New Member

    509
    0
    Jan 20, 2006
    First the thanks - changing the port number allowed it to run.

    But, I see NOTHING on my Tivo showing it running.

    The log is simple:

    "01/20/09 21:57:35 Listener: added factory
    01/20/09 21:57:35 Main: streambaby ready & listening."

    And another question. Probably based on linux origins but should directory/folders be specified with the slash or backslash?

    i.e.

    #dir.1=D:\Videos
    #dir.1.name=Streambaby videos
    #dir.2=D:/Videos
    #dir.2.name=Stream External Drive

    Oh. looking at my INI file I see I have left the comment in for ip address:

    # Ip address to bind to
    #ip=192.168.1.37

    I gather I need to change that to something meaningful (g)

    Oh, wait, I guess my DIR statements are also still COMMENTS with the # sign!!!! (yikes, I should know, at least, a little better than that!)

    Thanks for any additional assistance.
     
  8. Jan 21, 2009 #28 of 3405
    moyekj

    moyekj Well-Known Member

    11,140
    31
    Jan 23, 2006
    Mission...
    On Windows you can use either way, and as you realized you have to take the leading # comment character away from any setting you want to apply.

    Question: After you start streambaby then on your Tivo you are looking under Music, Photos & Showcases for the application right?

    To get more debugging info edit simplelog.properties and comment out com.unwiredappeal=Warn and add this one below it:
    com.unwiredappeal=Verbose
    (Once you are done debugging set it back to Warn)
    That generates a lot more messages that are also saved in streambaby.log for each session.

    Then when you restart streambaby you should see information about which IP was used and also which port.
     
  9. Jan 21, 2009 #29 of 3405
    fred2

    fred2 New Member

    509
    0
    Jan 20, 2006
    Actually, NO, I was wrongly looking in the "Now playing list" as I do for pytivo folders. I guess the hme stuff is different.

    So I did find Stream, Baby, Stream in Music, Photos. But when I selected an item I got a Please Wait over a gray screen. I will check my firewall and see what's what.

    But thanks for the help. Maybe my questions will help others less experienced in this stuff.
     
  10. Jan 21, 2009 #30 of 3405
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    In my experience last night, you get the gray screen/please wait while streambaby is filling up the initial buffer. Then it switches to black for a bit, and then the video starts playing.

    It would be cool if we could get an HME app like streambaby to appear in the Now Playing List. It makes more sense, logically, to have it there. I think that's a limitation of HME vs HMO though.
     
  11. Jan 21, 2009 #31 of 3405
    westside_guy

    westside_guy Annoyingly ephemeral

    461
    1
    Mar 13, 2005
    The soggy...
    Also note that it may take longer to do this initial fill, since streambaby may be transcoding the video. So at the moment you can't compare the time it takes for streambaby to start with, say, what it takes for tivostream to start.
     
  12. Jan 21, 2009 #32 of 3405
    fred2

    fred2 New Member

    509
    0
    Jan 20, 2006
    Gray screen pause was due to firewall, running upstairs to check, I approved the Java.... and I can now hear Harry Potter on the downstairs' TV-tivo.

    One more fascinating application.

    Thanks for sharing it, author

    And thanks for helping me out - others..........
     
  13. Jan 21, 2009 #33 of 3405
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    There are arrows on the left-hand side, though.
     
  14. Jan 21, 2009 #34 of 3405
    moyekj

    moyekj Well-Known Member

    11,140
    31
    Jan 23, 2006
    Mission...
    As windracer indicated in streambaby the left side has vertical arrows indicating if there are list items above/below/both. tivostream I will no longer be updating as this app trumps it by far.
     
  15. Jan 21, 2009 #35 of 3405
    wmcbrine

    wmcbrine Ziphead

    10,364
    22
    Aug 2, 2003
    The arrows on the left side (nice match for the native menus there, BTW) only indicate if the selection bar can be moved. They don't substitute for the right-side arrows (also found in the native menus, but not in these apps), which tell you if page up/down will be fruitful.

    You might miss these in the native menus, because they're a bit understated in the new theme. They used to be more prominent. But they're still there, and still important.

    And I can't agree that it trumps tivostreamer, since tivostreamer works for me and this, so far, doesn't. Of course I always thought HME/VLC trumped tivostreamer... can't compare it to this yet. :)
     
  16. Jan 21, 2009 #36 of 3405
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    Yup, your right. I'll add this in the next version. As others have pointed out it does have arrows on the left indicating there are more above/below but I will also add the right side arrows indicating there are more on pages above/below.

    Which of course will do you absolutely no good, seeing as...
    My devel is system is ubnutu 8.04 AMD64, but I'm upgrading as we speak to 8.10 to see if it makes a difference. (It's something I have been thinking about doing for a while, and this seems like as good an excuse as any).
    Are you running the default ffmpeg that installs with ubuntu or another version you compiled or installed from 3rd party repository? Shouldn't make a difference either way as I have run with a bunch of different ffmpegs.

    Probably best thing to do is edit the simplelog.properties and change the first line to read:
    com.unwiredappeal=verbose

    It may also make sense to disable preview mode temporarily to see if that helps anything. Edit the streambaby.ini file and add
    preview.disable=1

    And to turn on some extra debugging (specifically ffmpeg's stderr), run streambaby with:
    java -Dstreambaby.debug=1 -jar jbin/streambaby.jar
    Try to play an mp4 (which I believe you say gives you an incompatible error) and then an mpg/vob. If you could then send me the streambaby.log file that would be great. Not sure what the correct way of getting me a log file is, but e-mail address is my username and I use gmail.com.

    Sorry to ask you to jump through all these hoops to help with the debugging, I'm just not sure what is happening yet.
     
  17. Jan 21, 2009 #37 of 3405
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    Hmm.. I actually don't think streambaby is going to like those libraries, as it expects libavcodec and libavformat to be the same version (either both 51, or both 52). Not sure what happens otherwise...

    If we could try out compiling the mac native libraries, and seeing if they work, that would be great. If they do I can add them to the main dist. To try it out, compile ffmpeg and the shared libraries and stick them in the native directory of streambaby.

    Edit streambaby.ini and set:
    ffmpeg.path=native/ffmpeg
    preview.autogenerate=false
    transcode.disable=true

    And also edit simplelog.properties, and change the first line:
    com.unwiredappeal=verbose

    and then make sure you delete everything in the cache directory.

    Then re-run streambaby and try to stream an MP4 file (not an MPG). Because autogenerate is turned off any "thumbnails" you see will be real-time thumbnails and not from a generated cache file. While watching the MP4 try to FF (or sometimes rewind is easier, jump to 30 minutes then start rewinding) to a point outside the buffer. When the preview window pops up it should have thumbnail images of the movie. If it does, then the native libraries are working. If it just has the time the native libraries are not working.

    You can also look in streambaby.log, and if the libraries are at least getting loaded you will see something like:
    01/21/09 13:54:54 FFmpegJavaVideoModule: FFmpeg-java Module: loaded
    01/21/09 13:54:54 FFmpegJavaVideoModule: avUtilPath: /usr/lib64/libavutil.so.1d.49.3.0
    01/21/09 13:54:54 FFmpegJavaVideoModule: avFormatPath: /usr/lib64/libavformat.so.1d.51.10.0
    01/21/09 13:54:54 FFmpegJavaVideoModule: avCodecPath: /usr/lib64/libavcodec.so.1d.51.38.0
    01/21/09 13:54:54 FFmpegJavaVideoModule: swScalePath: /usr/lib64/libswscale.so.1d.0.5.0

    If they arent able to be loaded you will see "FFmpeg-java Module: NOT loaded" (or something to that affect)

    Keary
     
  18. Jan 21, 2009 #38 of 3405
    moyekj

    moyekj Well-Known Member

    11,140
    31
    Jan 23, 2006
    Mission...
    Keary, one suggestion is to list what versions of ffmpeg you have tested with since especially on non-windows platforms where it picks it up from user path there can be a very wide range of versions in use. I suppose you could try and lock it down further by rejecting versions that are too old but that may be another can of worms. The other issue is for self-compiled versions certain components that you may be relying on may not be present as when compiling your own there are many things that can be enabled or disabled. Perhaps a link to the ffmpeg source with instructions on what config options should be used to compile your own could be a useful Wiki to add.
     
  19. Jan 21, 2009 #39 of 3405
    Iluvatar

    Iluvatar New Member

    377
    0
    Jul 22, 2006
    Keary,

    Is there a particular reason why you chose to use FFMPEG as a shared library instead of a static library? I would think that if you could just link to the static library you wouldnt have to worry about avcodec/util/format..etc versions.

    As I am not able to check right now, is it possible to just drop my own precompiled statically linked FFMPEG into the native directory and have it work?
     
  20. Jan 21, 2009 #40 of 3405
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    I believe that's because it's a java app. He can't 'build it static' with those libraries. The best he can do is to use java native to access libraries, which is what ffmpeg-java does (he's using ffmpeg-java to do the stuff).
     

Share This Page