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. Feb 11, 2009 #421 of 3405
    rfryar

    rfryar My Media, My Way

    222
    0
    Feb 15, 2008
    Cottage...
    In the meta section I would put something like this:
    Code:
      <xsl:choose>
          <xsl:when test="@isEpisode">
            <xsl:choose>
              <xsl:when test="@seriesTitle and @episodeTitle">
                <xsl:value-of select="@seriesTitle"/>-<xsl:value-of select="@episodeTitle"/>
              </xsl:when>
              <xsl:when test="@episodeTitle">
                <xsl:value-of select="@episodeTitle"/>
              </xsl:when>
              <xsl:when test="@seriesTitle">
                <xsl:value-of select="@seriesTitle"/>
              </xsl:when>
              <xsl:when test="@title">
                <xsl:value-of select="@title"/>
              </xsl:when>
              <xsl:otherwise>
                Default Title Here??
              </xsl:otherwise>
            </xsl:choose>
          </xsl:when>
          <xsl:when test="@title">
            <xsl:value-of select="@title"/>
          </xsl:when>
          <xsl:otherwise>
            Default Title Here??
          </xsl:otherwise>
          <xsl:text>&#xD;&#xA;</xsl:text>
      </xsl:choose>
    
    That flow does mostly what you commented on.

    Rick
     
  2. Feb 11, 2009 #422 of 3405
    jmemmott

    jmemmott New Member

    393
    0
    Jul 12, 2003
    Santa Cruz, CA

    I want to thank both of you for doing this. I downloaded the 0.22 beta when it was put up and have been playing with the captioning since. You are right that it works surprisingly well - much better than I had anticipated. Good work on your part!

    I am in the process of making changes to the t2sami desktop to simplify user workflow to support this. So far I have used DVDs and mpegs as source and H.264 and mpegs as output. These permutations are now working well in my development version as are .tivo files that t2sami downloads and processes directly. I have a few permutations to go : unprocessed .tivo and .mkv input files and SD/HD output. When I am satisfied with the new code, I will put out another t2sami build.

    In the meantime, if you are having problems with the captions generated by specific video clips, contact me. I will likely need a short piece of the video around the trouble spot to locate the specific cause but I am interested in cleaning up any problems that are occuring.
     
  3. Feb 11, 2009 #423 of 3405
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    Thanks very much for you work on t2sami, I'm still impressed how quickly it works. While trying to generate captions from different sources (.TiVo and .mpg) for testing purposes I did have some trouble with some files. I can remember one clearly was a DVD rip of one of Star Wars episodes where for some reason the .srt file generated had some garbage towards the front and then off sync for the rest. I also ran into at least one .TiVo file that has proper captions but could not get a good .srt file out of it. I'll have to see if I can dig out those cases and make short clips out of them to send you.
    I did hesitate to try generating .srt files from mpeg2 files that I had done editing on to remove commercials, as I'm not sure how well VideoRedo and/or Womble mpeg video Wizard are at preserving proper caption data when editing files. If you happen to know about that your opinion is appreciated.
     
  4. Feb 11, 2009 #424 of 3405
    jmemmott

    jmemmott New Member

    393
    0
    Jul 12, 2003
    Santa Cruz, CA
    I have not used Womble so I can't comment on it but I use VideoReDo for all of my own Tivo editing. I have also had occasion to help them with captioning problems so I know that not only does it does work well but they are also committed to seeing that it continues to do so. The only issue is that the captions are offset from the a/v because they have to arrive early to be composed into displayable text that is kept in sync. Near a cut point, you can therefore gain or loose a few characters or control commands you don't expect.

    The underlying problem with the captions is that no one looks at the stream except the captioning hardware and it is very good at cleaning everything up before it is displayed. As a result there is no incentive for the broadcast stations or studios to to clean anything up and garbage gets left in the stream from one edit to the next. Couple this with the tendancy of analog broadcasts to loose or scramble part of the data and strange things happen. That is why I usually need clips - accurate error recovery is the principal issue.
     
  5. Feb 11, 2009 #425 of 3405
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    OK thanks jmemmott. One last question if you don't mind (please excuse my ignorance about captions in general). With current method we are using there is no caption position information in the generated .srt file and therefore no choice but to display captions at a fixed screen position. When viewing captions normally via Tivo I've seen captions change positions so as not to interfere with other critical viewing data. So any reason not to extract position information with t2sami? (maybe there already is a way and if so forgive my ignorance).
     
  6. Feb 11, 2009 #426 of 3405
    jmemmott

    jmemmott New Member

    393
    0
    Jul 12, 2003
    Santa Cruz, CA
    It harkens back to the origins of these file formats. Closed captioning has always carried positioning information. This is not so much to get it out of the way but to get it near a point of reference : the captions for a specific speaker can be positioned near the speaker to make viewing a little easier. This does require an editor to position it near the speaker but not on top of anything important on a scene by scene basis. Since the television resolution was fixed and low resolution a 16 row x 32 column igrid could be used to locate the lower left corner of the caption for this process. Closed caption file formats that capture this information do exist but they are typically binary files used only by CC editing programs.

    Subtitles were added to movies as an after thought and on DVDs are seperate video tracks. Typically they are shown at the bottom or below the movie. Early programs for converting them such as SubRip (.srt) were OCR programs that worked against just the subtitle tracks and therefore had no positioning information to work with. As a result even when positioning attributes are included as part of the file format, they have never been widely supported.

    Newer file formats that have arisen from computer video such as substation alpha (ssa/ass) and timed text (ttxt ) do have positioning information but because they must work across a range of resolutions 320x240 ==> 1920x1080 they get a little complicated to use, especially if you want to run the video through ffmpeg to change resolution on the fly.

    So - it can be done but it would take some standards work up front to get a meaningful set of coordinates first. I hadn't pursued it earlier because there was no way to use this information except in the form of embedded closed captions which I already preserved.
     
  7. Feb 11, 2009 #427 of 3405
    Sicklybutsexy

    Sicklybutsexy New Member

    179
    0
    May 5, 2007
    the captioning works very well in my testing so far. I had two mkv files mpeg4/iso/avc that worked well with the .srt files. Great work!
     
  8. Feb 11, 2009 #428 of 3405
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Here's what I see in streambaby.log when I turned on Verbose:
    Code:
    02/12/09 02:50:57 VideoModuleHelper: GetVidInfo: file:/mnt/media/Video/Movies/Pans%20Labyrinth.avi
    02/12/09 02:50:58 FFmpegJavaVideoModule: vidDur:7132132
    02/12/09 02:50:58 FFmpegJavaVideoModule: VideoInfo:
    uri: file:/mnt/media/Video/Movies/Pans%20Labyrinth.avi, Container: avi, Duration: 7132.132 seconds
    Video: UNK 528x288 23.976 fps
      PixAspect: 1.0, Aspect: 1.8333334
    Audio: mp3 48000HZ 2 channels
    
    It can't be the UNK on the video line because I see that for other videos that work fine. :confused:

    Could be related to my recent re-build of ffmpeg, I suppose ...
     
  9. Feb 11, 2009 #429 of 3405
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    Thanks Rick. I haven't had a chance to put it into the stylesheets, but this looks perfect, and I'll put it in shortly.
     
  10. Feb 12, 2009 #430 of 3405
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    Just put up new version, 0.23beta:
    http://code.google.com/p/streambaby/

    This is mainly a release to fix a couple of bugs:
    -- Should fix issue some people (windracer for one) are having with MP4 metadata parsing
    -- Should fix occasional issues with crashing while determining video information

    Also implements rfryars XSLT changes to parse pytivo title information, so episodic shows should have the correct title.
     
  11. Feb 13, 2009 #431 of 3405
    jannlinder

    jannlinder New Member

    106
    0
    Oct 17, 2004
    San Jose, CA
    Thx for the PyTivo fixes (regarding episodic TV...)

    But one tiny little tiny bitty thing...

    The "title" still shows up in the folder listing for the program. Anyway to put the same xsl fix in the listing for individual files so that the title does not show but the "title - episode name" shows?

    TIA

    J
     
  12. Feb 13, 2009 #432 of 3405
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    That should be fixed in this version as well (hopefully). The old name is probably just cached-- Try deleting cache/meta.cache and then restarting streambaby.
     
  13. Feb 13, 2009 #433 of 3405
    jannlinder

    jannlinder New Member

    106
    0
    Oct 17, 2004
    San Jose, CA

    er, I did. In addition i hit ENTER on the screen showing the filenames and it said "One moment please" and came up with the title again.

    ps: I just updated the xsl files. Did i need to update to .23 to get the actual fix? The xsl files fixed the description screen so it shows the episode names.
     
  14. Feb 13, 2009 #434 of 3405
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    Thanks Keary, that fix appears to have solved the hanging issue I was having with MP4 parsing, so I no longer have to set meta.mp4.disable=true

    However now if I hit "Enter" in file browser node in one of my folders the application crashes (appears to be on one of the .mp4 files). Here's the relevant debug log section right before crash:
    Code:
    02/12/09 21:42:49 FFmpegJavaVideoModule: vidDur:8303872
    02/12/09 21:42:49 FFmpegJavaVideoModule: VideoInfo:
    uri: file:/c:/home/dvd/testing/star_wars2.mp4, Container: mp4, Duration: 8303.872 seconds
    Video: h264 720x480 29.97 fps
      PixAspect: 1.0, Aspect: 1.5
    Audio: ac3 48000HZ 2 channels
    02/12/09 21:42:49 Listener:
    02/12/09 21:42:49 Listener: connection to receiver closed
    02/12/09 21:42:49 Listener:
    02/12/09 21:42:49 Factory: HME receiver disconnected
    02/12/09 21:42:49 Listener:
    02/12/09 21:42:49 Listener: Unexpected error: java.lang.NegativeArraySizeException
    
    No big deal BTW, just thought I would report it.
    P.S. As expected, if I set meta.mp4.disable=true then it no longer crashes so it's pretty clear the mp4 metadata parsing is where the issue is.
     
  15. Feb 13, 2009 #435 of 3405
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    I forgot to comment on this before. I'll definitely think about adding the 384k to the sameq args.

    First, changing quality.highres without changing quality.highestvbr to something higher than the default (which is 5000 by default) is probably problematic also, as ffmpeg will start to complain if the resoultion is too high and the bitrate too low.

    But I am assuming you want the VBR increased by default as well. I guess my initial thoughts were if you want high quality, use "Same". If you are using the other quality settings, you are always reducing the quality, so the highest settings shouldn't be that high.

    I guess I prefer to have a lower "highest" setting so that I can have more granularity in the bitrates. By setting it higher, each step (highest/high/medium-high,etc..) gets bigger. I may not be a good example of how most people are using streambaby, but I often am accessing it over-the-internet, so I like to have control so I can keep stepping down the bitrate until I find the highest bitrate that works without pausing.

    Keary
     
  16. Feb 13, 2009 #436 of 3405
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    Yes, you need to update. The XSL only affects what is displayed on the play screens. The title on the selection screen is actually generated inside the code itself. (I'll probably end up changing this at some point so it grabs the title from the XSL, but haven't gotten around to it yet)

    And I also just checked the code, and after you update to 0.23 just pressing ENTER should update the cache with the new titles, with no need to delete meta.cache (At least that's what it looks like from reading the code, but if it doesn't seem to work please do delete the cache file and see what happens)
     
  17. Feb 13, 2009 #437 of 3405
    jannlinder

    jannlinder New Member

    106
    0
    Oct 17, 2004
    San Jose, CA

    Okay, I will have to wait until Yoav builds another beta of PyTivoX then.

    (I haven't asked Yoav if i can simply replace the streambaby dir inside the package with the newer streambaby dir that you package up and have it work)

    Thx for the hard work -- we all appreciate it.

    Becoming VERY spouse - friendly now. My husband is actually actively using it to watch American Idol back to back.. :) I know ... a grown man of 45-ish watching Idol. Stinks since I can hear it too when he watches it! :(
     
  18. Feb 13, 2009 #438 of 3405
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Quick answer: Yes you can manually replace it in the package and things *should* work (I can't speak for the future, but for this release, yes it will work).

    That said, I do have a build compiling right now.. so it should be up soon if you don't want to mess with the bundle, and it will include a newer ffmpeg/x264 (those guys are ALWAYS checking in changes... wow).
     
  19. Feb 13, 2009 #439 of 3405
    jannlinder

    jannlinder New Member

    106
    0
    Oct 17, 2004
    San Jose, CA
    Yoav, you and kearygriffin are great! Being a programmer myself it is nice to see you both watching the boards. I know it takes a lot of time to both program and answer people's questions!

    thx

    (anxiously awaiting b17)

    :)

    J
     
  20. Feb 13, 2009 #440 of 3405
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Your wait is over! :)

    (seriously though, keary's doing the actual work... I'm just compiling and bundling.. not really very hard to do :).
     

Share This Page