# Today's HME discoveries: Back Button, Quick Mode, etc.



## davidblackledge (Sep 9, 2008)

Playing around with a "recreate the TiVo UI" HME app because my wife hates the Guide (and emboldened by a recent post by somebody else who wants the guide improved).

First, a little while back I was messing with Network Remote UI... ran it against my keycode-exposing HME app and found that a lot of mystery keys are available in V49 as rawcodes. This includes the Back button.
So I can catch somebody pressing the Back button if I run as a V49 app, then when I see a keypress with code of 0, I just check for a rawcode of -7680
Others available that way include CC_ON, TUNER_SWITCH (which isn't available through anything currently), ASPECT_ codes, VIDEO_MODE_ codes, etc. I think you can get anything that doesn't teleport you out of HME.

Second, since I'm messing with LiveTV I noticed QuickMode is available on my mini when watching LiveTV, too...so knowing that it's advertised as 20% faster, I tried setting my "livetv:" stream's speed to 1.2 and _voila_, quickmode with sound in HME. I haven't experimented with other speeds that might be "alternate" quickmodes yet.
I also haven't experimented with using it on other video streams, but it seems likely it would work.

I have also noted that a rpc connection to a mini reports TunerState of the host DVR (and nothing explicitly identifies which tuner the Mini is using aside from the fact that it wouldn't be the foreground one... perhaps it's always the first background one?). However, Network Remote does report the correct channel in use by the Mini, so I'd just have to identify this is a mini, check the network remote status, and cross reference with the rpc tuner state.
I haven't yet figured out how I'd make channel changing work from a mini, though, since somebody reported that SETCH/FORCECH don't work against a mini (I want to experiment with explicit SETCH using a channel the host is already tuned to, other than that I don't know what to do).

*As far as I see, there is no RPC command equivalent to SETCH and FORCECH. Do you agree?* It would be nice to not have to use Network Remote at all, except I'd probably still need it for Mini status.

Finally, I THINK I figured out how I could easily create a Youtube viewing app for HME. But I figured it out after the update that broke MP4. So if TiVo ever fixes MP4s, I'll try out my method and hopefully have Youtube working in EWz again.


----------



## davidblackledge (Sep 9, 2008)

davidblackledge said:


> I haven't experimented with other speeds that might be "alternate" quickmodes yet.


QuickMode with sound works with speeds up to and including 2.0! It's obvious why TiVo chose to only use 1.2, though.

As we know, 3.0 is FF speed one. Interestingly, it appears speeds above 2.0 are treated as though you requested 1.0 until you get to 3.0 for FF. (I only actually tried 2.1 and 2.5)

I did not check to see if speeds between SLOW (0.25, silent) and normal (1.0) haven any different behavior...and I don't plan to ;]


----------



## moyekj (Jan 24, 2006)

RPC channel changing:

```
request example:
{
   "type":"channelChange",
   "channelNumber":"1007",
}

response example:
{
   "channel": [{
      "logoIndex": 65554,
      "isDigital": false,
      "channelNumber": "1007",
      "isReceived": true,
      "isBlocked": false,
      "levelOfDetail": "low",
      "isHdtv": true,
      "isKidZone": false,
      "type": "channel",
      "callSign": "KABCDT",
      "isEntitled": true,
      "sourceType": "cable",
      "name": "KABCDT",
      "affiliate": "ABC Affiliate",
      "channelId": "tivo:ch.660602879",
      "stationId": "tivo:st.7515777"
   }],
   "type": "channelList",
   "IsFinal": true
}
```


----------



## moyekj (Jan 24, 2006)

RPC whatsOn query:

```
sample request:
{"type":"whatsOnSearch"}

sample response:
{
   "whatsOn": [{
      "channelIdentifier": {
         "sourceType": "cable",
         "channelNumber": "1011",
         "type": "channelIdentifier",
         "stationId": "tivo:st.7515778"
      },
      "contentId": "tivo:ct.364226537",
      "availableAudioStream": [
         {
            "language": "en",
            "type": "audioStream"
         },
         {
            "language": "es",
            "type": "audioStream"
         }
      ],
      "offerId": "tivo:of.ctd.7515778.1011.cable.2016-12-12-04-30-00.1800",
      "activeAudioStream": {
         "language": "en",
         "type": "audioStream"
      },
      "type": "whatsOn",
      "collectionId": "tivo:cl.337203192",
      "playbackType": "liveCache"
   }],
   "type": "whatsOnList",
   "IsFinal": true
}
```


----------



## davidblackledge (Sep 9, 2008)

davidblackledge said:


> Playing around with a "recreate the TiVo UI" HME app because my wife hates the Guide (and emboldened by a recent post by somebody else who wants the guide improved).


FYI, I guess I'm going to *give up *on this. While most all of this is feasible with RPC, I believe I've hit a deal-breaker:

My wife loves to watch Live TV with captions on.

I only see 4 options, and none of them appear possible:
1) Get the TiVo to display captions - this is a feature of their own device displaying content over the liveTV stream, not as a re-encoded stream.
2) Get the TiVo provide me captions that I can display. I don't know of any way to do this. The closest I know of is to download a recording and extract captions from that recording (not an option for Live TV). If I could get a CC state event (like tuner state) from RPC that would do it, but I doubt that exists.
3) Get the captions from a 3rd party - not really feasible for so many reasons and would work on only a small subset of shows anyhow.
4) Require users to turn on caption display on their TV. That seems like a vague possibility, but it turns out HDMI does not transmit CC signals. This might work if with coax or other connections, but that's not very practical or compatible.

Technically #4 is still feasible because my wife uses the Premiere and an HD TV that both have Coax connections. I haven't yet experimented whether displaying "livetv:" in HME under those circumstances transmits CC info (but as I recall before HDMI I used to have to make sure I didn't have both TV and TiVo captions turned on or it was a mess).

So...*unless somebody knows more about #2*, I might stop messing with this, but if I get a second wind, I'll pursue #4 over coax.


----------



## davidblackledge (Sep 9, 2008)

davidblackledge said:


> My wife loves to watch Live TV with captions on.
> 
> 4) Require users to turn on caption display on their TV. That seems like a vague possibility, but it turns out HDMI does not transmit CC signals. This might work if with coax or other connections, but that's not very practical or compatible.
> 
> Technically #4 is still feasible because my wife uses the Premiere and an HD TV that both have Coax connections. I haven't yet experimented whether displaying "livetv:" in HME under those circumstances transmits CC info (but as I recall before HDMI I used to have to make sure I didn't have both TV and TiVo captions turned on or it was a mess).


Ok, apparently that second coax on my Premiere was a 2nd input (one for cable, one for antenna), not an output.

The way to get a *CC signal to the TV is through the Composite output* (yellow/white/red). It also works streaming "livetv:" in an HME app, but it also forces my HD display downgraded to SD. It also transmits no matter what while showing LiveTV (so I couldn't turn off captions while in Picture-in-Picture mode). SD downgrade still looks decent on my HD TV (it fills the entire width, for instance), but there are clearly issues, especially on HME apps with small fonts.

So... Not a complete stoppage to the idea, but not a pleasant option, either.

I'm still left with #2 as a possibility. 
If exists such an *RPC event notification with caption information*, I'd love to hear about it. Even if I have to do like the iPad app and require the user to start a recording for it to work.


----------



## cenright (Feb 11, 2007)

davidblackledge said:


> QuickMode with sound works with speeds up to and including 2.0! It's obvious why TiVo chose to only use 1.2, though.
> 
> As we know, 3.0 is FF speed one. Interestingly, it appears speeds above 2.0 are treated as though you requested 1.0 until you get to 3.0 for FF. (I only actually tried 2.1 and 2.5)
> 
> I did not check to see if speeds between SLOW (0.25, silent) and normal (1.0) haven any different behavior...and I don't plan to ;]


Wow, does this actually work when watching the video on the tivo via hdmi or is this via some other method? If on the tivo hdmi, can you share a way to set the speed? I miss 1.5 from my media center....


----------



## davidblackledge (Sep 9, 2008)

Well, there is no service currently available to use it.

Since TiVo doesn't make it available themselves, the only way I know of to do it is with an HME App that one of us could make available under "Apps & Games" if you set it up. It would display the "livetv:" media stream.

That would mean instead of pressing the Live TV button, you'd have to go into "Apps & Games" and select something there to watch Live TV, then press whatever buttons we set up to set your QuickMode speed. Then you could watch Live TV at arbitrary speeds between 1.0 and 2.0, not just TiVo's provided normal (1.0) and QuickMode (1.2).

It would theoretically work when playing back recordings, too, however none of us have figured out how to use the "recording:" media stream that surely is the way to do this.
*
So... if it's really of value to you (given the effort to access it, and the fact that it'll only work on live TV, not recordings) somebody (probably me) could set up an app to access it. *

The stuff I've been talking about in this thread is to set up such an app (that also would work for changing channels, and someday for doing a custom version of the guide). It is a long way from working yet, would take a LOT of work to get working NICELY, and would still require you to download a copy, run it on your computer, then go to Apps & Games to use it. (and it will never properly support Closed Captioning)

Minimally, I'll probably add QuickMode to my main video viewer I include at EnterWebz.tv, and might add a way to choose a speed, but it is not possible add features like channel changing from an Internet app like that. Only apps running on your home computer can do that.


----------



## moyekj (Jan 24, 2006)

It's rather trivial to set arbitrary play speed using RPC instead of HME, which should also work for live buffer or prior recordings.


----------



## davidblackledge (Sep 9, 2008)

moyekj said:


> It's rather trivial to set arbitrary play speed using RPC instead of HME, which should also work for live buffer or prior recordings.


Oh, wow, great! I see nothing about setting speed in any rpc notes I know about. Closest I see is videoPlaybackPositionSet.
I guess I don't know how to look up this stuff. The best I have is the "TiVo MindRPC Community Documentation" google doc.

So cenright, that means e.g. moyekj's kmttg remote control could have an arbitrary speed quickmode button added.


----------



## cenright (Feb 11, 2007)

Sorry davidblackledge, I was really just wanting to know the how for my own selfish reasons / not wanting to put you out. Also not trying to hijack your thread.

moyekj - do we have an example of using RPC to set the play speed?

I was looking through your source kmttg / Code / [r4193] /trunk/src/com/tivo/kmttg/rpc/Remote.java

but didn't notice anything.

looking through arantius doc TiVo MindRPC Community Documentation

didn't help me either.


----------



## moyekj (Jan 24, 2006)

Sorry cenright, I was wrong. I assumed because "videoPlaybackInfoEventRegister" is able to retrieve the speed that uiNavigate would have a speed parameter for playing a recording, but doesn't look like it does. Sorry for false alarm...


----------



## cenright (Feb 11, 2007)

Thanks for at least looking moyekj, I was excited enough to read through most of the "discovery" thread and get the arantius python script ready to test out the feature. It will at least keep my inner geek going for a bit.


----------



## davidblackledge (Sep 9, 2008)

davidblackledge said:


> Since TiVo doesn't make it available themselves, the only way I know of to do it is with an HME App that one of us could make available under "Apps & Games" if you set it up. It would display the "livetv:" media stream.
> 
> It would theoretically work when playing back recordings, too, however none of us have figured out how to use the "recording:" media stream that surely is the way to do this.
> *
> So... if it's really of value to you (given the effort to access it, and the fact that it'll only work on live TV, not recordings) somebody (probably me) could set up an app to access it. *


A couple of minor follow-ups: 
Whenever I get around to doing another EnterWebz.tv release (probably soon - had to fix a bug in Radio Auricle for zip codes that start with 0), it will now have *QuickMode with 3 speeds:* 120% (normal quick mode), 150%, and 200%. This will work on EWz pages and displaying LiveTV in EWz as well as on videos played with Archive On Demand (I tested AOD today by watching the "Night of the Living Dead" MPEG2 (since mp4 is broken) at 200%).

While I was at it, I tested a theory about "recording:" but it failed. I started playing a recording, then went to main menu (the recording is still PIP) and started an app that displayed "recording:" as its stream URL. It just reported "Resource Not Available" like usual.

I'll probably include an "app link" of *LiveTV-with-my-video-player *somewhere, so if you really want to watch liveTV at 200%, you can just move that thumztak up to the top level for "easy" access.

Oh... and just a data point on that recent horrid TiVo update. Yes, MP4 is broken on everything, but specifically I find that MP3's are broken on Roamio and Mini devices, but Premiere can still play MP3 just fine.


----------

