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 29, 2009 #261 of 3405
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    The first 10 seconds of a stream is 'weird' (people generally see blockiness/no picture/green/an older movie..) I'm guessing your TV or receiver is unhappy enough with that sort of input that it's freaking out. I'm not sure if that will ever be resolved though (it sounds like it's some issue with how the h.264 stream is decoded in the tivo, involving some buffering of old data?). There may be a workaround possible, but I don't know of one...
     
  2. Jan 29, 2009 #262 of 3405
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    I have a couple of videos that show this problem, and they are all encoded with Handbrake.

    I've added a few things to help minimize the problem, but don't think it solves the issue all of the time.

    The problematic videos also seem to have problems with other players.
    mplayer: Plays fine, but playing with mplayer -ss 0.01 file.mp4 gives green stuff and h264 decoding errors.
    vlc: Sometimes gives green stuff in the beginning. From the results I get it seems like it's accessing uninitialized data, because the first time I play I get green, but then it gets hard to reproduce.

    So it seems that at least certain combinations of Handbrake and various players is causing some issues, only with the beginning of the stream. I'm not sure what the issue is. It may be the handbrake is doing something completely legal in the files, but some players aren't equipped to handle it well.
     
  3. Jan 29, 2009 #263 of 3405
    Sicklybutsexy

    Sicklybutsexy New Member

    179
    0
    May 5, 2007
    There's no way to get this program to support closed captions is there? It has become my primary mode of adding .srt subtitles to movies using T2sami (very easy and quick ie...no re-encoding).
     
  4. Jan 29, 2009 #264 of 3405
    westside_guy

    westside_guy Annoyingly ephemeral

    462
    1
    Mar 13, 2005
    The soggy...
    Well, thing is - tivostream doesn't have this problem with the exact same files. ;) So it's apparently due to something streambaby is doing differently than tivostream did.
     
  5. Jan 29, 2009 #265 of 3405
    jmemmott

    jmemmott New Member

    393
    0
    Jul 12, 2003
    Santa Cruz, CA
    All my attempts to date lead to the conclusion you can't. It is not the fault of the streaming programs. Rather it appear that the Tivo does not support the caption decoder when it is processing streamed video. Even streaming a .tivo source file which we know contains captions as an mpeg will not display captions.

    As an interim solutions, t2sami can use mencoder to process the .srt to open captions in an mpeg that can be streamed but that does require reencoding the video.
     
  6. Jan 29, 2009 #266 of 3405
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    It is possible for a streaming application such as streambaby to read a helper srt file and display the captions. Probably the biggest issue though would be getting proper sync with video & text since the event granularity is not well defined. For example, Keary has mentioned this before that indication of current position in the stream for H.264 can be off by as much as 8 seconds or so. Also for cases when text needs to change rapidly there may not be enough granularity/resolution to display them properly.
    I haven't spent any time trying to implement it but I suspect at least a poor man's version is possible but the question would be is it worth the time investment when the outcome may be dubious.
    Another question is I don't know how accurate .srt file generation is. Obviously if there are problems there then there's no way you can ever keep video+text in sync.
     
  7. Jan 29, 2009 #267 of 3405
    jmemmott

    jmemmott New Member

    393
    0
    Jul 12, 2003
    Santa Cruz, CA
    I am in basic agreement. When the helper approach was first put forward, my belief was that the sync problems would be great enough that it would be a serious irratation to those who rely on captions - much like out of sync sound is for the hearing population.

    As far at the accuracy of the .srt files, they are as good as the caption editor makes them. When I convert to/from closed captions, I can get frame accurate placement of the starting point. When they come from anime and fansubs, my experience is that there is equal care in locating them carefully.

    This is one of the reasons (along with the GB limit) that I have been hoping that the Netflix streaming mode will bear fruit and have been pursuing the production side of that problem. When fully implemented in the Tivo and Silverlight Players, it will provide full support for captioning that is as accurate as closed captioning in broadcast video is capable of being.
     
  8. Jan 29, 2009 #268 of 3405
    Sevenfeet

    Sevenfeet Gentle Giant

    164
    0
    Jun 24, 2000
    Nashville, TN
    After a Google search, I found out that ffmpeg has been successfully ported to Solaris 10. I'll need a bunch of gcc software (normally found on my Unix machines but since I recently rebuilt it, I'm starting from scratch) and the source from svn. But after all that, I think I can get streambaby to run on it with all features, much like Linux.
     
  9. Jan 29, 2009 #269 of 3405
    ajayabb

    ajayabb Member

    429
    0
    Jan 11, 2007
    Moorestown NJ
    Well I finally got it running with Galleon. Thanks for everybody's help. My biggest challenge was getting ffmpeg to launch. I was able to stream mpeg videos without a problem, but for some reason I was unable to launch ffmpeg thru Galleon. I finally decided to download a new ffmpeg build and scripted ffmpeg.path=C:\programfiles\ffmpeg\ffmpeg.exe (in my case) under the .ini folder. All is good now!
     
  10. Jan 29, 2009 #270 of 3405
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Do you get thumbnails when FF'ing? I just noticed I get a gray screen with just the timecode in it so I'm wondering if my instructions are still lacking.
     
  11. Jan 29, 2009 #271 of 3405
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    should be able to get around that by setting

    LD_LIBRARY_PATH=/usr/local/lib

    (or wherever you have ffmpeg's libs) in the environment...

    (I think if you set -Djava.lib when launching java it still wont work since there are interdependencies that the ld.so will not find).
     
  12. Jan 29, 2009 #272 of 3405
    ajayabb

    ajayabb Member

    429
    0
    Jan 11, 2007
    Moorestown NJ
    Nope No Thumbnails for me either
     
  13. Jan 30, 2009 #273 of 3405
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    That didn't seem to work either. Not a big deal for me personally, but I should probably figure out why it's not working.
     
  14. Jan 30, 2009 #274 of 3405
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    I'm curious. Do you have ffmpeg built statically or using shared libs? And if using shared libs where are they stored?
    if my memory of linux is still working, I believe you can check that by typing
    Code:
     ldd <path to ffmpeg>
    Go into the streambaby directory, edit simplelog.properties, and replace the words 'Warn' with 'debug'. It should at least try and give you some more useful info...

    (you need the shared libs to be loaded by streambaby for the preview icons to work immediately.. otherwise it will rely on ffmpeg to generate preview images, which can take a while -- and until that's done you will see the gray box with the clock).
     
  15. Jan 30, 2009 #275 of 3405
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    I did try to work-around the need for this, and I think at least in Linux the work around works(?). I load the ffmpeg libraries in the order libavutil, libavcodec, and then libavformat. By loading them in this order from specific locations, I think (hope?) that the correct versions will always get loaded. util has no dependencies, codec depends only on util, and format depends on util and codec. By manually loading in a specific order, by the time ld.so was looking for the inter-dependency, it would already have loaded the library it was looking for(?) from the correct location.

    This seemed (at the time I was playing with it) to work for me.

    But people who are having problems, please do try the LD_LIBRARY_PATH approach and see if it works.
     
  16. Jan 30, 2009 #276 of 3405
    Sicklybutsexy

    Sicklybutsexy New Member

    179
    0
    May 5, 2007
    I have an mpeg that won't stream over unless ffmpeg is working (which means it is transcoding it when it shouldn't be). I confirmed this by deleting ffmpeg after noting that it was running while I was transferring. In pyTivo it does not transcode the file but "streams" it over. Any ideas:

    Format : MPEG-PS
    FileSize/String : 3.99 GiB
    Duration/String : 1h 15mn
    OverallBitRate/String : 7 585 Kbps

    Video
    ID/String : 224 (0xE0)
    Format : MPEG Video
    Format_Version : Version 2
    Format_Profile : Main@High-1440
    Format_Settings_Matrix/String : Default
    Duration/String : 1h 15mn
    BitRate_Mode/String : Variable
    BitRate/String : 6 610 Kbps
    BitRate_Nominal/String : 9 000 Kbps
    Width/String : 1 280 pixels
    Height/String : 688 pixels
    DisplayAspectRatio/String : 16/9
    FrameRate/String : 25.000 fps
    Colorimetry : 4:2:0
    ScanType/String : Progressive
    Bits-(Pixel*Frame) : 0.300

    Audio
    ID/String : 128 (0x80)
    Format : AC-3
    Format/Info : Audio Coding 3
    Duration/String : 1h 15mn
    BitRate_Mode/String : Constant
    BitRate/String : 448 Kbps
    Channel(s)/String : 6 channels
    ChannelPositions : Front: L C R, Surround: L R, LFE
    SamplingRate/String : 48.0 KHz

    Menu
    Format : DVD-Video
     
  17. Jan 30, 2009 #277 of 3405
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    Is it possible to post the output of:
    ffmpeg -i myfile.mpg

    For the problematic file. My guess is that for some reason I'm not parsing the output of ffmpeg correctly for this file

    And just so I don't have to bother you again if this doesn't give enough information, if you edit simplelog.properties and change the first line to:
    com.unwiredappeal=debug

    And then rerun streambaby and try to play the problematic file. The open streambaby.log and look for the the following section:
    ...
    ...
    FFmpegXXXXVideoModule: VideoInfo:
    uri: file:/home/keary/videos/hb2.m4v, Container: mp4, Duration: 1641.606 seconds
    Video: h264 640x480 29.97002997002997 fps
    PixAspect: 1.0, Aspect: 1.3333334
    Audio: ac3 48000HZ 2 channels

    where uri is your file, and post that also. (XXXX might be Exe or Java depending on your setup)

    Thanks
     
  18. Jan 30, 2009 #278 of 3405
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    I do think I made it better (nxt version) with the files you provided me (thanks). I made the mp4 code do less processing if the start position is 0. (and the problems seemed to all related seeking anywhere near the beginning of the file). I don't get the green/blocky-ness most of the time, but occasionally (1 in 5/10?) I still get it.
     
  19. Jan 30, 2009 #279 of 3405
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Oh, since I'm not sure if you're keeping up with the pyTivoX threads, I'll mention it here. I was using the latest streambaby (via svn) and people were complaining that after 5 minutes their stream was dropped (always.. even live playing ones -- not just paused). I assume you're aware / working on a fix? Can you mention when you check in a fix?

    Thanks!! :)
     
  20. Jan 30, 2009 #280 of 3405
    Sicklybutsexy

    Sicklybutsexy New Member

    179
    0
    May 5, 2007
    here is what the log shows, thanks:

    01/30/09 13:07:00 FFmpegExeVideoModule: FFmpegCmd: C:\Users\jay\Downloads\streambaby-0.19a\streambaby-0.19a\native\ffmpeg.exe -i C:\Users\jay\Videos\HD Movies\itsanmp4.mpg
    01/30/09 13:07:01 FFmpegExeVideoModule: VideoInfo:
    uri: file:/C:/Users/jay/Videos/HD%20Movies/itsanmp4.mpg, Container: mpeg, Duration: 4513.82 seconds
    Video: mp2v 1280x688 0.0 fps
    PixAspect: 0.95555556, Aspect: 1.7777778
    Audio: ac3 48000HZ 0 channels
    01/30/09 13:07:01 HostContext: key=mpos:file:/C:/Users/jay/Videos/HD%20Movies/itsanmp4.mpg applicationId=com.unwiredappeal.tivo.streambaby.StreamBabyStream applicationGlobal=false
     

Share This Page