Video Streaming

TiVoCommunity thread on this subject

First, use the latest SDK and V49 classes to make life easier.

Series 3 and later can do video streaming as a resource.

Video media type has to be reported as video/mpeg or video/mp4 or similar. It works very similar to processing an MP3 file.
However, Video Streaming allocates a limited size buffer (1.1GB?) and stops working after that point. (there is no 1.1GB limit, it ends up)
Java SDK Factory.getStream, if overridden as a streaming source, needs to properly respond to "available" or the Stream will stop at 1.1GB. This is what the class URLStream buys you.

Resource Info

Video streams have some different state information from other streams. See the V49 classes for more information.

In addition, many video streams will report the audio track they are playing and available audio tracks (up to 3, apparently). This implies HME supports an (unimplemented in the SDK) command of "setAudioTrack" similar to "setSpeed" or "setPosition."

com.tivo.core.ds.MapThreadWrapper@42041664{duration=150000, audiotrack= unknown, pos=0/150000, audiotracks= unknown,, start=0, position=0, speed=1, span=0/150}
com.tivo.core.ds.MapThreadWrapper@1493570060{duration=8508, audiotrack= dolbyDigital, pos=0/8508, audiotracks= dolbyDigital,, start=0, position=0, speed=1, span=0/8}

IHMEProtocol.CMD_RSRC_SET_POSITION etc. use ids 40-46 (except 43) there must be one for setAudiotrack(string?)

Scaling

A Video resource CAN be scaled down in a view, but it ignores the scale and position if it the X scale is 1.0, so it must be scaled down in order to position. The scale can be stretched, too, but again that only works if the x scale is at most 0.9999 or so.
It also will not clip off the side of the screen. If slid beyond the edge of the screen, the video won't move any further even though the view keeps moving (and begins clipping the video as it slides off, unless there are no other resources to show in place of the clip)

The video stream uses the TiVo DVR's current "zoom" mode for non-HD content that is full screen. No known way to change that from within HME. However a scaled video stream always fills the view with the content (so a vertical iPhone video is massively stretched). You can/have to do your own aspect correction with stretched scaling (if you know the original's aspect ratio to calculate what, if any, correction to make).

Special Sources

In addition, (discovered from the Simulator's source code) special video sources exist as early as Series 2. These are livetv:, loopset:, and recording:.

  • livetv: is the entire "URL" and shows the current live tv tuner. No known way to change tuners or channels from within HME, and it takes you to the END of the 30 minute buffer regardless of where the user was. No known way to "ask" where the user was, but you can set the position same as any other stream.
  • loopset: is the looping video background used in the SD TiVo menus on series 3 and earlier (they are just a static image on Series 4 and above)
    • "loopset:Central" - Red loopset (TiVo Central)
    • "loopset:Showcases" - Purple loopset (Showcases, Suggestions)
    • "loopset:Setup" - Blue loopset (Messages & Settings, Music Photos & More, Network Now Playing Lists)
    • "loopset:NowPlaying" - Green loopset (Now Playing, everything else not mentioned above)
  • recording: is obviously access to recordings…but the secret to making it work has yet to be figured out

They actually use the video resource, so you can't use them in combination with a video stream (which is why Series 4 switched to an image for the loopset: values - so they could have PIP live TV with no worries)

Player

Finally, Video is best supported with TiVo's own video player HME app. It includes a trickplay bar implementation and other standard features (but no 30 second skip).
Launch it as a transition or as an App-as-Stream with arguments, similarly for the Youtube app. tivocommunity thread... approximately 1/1/2013

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License