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 27, 2009 #601 of 3410
    cahoon

    cahoon New Member

    19
    0
    Nov 1, 2007
    This is certainly an odd problem. If the saxon jar files are not on the classpath, then the JDK (1.5 and1.6) should default to using the internal version, which is Xalan. The way this is supposed to work is that the classloader looks for the first TransformerFactory implementation, and then use that. (This processed is changed slightly if the javax.xml.transform.TransformerFactory system property is set explicitly).

    It's not clear to me how it's deciding on using net.sf.saxon. One thing to try is to add -Djaxp.debug=true to the command-line. Or -verbose:class to see which classes are loaded.

    However, explicitly specifying the saxon library in the source, as you did, fixes the problem...
     
  2. Feb 27, 2009 #602 of 3410
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    I just took a quick look (because I wasn't sure how it was ever using the saxon libraries in the first place, I just know that XSLT 2.0 didn't work before I stuck in the saxon jar, and started (well, most of the time it seems) working afterwards.

    But taking a look at the docs again, for TransformerFactory.newInstance():
    * Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/javax.xml.transform.TransformerFactory in jars available to the runtime.

    And saxon9.jar contains such a file in it's META-INF directory, so my guess is that is why it works at all.

    And when the problem does arise, it seems it is looking for the saxon transformerfactoryImpl, but it can't seem to find it. Which is very strange, seeing as it wouldn't even be looking for it if it hadn't loaded the jar and saw the META-INF/services/javax..... file, and that jar contains the class it is looking for. (At least the preceding was true until we started playing around with instantiating the saxon classes manually)

    As I am previewing this post I noticed "services api, if available...", which may be some kind of clue, but again, if it wasn't available then it shouldn't even try to launch saxon, and default to the xalan(?) implementations. (Which would throw a different error, complaining about some XSLT elements in the stylesheets that Xalan doesn't support. I wish I could remember exactly what I couldn't get to work with Xalan. It may have been tokenize, which I think Xalan has an extension implementation for, but for some reason I couldn't get working...)

    So I guess I have a few choices
    1) If Yoav's patches to force saxon work, go with that.
    2) Try going back to the default XSLT processor (xalan?) and see what wasn't working, and try to fix it again. (or work around it)
    3) Figure out the root of the problem.

    #1 is probably the easiest if it works, and #2 has the added benefit of being able to remove a 5 megabyte lib from the distribution...
     
  3. Feb 27, 2009 #603 of 3410
    cahoon

    cahoon New Member

    19
    0
    Nov 1, 2007
    Exactly. This is the part that I think is odd. The JVM/classloader is able to open saxon9.jar to find the META-INF/services information. But, for some reason, the error occurs when trying to instantiate the net.sf.saxon.TransformerFactory class

    I see. Though, I am surprised it's all working since tokenize is an XPath 2.0 function, but the stylesheet specify 1.0. I guess Saxon isn't checking that? (In general, Saxon is a better XSLT processor, in my opinion. The Sun class library is distributed with Xalan and Xerces, which are Apache projects for XSLT and XML parsing).

    I agree - go with #1 if that continues to work. I'm sure there are more interesting things to work on.
     
  4. Feb 27, 2009 #604 of 3410
    conan76

    conan76 New Member

    15
    0
    Jul 17, 2008
    Adelaide, SA
    Thanks Kearygriffin. I just did some more testing (before reading your post) and you're spot on. I see you've uploaded a fix already :)

    BTW, Is there anyway to control the colour of sidebars when the picture doesn't fill the whole screen? They're coming up in a bright grey rather than black, whereas if played through TiVo Desktop it is black. Is this an option available in the ini file?
     
  5. Feb 27, 2009 #605 of 3410
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    Mine are black-- I'm pretty sure that's controlled by:
    Message & Settings/Settings/Video/Letterbox Color
    (It gives you two options, gray or black)
     
  6. Feb 27, 2009 #606 of 3410
    Sicklybutsexy

    Sicklybutsexy New Member

    179
    0
    May 5, 2007
    doesn't seem like streambaby can send over mp4 videos that are deinterlaced can it? From what I've tried it's only progressive that works?
     
  7. Feb 27, 2009 #607 of 3410
    conan76

    conan76 New Member

    15
    0
    Jul 17, 2008
    Adelaide, SA
    You're quite right kearygriffin! It was just in the tivo settings... surprised I haven't seen this before. Thanks.
     
  8. Feb 27, 2009 #608 of 3410
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    de-interlaced just means you took an interlaced movie and turned it into a progressive movie. So I'm not sure what you're asking. Streambaby gladly accepts interlaced and progressive formats.

    Is there a particular video that is failing to play for you?
     
  9. Feb 28, 2009 #609 of 3410
    Sicklybutsexy

    Sicklybutsexy New Member

    179
    0
    May 5, 2007
    sorry, meant interlaced not deinterlaced. I'm not sure, maybe its because the bitrate is too high, but if I convert it to progessive it seems to work.:

    General
    Complete name : H:\Home Movies\New Home Movies\20090222094827.track_4113-muxed.mp4
    Format : MPEG-4
    Format profile : Base Media
    Codec ID : isom
    File size : 234 MiB
    Duration : 3mn 59s
    Overall bit rate : 8 199 Kbps
    Encoded date : UTC 2009-02-27 04:44:47
    Tagged date : UTC 2009-02-27 04:44:47

    Video
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4.0
    Format settings, CABAC : Yes
    Format settings, ReFrames : 2 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 3mn 59s
    Bit rate mode : Variable
    Bit rate : 7 974 Kbps
    Maximum bit rate : 8 277 Kbps
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16/9
    Frame rate mode : Constant
    Frame rate : 29.970 fps
    Resolution : 24 bits
    Colorimetry : 4:2:0
    Scan type : Interlaced
    Scan order : Top Field First
    Bits/(Pixel*Frame) : 0.128
    Stream size : 227 MiB (97%)
    Encoded date : UTC 2009-02-27 04:44:47
    Tagged date : UTC 2009-02-27 04:44:57

    Audio
    Format : AC-3
    Format/Info : Audio Coding 3
    Codec ID : ac-3
    Duration : 1mn 59s
    Bit rate mode : Constant
    Bit rate : 448 Kbps
    Channel(s) : 6 channels
    Channel positions : Front: L C R, Surround: L R, LFE
    Sampling rate : 48.0 KHz
    Resolution : 16 bits
    Stream size : 6.39 MiB (3%)
    Encoded date : UTC 2009-02-27 04:44:54
    Tagged date : UTC 2009-02-27 04:44:57
     
  10. Feb 28, 2009 #610 of 3410
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    Interlaced mp4 is highly unusual - how are you creating those? Stick with progressive.
     
  11. Feb 28, 2009 #611 of 3410
    Sicklybutsexy

    Sicklybutsexy New Member

    179
    0
    May 5, 2007
    It's from a sony handicam that downloads to the computer as .m2ts. I then demux the video and remux as an mp4. Much quicker then converting but I guess I have to convert it to work? I'm not even sure, do you think its interlace that is the problem?
     
  12. Feb 28, 2009 #612 of 3410
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    I doubt it. How are you muxing?
     
  13. Feb 28, 2009 #613 of 3410
    Sicklybutsexy

    Sicklybutsexy New Member

    179
    0
    May 5, 2007
    I use tsmuxer gui to get the .h264 and ac3 file and then I remux into an mp4 using megui's mp4 muxer.
     
  14. Feb 28, 2009 #614 of 3410
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    I don't know a lot about this kind of subject (I was surprised just a couple of days ago to find out 60hz is a normal FPS for some HD content), but if you could post exactly what seems to happen it may help. (i.e. at exactly what point do you get a failure)

    It may help if you edit simplelog.properties and change the first line to read:
    com.unwiredappeal=Verbose

    and see if there are any error messages in streambaby.log

    Again, I have no idea whether or not interlaced MP4 should or should not work, as I have never tried it.
     
  15. Feb 28, 2009 #615 of 3410
    Sicklybutsexy

    Sicklybutsexy New Member

    179
    0
    May 5, 2007
    What happens is it sends it over but the audio is out of sync and the picture is moving in what seems to be slow motion. So the audio may be going at the correct rate while the picture is in slow motion. Will try like suggested above. thanks.
     
  16. Feb 28, 2009 #616 of 3410
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    If none of that works, AND don't feel like re-encoding the movies, try selecting a quality other than 'same' and see what happens. It's certainly possible that the tivo's mp4 abilities are limited in some yet-unknown-ways and your file is tickling it. I'd like to know if ffmpeg correctly converts it (which is what changing the quality will do).
     
  17. Feb 28, 2009 #617 of 3410
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    I'm jumping in way over my head here, but does anyone know if interlaced MP4's should have the frame rate set at 29.97 (as the info above shows) or 59.94? Google shows some discussions that say maybe it should be 59.94 (so I guess it would be a field rate, not frame rate in that case)

    It would make sense if what you are seeing is slow-mo (half rate)
     
  18. Feb 28, 2009 #618 of 3410
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    I couldn't find interlaced h.264 clips anywhere via Google. It may be helpful Sicklybutsexy if you could possibly upload a small clip somewhere for further examination.
     
  19. Feb 28, 2009 #619 of 3410
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    svn update yields:

    svn: Failed to add directory 'main/src/mp4/util/.svn': object of the same name already exists

    (I'm assuming that's from a mistaken addition of an .svn directory to the repository?)
     
  20. Mar 1, 2009 #620 of 3410
    moyekj

    moyekj Well-Known Member

    11,143
    32
    Jan 23, 2006
    Mission...
    I'm seeing the same error.
     

Share This Page