# More detailed HLS statistics



## moyekj

Testing Roamio Pro internal Stream in home downloads and collecting detailed statistics on the HLS downloads at different qualities:
(Statistics collected with a browser using http://<STREAMIP>:49152/sysinfo)
(CLIENTS button shows the # HLS segments, MAIN button shows system temperature)

STREAM VERSION: 19.1.6-USB-6 (build date = Feb 18 2014-11:01:05)
iOS App VERSION: 3.3
iOS device: iPad Air with iOS 7.1.1

*BASIC QUALITY --> iPad*
Show source: 60 min 1080i recording (5.54GB)
Output: 544x400 @ 800 Kbps
Transfer time: 16 mins = 3.35 Mbps (29 mins OOH = 1.85 Mbps)
File size = 402 MB
Total # HLS segments: 720
System Temp max reached during download: 67C

=>571 KB per segment (402MB*1024/720)
=> 5 seconds of video per segment

*MEDIUM QUALITY --> iPad*
Show source: 60 min 1080i recording (5.54GB)
Output: 960x540 @ 1.24 Mbps
Transfer time: 17 mins = 5 Mbps (46 mins OOH = 1.85 Mbps)
File size = 637 MB
Total # HLS segments: 1800
System Temp max reached during download: 67C

=>362 KB per segment (637MB*1024/1800)
=> 2 seconds of video per segment

*HIGH QUALITY --> iPad*
Show source: 60 min 1080i recording (5.54GB)
Output: 1280x720 @ 2.24 Mbps
Transfer time: 22 mins = 6.2 Mbps (73 mins OOH = 1.85 Mbps)
File size = 1024 MB
Total # HLS segments: 1800
System Temp max reached during download: 66C

=>582 KB per segment (1075MB*1024/1800)
=> 2 seconds of video per segment

NOTE: In home streaming encoding from Stream is equivalent to HIGH QUALITY download.

*OUT OF HOME (OOH) DOWNLOADS NOTE*
Out of home streaming currently uses a slow TiVo proxy server and seemingly no matter how good your ISP upload speeds are you will be limited by the proxy server to about 1.85 Mbps transfer speeds. That's why the OOH download times above are much worse that in home downloads.
If your router has "guest mode" wireless capabilities that is a good way to test OOH mode downloads through the Proxy without having to leave home since usually "guest mode" access is limited to WAN access only.


----------



## Dan203

2 second segments make sense for 8 second replay and 30 second skip to work. If the segments were 10 seconds long and you did an 8 second reply say 5 seconds into a 10 second segment it would have to either jump back only 5 seconds to the beginning of that segment or back 15 seconds to the beginning of the previous segment. Same applies to 30 second skip. With 2 second segments they can hit the exact time +/- 1 second.


----------



## moyekj

Good point about 8 second jump back - I never use that on the iOS App so forgot it was even there. Makes sense to be a multiple of both 8 and 30 seconds.


----------



## MikePA1

moyekj said:


> I was surprised to see the 2 seconds per segment number as I expected it to be higher (around 10 seconds or so).


Why?


----------



## moyekj

MikePA1 said:


> Why?


 Because the shorter the segments, the higher the number of references in the .m3u8 index file, which means higher overhead during playback. Plus most descriptions of HLS give 10 seconds as a typical segment length. In this case though the references are to local files on the iDevice instead of http references, so higher number of references is not really an issue because there should be very low latency in accessing the files. For WAN references likely the 2 second segments would present a problem.


----------



## moyekj

I updated stats with BASIC and HIGH downloads. I guess the theory of segment lengths evenly divisible into 8 and 30 seconds doesn't hold since BASIC is using 5 secs/segment.


----------



## Dan203

That's probably because of GOP length. To really compress H.264 you have to increase the GOP length, but with HLS each segment has to be a new GOP so that you can enter at any segment and start playing. This was likely a compromise. With 5 second segments they can still get close to both 8 and 30 seconds (+/- 2.5 seconds) while getting a higher level of compression.


----------



## srauly

Hey guys, just got pointed to this thread by moyekj. I'm an old-time TiVo user who is considering coming back to the fold. I've been using Windows Media Center for a while and have played around with Plex. With Plex Media Server running on my Windows 7 box (Intel i7) I can stream to my iOS devices and get amazing quality for my Blu-ray rips or recorded HD TV shows. Plex offers a wide range of PQ bitrate options, all the way up to 1920x1080 @ 20 Mbps, though I'm not sure if it runs reliably (e.g., no pauses) at that high of a quality.

I just tried one of Plex's 1280x720 @ 3 Mbps and 1024x768 @ 2 Mbps options, and both looked fine on my iPhone 5, but my iPad retina's battery is currently dead, so I can't test it out there. I also didn't bother testing using AirPlay to send those options to my Apple TV, since the TiVo app doesn't support that anyway, so no use comparing how good/bad that bitrate looks when blown up on a large display.

Anyway, if any of you have first-hand experience using the Plex mobile app or AirVideo (a similar server-side/iOS combo), I'd be very interested to hear how you think the PQ, smoothness, and overall experience (e.g., hopefully free of stuttering/pausing) of the TiVo iOS app compares to those other solutions.

In case you're wondering why I'm thinking of coming back to TiVo, there are a few reasons, but as it pertains to this particular discussion topic, while the Plex app offers great PQ and AirPlay support, it doesn't support live TV playback and the Plex Media Server (server-side component) doesn't natively support the Windows Media Center TV show metadata, so you pretty much have to let a show record completely, then wait for another script/app rename the files into a Plex-friendly format, and then wait for Plex Media Server to re-pull the metadata online, before you can watch anything.


----------



## moyekj

One thing to keep in mind is that using Stream is not the only way to get videos from TiVo onto your iDevice. There's the traditional TiVo To Go mechanism where for non copy-protected recordings on the TiVo you can download as recorded and then you can re-encode to play on an iDevice at whatever quality level you choose. The Stream is just a quicker, more convenient way to do things, but you are stuck with preset quality levels and inability to do any editing of the recorded video (like say to remove commercials).


----------



## moyekj

Post #1 in this thread updated with renewed information using latest version of Stream + iOS software. The striking difference compared to previous information is the download times were almost cut in half for all 3 different quality levels. Previously it took about 35 minutes each to download, now it's quite significantly faster.


----------



## moyekj

FYI, for OOH download mode I tried basic quality download of same show again a day later and got almost identical transfer time and hence OOH transfer rate of ~1.85 Mbps seems to be pretty consistent even when trying the next day. So it looks like TiVo Proxy server really is the limiting factor in OOH streaming and/or transfers.


----------



## Austin Bike

I find it interesting that the larger the file, the better the transfer times. I wonder what is driving that.


----------



## moyekj

Austin Bike said:


> I find it interesting that the larger the file, the better the transfer times. I wonder what is driving that.


 For in home downloads, yes. I think the limiting factor for those is the transcoding speed of the Stream, not the network speed. Higher quality encodes take a little more effort. i.e. It's the encoding effort that limits transfer speeds, not the number of bytes to transfer over.


----------



## Austin Bike

That seems backwards. The higher quality encodes actually shower faster transfer times. Could it be that the compression is the culprit and encoding to a lower quality requires more effort so it can't transfer as fast? If so then it makes more sense to me.


----------



## moyekj

Austin Bike said:


> That seems backwards. The higher quality encodes actually shower faster transfer times. Could it be that the compression is the culprit and encoding to a lower quality requires more effort so it can't transfer as fast? If so then it makes more sense to me.


 I don't see it as backwards. Just look at the total time it takes to transfer. The highest quality encode takes the longest because requires the most work by the transcoder. The higher transfer bit rate is merely because there are more bytes being generated per second to transfer for the higher encode. i.e. The bottleneck is not the # bytes, but the encoding effort.

Look at it this way. If the lowest quality encode had the same transfer rate as the highest (around 6 Mbps), then the total transfer time would be much, much quicker. But it's not possible for the transcoder to do the encoding that quickly, so it's the transcoder limiting the transfer rate, not a network bottleneck.


----------



## eboydog

With this being a fairly new product, its unfortunate that TiVo chose such a limiting hardware processor that has noticeable effect transcoding the streaming content. While I can understand a reason not to have an underutilized processor related to product cost. Such implies that any future improvements in preformance is rather limited unless there are features of the Broadcom processor not currently being utilized, at least what is being seen, preformance isn't being limited by data bandwidth unless there is something I'm not understanding.


----------



## moyekj

Transcoding to H.264 is a very CPU intensive procedure. Not too long ago it was almost impossible to do it in real time with an average computer. Even with a new top notch multi-threaded general purpose processor I think you would struggle to get it to encode a 1 hour HD show to a decent quality H.264 encoding in about 20 minutes as the Stream hardware is doing for in home downloads. So I don't see the Stream hardware as underpowered. Quite frankly I'm actually a little surprised that TiVo gives a download option at all instead of just allowing only real time streaming instead.

I personally like downloads more than streaming, because you get the quickest possible trick play response on the iOS device that way. The response in real time streaming mode is a little sluggish - nowhere near as bad as when using Slingbox, but enough to be annoying. As a side benefit, the download option also doesn't suffer from the "freezing" issue (typically towards the end of a stream) which has been posted about in several threads with streaming mode.


----------



## Dan203

eboydog said:


> With this being a fairly new product, its unfortunate that TiVo chose such a limiting hardware processor that has noticeable effect transcoding the streaming content. While I can understand a reason not to have an underutilized processor related to product cost. Such implies that any future improvements in preformance is rather limited unless there are features of the Broadcom processor not currently being utilized, at least what is being seen, preformance isn't being limited by data bandwidth unless there is something I'm not understanding.


The transcoding does not happen in the Broadcom chipset. They use a special chip from a company called Zenverge. It's capable of simultaneously transcoding four HD streams faster than realtime, which is actually quite impressive. Even the best PC chip you could buy today could not do that.


----------



## Dan203

Austin Bike said:


> That seems backwards. The higher quality encodes actually shower faster transfer times. Could it be that the compression is the culprit and encoding to a lower quality requires more effort so it can't transfer as fast? If so then it makes more sense to me.


With lower bitrates you typically have to set other settings, like motion estimation, higher to get acceptable quality. These settings result in the encode being more computationally difficult which can actually increase encoding times. In PC based software we typically take it even further and do a multi-pass encode, which takes even longer. As long as there are no bandwidth constraints the bitrate of an encoding makes little difference when it comes to encode times.


----------



## JWhites

moyekj said:


> Post #1 in this thread updated with renewed information using latest version of Stream + iOS software. The striking difference compared to previous information is the download times were almost cut in half for all 3 different quality levels. Previously it took about 35 minutes each to download, now it's quite significantly faster.


I wonder if there is any change with the 20.4.2 Summer software update. Some have been reporting faster performance with streaming.


----------



## morac

I could swear when the Stream first came out it was capable of transcoding 4 streams at once. I just tried watching a stream in home from my Roamio Pro on my iPhone while downloading a HD program to my iPad and the stream failed do to "low bandwidth". 

An hour long program transferred at medium rate takes around 17 minute. Checking my router's bandwidth page, the output of the stream in the Roamio Pro seems to peak at about a little over 6 Mbps. 

On an unrelated note, checking the Stream's web page, I'm noticing that it's not releasing old downloads/streams from the clients page. This makes the Stream think it's not idle which prevents it from switching to low power mode. Manually clearing out the old transfers works around that. 

Lastly, if I restart the stream from the iOS app or web page, I need to setup OOH streaming again, which apparently just checks the "proxy enabled" checkbox on the Out-Of-Home screen.


----------



## JWhites

Yeah all the marketing states you can stream up to 4 things at once. I used to get the "low bandwidth" message when streaming 3 things at once until I got close to the router and it went away.

I've noticed the same issue that sometimes old downloads/streams don't release without manual intervention, but then again I'm constantly in the full statistics page monitoring the system temp.

I'm not seeing the issue of having to rerun OOH setup after resetting through the web page or iOS app and I've done this while away from home the past three weeks several times for no good reason.


----------



## morac

TiVo's stream support page now says they support 1 stream or download at a time. Then again they also says that streaming required a UPNP enabled router, which makes no sense considering the proxy. From my testing I could not stream more than 1 thing at once. 

I only tried restarting once and when I did the "use proxy" box unchecked. Maybe I didn't give it enough time and it would have checked itself later, but I doubt it. All the OOH streaming option does is enable to proxy. Without the proxy streaming won't work.


----------



## JWhites

Every time I try to do OOH streaming with the proxy unchecked it fails. The FAQ still reports up to 4 streams internally and 1 stream/download externally.

These are the settings I've come across that generally I don't think we're supposed to be able to see but my browser glitched.








•	*Restrict Sysinfo Access *can't be unchecked.
•	*Encrypted HLS *can't be unchecked.
•	*Rotate HLS Keys *can't be unchecked.
•	*Secure HLS *can't be unchecked.
•	*Secure HLS Developer Override *can't be checked.
•	*Low Bitrate Mode * can be checked and causes new in home streams to use a lower encoding resolution and targeted bitrate. This resets to unchecked upon restart.
•	*Override Bitrate *can't be checked.
•	*Bitrate* can be modified but doesn't stick upon clickout.
•	*Audio Gain *can be modified but doesn't stick upon clickout.
•	*Enable High Profile *can be unchecked but I'm not sure what good it does since it just changes encoding from H.264 High Level 4.1 to H.264 Main Level 3.1. This resets to checked upon restart.
•	*Enable Multiple Profiles *can be unchecked but I'm not sure what it's supposed to do since everything seems to behave the same way. This resets to checked upon restart.
•	*Enable Audio Profiles *can't be checked.
•	*Debug Level *can be modified but doesn't stick upon clickout.
•	*Enable low power *mode can't be unchecked.


----------



## morac

I can't download and stream at the same time in home from the same Roamio Pro. The FAQ says I should be able to get 3 streams with that setup. 

I don't see the advanced or log options on my Roamio Pro either.


----------



## JWhites

I attempted this while I was making my last post earlier and it worked fine and I have a stand alone Stream. I'm really starting to think it might be your router or wireless interference or just network congestion.


----------



## morac

JWhites said:


> I attempted this while I was making my last post earlier and it worked fine and I have a stand alone Stream. I'm really starting to think it might be your router or wireless interference or just network congestion.


 It's not my Wifi (802.11n dual band) as I can get over 54 Mbps on speed tests on my iOS devices to the Internet. My Roamio Pro is connected via a MoCa bridge to my router. The Roamio Pro bridges network traffic and I can get 100 Mbps through that connection.

The limit seems to be the Roamio Pro as the combined streaming bandwidth was maxing out at about 6 to 7 Mbps. That's enough to transfer an hour long program at medium quality in about 15 minutes.

Edit: I was able to stream two programs to two different devices today. I had rebooted the Stream in the Roamio Pro last night, but hadn't retested after doing so.


----------



## JWhites

Good luck, I wonder if what you are experiencing is unique to built in Streams and not stand alone Streams, even though it theoretically should work identically. Could you possibly test with another Roamio or via Ethernet? Like with me I'm using Gigabit Ethernet on the Stream with Gigabit Ethernet on the Premiere 4 on a Gigabit Ethernet enabled N router connected to a Gigabit Ethernet switch.


----------



## eboydog

JWhites said:


> Every time I try to do OOH streaming with the proxy unchecked it fails. The FAQ still reports up to 4 streams internally and 1 stream/download externally.
> 
> These are the settings I've come across that generally I don't think we're supposed to be able to see but my browser glitched.
> 
> 
> 
> 
> 
> 
> 
> 
> 	*Restrict Sysinfo Access *can't be unchecked.
> 	*Encrypted HLS *can't be unchecked.
> 	*Rotate HLS Keys *can't be unchecked.
> 	*Secure HLS *can't be unchecked.
> 	*Secure HLS Developer Override *can't be checked.
> 	*Low Bitrate Mode * can be checked and causes new in home streams to use a lower encoding resolution and targeted bitrate. This resets to unchecked upon restart.
> 	*Override Bitrate *can't be checked.
> 	*Bitrate* can be modified but doesn't stick upon clickout.
> 	*Audio Gain *can be modified but doesn't stick upon clickout.
> 	*Enable High Profile *can be unchecked but I'm not sure what good it does since it just changes encoding from H.264 High Level 4.1 to H.264 Main Level 3.1. This resets to checked upon restart.
> 	*Enable Multiple Profiles *can be unchecked but I'm not sure what it's supposed to do since everything seems to behave the same way. This resets to checked upon restart.
> 	*Enable Audio Profiles *can't be checked.
> 	*Debug Level *can be modified but doesn't stick upon clickout.
> 	*Enable low power *mode can't be unchecked.


What was the sysinfo url to get to this? How did you glitch it/what browser were you using?


----------



## moyekj

eboydog said:


> What was the sysinfo url to get to this? How did you glitch it/what browser were you using?


http://<STREAMIP>:49152/sysinfo
Last I checked, Windows Internet Explorer suffers from the glitch that exposes these normally hidden fields. Though it doesn't help much to see them since they can't be changed anyway.


----------



## JWhites

Yeah I'm using IE10. IE11 works normally as does Chrome, so I'm not sure what's causing the glitch.


----------



## JWhites

morac said:


> TiVo's stream support page now says they support 1 stream or download at a time. Then again they also says that streaming required a UPNP enabled router, which makes no sense considering the proxy. From my testing I could not stream more than 1 thing at once.
> 
> I only tried restarting once and when I did the "use proxy" box unchecked. Maybe I didn't give it enough time and it would have checked itself later, but I doubt it. All the OOH streaming option does is enable to proxy. Without the proxy streaming won't work.


morac, I'm a little confused because both the Roamio and stand alone Stream FAQ says: "You can stream up to four shows simultaneously to four mobile devices in your home. Please note that to support two to four streams, you may need more than one DVR. Being able to stream four shows simultaneously also depends on the bitrate of the source recordings. For example, you may have difficulties streaming four high bitrate HD programs at the same time" The packaging on my Stream says you can stream 3 shows from one Premiere and 4 shows with two Premieres. I'm assuming the same for the built in Streams in the Roamios. I did a support page mention "Currently the TiVo Stream and TiVo App only support downloading a single in-progress recording at a time." but nothing about being limited to one in home streaming session. I also found a support page for out of home streaming mention the need to have UPnP enabled which surprised me, then again I don't know up to date any of these support pages (or FAQ's) are since they seem to have other outdated information like referencing six dots as "full strength" when the current iOS app contains seven squares and the stand alone Stream FAQ still has things like out of home streaming listed as "coming soon".


----------



## morac

Rather than repost, I'll simply link to a thread I made.

Basically I'm seeing OOH streaming bit rates of 2.2 Mpbs which is the same as in home according to the OOH support document. Though that seems outdated considering it mentions a maximum of 6 dots when the max is now 7, which is what I got streaming OOH.

Last week I was getting 3 dots OOH.


----------



## Bytez

I can't get the url to load in IE or Chrome. Do I need to open ports in the router?


----------

