AVPlayer unable to play HLS streams which exceed available bandwidth

Originator:robgaunt
Number:rdar://16764535 Date Originated:2014/04/29
Status:Duplicate Resolved:
Product:iOS Product Version:7.1.1
Classification:Bug Reproducible:Always
 
Summary:
AVPlayer puts a hard deadline on HLS media segment fetches, and terminates them after ~5 seconds (probably tied to the media segment duration).

This makes it impossible to play a HLS video where the bitrate exceeds available bandwidth by some factor, as the player will terminate every segment fetch, and be stuck in an endless buffering state.

Effectively, this bug prevents users from playing HLS videos when the network is extremely poor (e.g. when the user is on a 2G network).

Steps to Reproduce:
Attached are two examples with HLS mediaserverd logs.

In one example, I played a video with an HLS manifest containing a range of stream bitrates down to 144p. I used Charles to throttle network bandwidth to 256k. You can see in Charles that a few of the initial media requests are unnecessarily terminated after about 5 seconds, which contributed to rebuffering - it would have been better to allow them to complete.

Halfway through the video I changed the throttle settings to 128k. At this point, the video entered an endless buffering state as AVPlayer terminated every single video segment fetch before it completed.

In the second test, the player does NOT terminate video segment fetches, but instead, terminates audio segment fetches. This test used an HLS manifest containing 480p and 720p video streams, and a 128k audio stream. I used Charles to throttle the network bandwidth to 256k. Since half of the available bandwidth was being used to download the video stream, the player was unable to download the audio stream, and stayed in an endless buffering state.

Expected Results:
If the player is already on the lowest bitrate, it should not terminate segment fetches. Instead, it should allow them to complete, so that the user can play the video after waiting for it to buffer.


Actual Results:
The player terminates segment fetches, and never manages to download a complete segment. As a consequence, the user is unable to play HLS videos.

Comments

Apple Developer Relations16-May-2014 08:28 AM

Engineering has determined that your bug report is a duplicate of another issue and will be closed.

The open or closed status of the original bug report your issue was duplicated to appears in the yellow "Duplicate of XXXXXXXX" section of the bug reporter user interface. This section appears near the top of the right column's bug detail view just under the bug number, title, state, product and rank.

Example:

13556600 User interface anomaly in OS X

State: Duplicate Product: OS X

Rank: 3 - Medium

Duplicate of 10535951 (Open)


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!