The goal is to optimize viewing quality as fast as possible (always the goal isn't it?).
Project notes:
- Using HTTP Live Streaming (HLS) to allow the iOS device to choose the best stream for viewing.
- The stream is not live.
- The video duration is ~1 minute.
- Targeting iPhone 3gs and beyond
Three questions:
What should the target encoder settings be for the initial cellular stream? Encoder settings tables: Preparing Media for Delivery to iOS-Based Devices
Apple suggests (reproduced below) the target duration should be 10 seconds. If the initial stream quality is lower than current capability, you'll be stuck viewing that same stream for 10 seconds before the switch is made. I'm considering moving it to 3-5 seconds. Are there recommendations around a lower limit? I believe Apple's advice comes from a live streaming perspective, and may not apply.
How can I debug the HLS on the device? To view stream switches, and timings. I ran into a link at one point...
Use 10 second Target Durations
The value you specify in the EXT-X-TARGETDURATION tag for the maximum media segment duration will have an effect on startup. We strongly recommend a 10 second target duration. If you use a smaller target duration, you increase the likelihood of a stall. Here's why: if you've got live content being delivered through a CDN, there will be propogation delays, and for this content to make it all the way out to the edge nodes on the CDN it will be variable. In addition, if the client is fetching the data over the cellular network there will be higher latencies. Both of these factors make it much more likely you'll encounter a stall if you use a small target duration.
Thanks SO