tivostream - video streaming server for Series 3 Tivos

Discussion in 'TiVo Home Media Features & TiVoToGo' started by moyekj, Aug 22, 2008.

  1. moyekj

    moyekj Well-Known Member

    12,321
    958
    Jan 23, 2006
    Mission...

    Advertisements

    windracer, yes with these most recent versions tivostream will crash when config.ini file is not present in startup dir - something I will have to fix in next release. While doing so I will also have tivostream print out the current directory when starting to make it easier to identify.
     
  2. windracer

    windracer joined the 10k club

    12,320
    241
    Jan 3, 2003
    St. Pete, FL
    Ok, cool. So I just need to figure out what is considered the startup directory when it's running through Galleon. Strange that it wouldn't be the location of the jar file in this case. :confused:
     
  3. menos

    menos New Member

    60
    0
    Nov 13, 2007
    Moore, OK
    Has anybody had this crash your HD yet? I have a directory with about 25 .mp4 vids. After watching about 15 of them, I got an application error. It said something to the effect of 'out of memory'. The background of the Tivo was then set to the last frame of the last video that was successfully streamed. A few seconds later the Tivo stopped responding to remote commands and I had to pull the power to reset it.

    I didn't see anything specifically in the tivostream console regarding this error but here's the console output anyway.

    Code:
    C:\Program Files\tivostream>java -cp tivostream_v0p7.jar com.tivo.hme.host.sampl
    e.Main com.hme.tivo.videostream.videostream
    null null (null)
    LOG: added factory
    MDNS: http://192.168.1.75:4263/videostream/
    LOG: 192.168.1.50 icon.png HTTP GET - to factory /videostream/
    >> Reading config file: config.ini
    >>config: topdir=Baby Videos == C:\docs\My Videos\Girls MP4
    >>config: topdir=Movies == r:\tivo_movies
    >>config: extensions=.mpg .mpeg2 .mp2 .mp4 .mpeg4 .vob
    >>config: font=medium
    >>config: timeout_status_bar=5
    >>config: timeout_info=10
    >>config: skip_back=8
    >>config: skip_forwards=30
    >>config: slow_speed=0.125
    >> Reading bookmarks file: bookmarks
    LOG: HME receiver connected
    LOG: unknown event opcode : 8
    LOG: 192.168.1.50 MVI_2007.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_2007.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1849.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1849.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1848.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1848.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1848.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1848.mp4
    LOG: 192.168.1.50 MVI_1848.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1848.mp4
    LOG: 192.168.1.50 MVI_1848.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1848.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1787.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1787.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1787.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1787.mp4
    LOG: 192.168.1.50 MVI_1787.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1787.mp4
    LOG: 192.168.1.50 MVI_1682.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1682.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1682.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1682.mp4
    LOG: 192.168.1.50 MVI_1682.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1682.mp4
    LOG: 192.168.1.50 MVI_1666.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1666.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1665.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1665.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1665.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1665.mp4
    LOG: 192.168.1.50 MVI_1665.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1665.mp4
    LOG: 192.168.1.50 MVI_1633.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1633.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1630.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1630.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1627.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1627.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1415.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1415.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1415.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1415.mp4
    LOG: 192.168.1.50 MVI_1415.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1415.mp4
    LOG: 192.168.1.50 MVI_1336.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1336.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1336.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1336.mp4
    LOG: 192.168.1.50 MVI_1336.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1336.mp4
    LOG: 192.168.1.50 systm--0063--dolby--hd.h264.mp4 HTTP GET - to factory /videost
    ream/
    url=file:/r:/tivo_movies/systm--0063--dolby--hd.h264.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 I/O Exception handling  HTTP GET systm--0063--dolby--hd.h264.m
    p4: Connection reset by peer: socket write error
    LOG: 192.168.1.50 MVI_1232.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1232.mp4
    ERROR code=4 Message: view -1 not found
    ERROR code=4 Message: view -1 not found
    LOG: 192.168.1.50 MVI_1232.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1232.mp4
    LOG: 192.168.1.50 MVI_1232.mp4 HTTP GET - to factory /videostream/
    url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1232.mp4
    LOG: connection to receiver closed
    LOG: HME receiver disconnected
    LOG: 192.168.1.50 icon.png HTTP GET - to factory /videostream/
    >> Reading config file: config.ini
    >>config: topdir=Baby Videos == C:\docs\My Videos\Girls MP4
    >>config: topdir=Movies == r:\tivo_movies
    >>config: extensions=.mpg .mpeg2 .mp2 .mp4 .mpeg4 .vob
    >>config: font=medium
    >>config: timeout_status_bar=5
    >>config: timeout_info=10
    >>config: skip_back=8
    >>config: skip_forwards=30
    >>config: slow_speed=0.125
    >> Reading bookmarks file: bookmarks
    LOG: HME receiver connected
    LOG: unknown event opcode : 8
    LOG: connection to receiver closed
    LOG: HME receiver disconnected
    LOG: 192.168.1.50 icon.png HTTP GET - to factory /videostream/
    
    So far I've been pretty impressed with this, and if all the bugs get ironed out, it may replace my pytivo usage.
     
  4. wmcbrine

    wmcbrine Well-Known Mumbler

    11,931
    958
    Aug 2, 2003
    The other day my TiVo spontaneously rebooted -- not while streaming, but when entering WordGrid, of all things. But for a while before that, I'd been using, not tivostream, but my own HME/VLC, and I figured that might be the problem. It motivated me to eliminate all the resource leaks. I haven't had a crash since then, but it hasn't been that long, and the crash was as likely to be due to the video streaming itself as due to leaking resources.

    Still, I noticed in the simulator that tivostream is leaking a lot of resources, too.
     
  5. moyekj

    moyekj Well-Known Member

    12,321
    958
    Jan 23, 2006
    Mission...

    Advertisements

    Yes I should look into that sometime soon...
     
  6. Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    I've been following the thread but it wasn't clear whether anyone ever got h264 video and AC3 5.1 audio in an mp4 container working with tivostream.

    Has anyone done it with Handbrake or something similar?
     
  7. moyekj

    moyekj Well-Known Member

    12,321
    958
    Jan 23, 2006
    Mission...
    I don't think AC3 audio is part of official mpeg4 container spec (at least ffmpeg doesn't allow it). I did try encoding a video using 6-channel AAC and that did play on the Tivo but I just use TV speakers (stereo) for sound so not sure what happens with surround sound systems. Would be an interesting experiment though if someone can find an encoder that does allow AC3 in mpeg4 container to see what happens on a Tivo.
     
  8. moyekj

    moyekj Well-Known Member

    12,321
    958
    Jan 23, 2006
    Mission...
    Well color me shocked. :eek: I did get mpeg4 container with H.264 video & AC3 audio working on a Tivo. Here's what I did:
    Handbrake
    XBOX 360 profile
    Encoder=H.264, Audio Encoder = AC3
    Start

    (NOTE: You can't check "HTTP Optimized MP4" option since that doesn't work)

    The resulting encoding doesn't play as is on Tivo. However, if you run the handbrake encoded file through the qt-faststart executable then it works!

    NOTE: I used 2 30 sec clips as sources for this testing (both originated from a Tivo S3):
    1. 480i mpeg2 video with 2-channel AC3 audio
    2. 720p mepg2 video with 6-channel AC3 audio
    In both cases handbrake just used passthrough for AC3 encoding.

    I've already done some code cleanup to fix crashing problem with no config.ini file present and to fix the resource leakages that wmcbrine pointed out. That combined with some documentation on H.264 encoding options that work with Tivo will make a good next release.
     
  9. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    54,518
    7,534
    Apr 17, 2000
    Nevada
    It's not, but the people in charge of the AC3 standard just released a new specification on Aug 22nd which outlines a standardized way to store AC3/EAC3 audio in an MP4 container. Based on what I've read the newest versions of Handbrake and FFMPEG can encode files using the standard, and both the AppleTV and v0.9.2 of VLC can play them. However with an official standard available I suspect a lot more companies will start to support this combination in the near future.

    Dan
     
  10. moyekj

    moyekj Well-Known Member

    12,321
    958
    Jan 23, 2006
    Mission...
    New version just released:

    v0p8 - September 16, 2008
    -------------------------
    * Added documentation sections on supported video types, the use
    of qt-faststart and encoding of H.264 with AC3 audio.
    * Added qt-faststart.exe and qt-faststart.c to distribution
    * Fixed crashing issue if starting tivostream with no config.ini file
    * Resource leaking issues cleaned up
     
  11. Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    Are you running on Windows? If so can you try using my custom ffmpeg for Windows build to see if it can handle putting AC3 audio into an mp4 container? The build (rdian06-0.95) is based on SVN 15216 with some minor tweaks to fix 5.1 channel mapping issues when transcoding DTS or AAC to AC3. It also is recent enough to have EAC3 (Dolby Digital Plus) and MLP (TrueHD) decoder support (useful for transcoding to AC3.)

    The builds are housed on the pyTivo forum here:

    http://pytivo.krkeegan.com/rdian06-s-ffmpeg-builds-t468.html

    Also, is qt-faststart something that is pipeable? Or does it need to sort the full file?

    I'm just trying to envision how we would integrate this into pyTivo if/when Tivo activates h264 for HMO.
     
  12. Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    Ah, ffmpeg as of SVN 15184 is supposed to have "ac3 muxing support in mov/mp4/m4v". So my Windows build should be able to do it.

    If you happen to have an mkv with h264 and AC3 (384kbps or less), you might be able to do:

    Code:
    ffmpeg -i my.mkv -vcodec copy -acodec copy new.mp4
    Probably still need to run it through qt-faststart to sort the atoms for streaming.
     
  13. moyekj

    moyekj Well-Known Member

    12,321
    958
    Jan 23, 2006
    Mission...
    You can look at the qt-faststart.c code now part of tivostream distribution. It's main function is to scan through the whole stream & look for an moov atom (which can be at the end of the stream) and then re-arrange it's location, so it won't help to pipe it to anything but the entire stream before presenting it to Tivo. i.e. you can't really use it during real time transcoding. However, if you already have a completed encoding and just want to pipe a stream with re-arranged atoms then this could work OK (just need to update the code to allow use of stdout & stdin). However it would probably mean a long delay doing that way (since it scans whole file before writing anything), especially for big streams, so not really practical.
     
  14. Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    That's unfortunate. I guess the only other alternative to combine h264 and AC3 would be an EVO or MPEG2 TS.
     
  15. moyekj

    moyekj Well-Known Member

    12,321
    958
    Jan 23, 2006
    Mission...
    Haven't explored it too much but it sure would be nice if Tivo could handle MPEG2 TS container playback via HMO/HME (for both mpeg2 & mpeg4 encodings). Obviously we know it can handle MPEG2 TS with native MPEG2 QAM/ATSC recordings.
     
  16. gilbreen

    gilbreen Member

    70
    0
    Sep 5, 2007
    I am transitioning from ReplayTVs to TivoHDs (I think I recognize moyekj from the RTV avs forum). Can tivostream work with ReplayTV mpeg files? I would love to be able to still use my DVArchive library that I have accumulated over the years.

    Look forward to installing tivostream once I get a Windows box up and running.

    Thanks.
     
  17. moyekj

    moyekj Well-Known Member

    12,321
    958
    Jan 23, 2006
    Mission...
    Yup that's me from the RTV forums (the good 'ole days of auto commercial skip). Last time I tried medium quality ReplayTV 55xx files they did play and pause OK on my Tivo S3, however other trick functions (FF/REW/SKIP) didn't work at all if I recall correctly. That was the behavior using TiVo To Come Back, but I would expect streaming to have same behavior.
    P.S. You don't need a Windows box to run tivostream - pretty much any computer that is networked and can run Java 1.5 or later will work.
     
  18. wmcbrine

    wmcbrine Well-Known Mumbler

    11,931
    958
    Aug 2, 2003
    I see this on MPEG1 muxed streams -- VCD files, or streams with mux=mpeg1 in VLC. It's the muxing rather than the video encoding that's key, which is why I use mux=ps in HME/VLC even with vcodec=mp1v (and even though mux=mpeg1 is recommended in the VLC manual). I'm guessing the Replay files could be remuxed without reencoding, and would become trick-playable.
     
  19. Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    There is also a qt-faststart.py python implementation. It was submitted to the ffmpeg developers for inclusion in ffmpeg's utils alongside the C code version of qt-faststart.

    You can grab it from this mailing list post:

    http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-September/052952.html
     
  20. moyekj

    moyekj Well-Known Member

    12,321
    958
    Jan 23, 2006
    Mission...
    Note that qt-faststart.c is a self-contained c program that doesn't need anything from ffmpeg, so you only need to compile qt-faststart.c by itself to generate an executable. It is also not an encoder but simply re-arranges contents of the input mp4 file if it deems necessary. For convenience I included the binary for windows with tivostream and the qt-faststart.c file for others running on different platforms.
     

Share This Page

spam firewall

Advertisements