-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support EXT-X-DISCONTINUITY without EXT-X-DISCONTINUITY-SEQUENCE (for live HLS with version<6) #1789
Comments
The HLS specification is very clear that you must include EXT-X-DISCONTINUITY-SEQUENCE in this case. Specifically:
And:
And:
The fact that EXT-X-DISCONTINUITY-SEQUENCE is pitched in the HLS spec as being useful to the client where there are multiple variants/renditions doesn't mean you can ignore MUST clauses in the specification in the single variant case. Adding EXT-X-DISCONTINUITY-SEQUENCE to be spec compliant will resolve the issue you're seeing. |
Thanks for the details but do you know why iOS devices have no issue playing the same stream. Does Exoplayer expect the HLS stream to be a certain version compliant while the iOS players are able to support older rev? I don't know which draft introduced EXT-X-DISCONTINUITY-SEQUENCE. |
EXT-X-DISCONTINUITY was added to the spec quite a long time before EXT-X-DISCONTINUITY-SEQUENCE. It's likely that the iOS player doesn't rely on EXT-X-DISCONTINUITY-SEQUENCE as much as ExoPlayer does as a result. It's unclear to me whether or not the spec was under-specified (to the extent that the player had to "guess what to do" in some cases) prior to the addition of EXT-X-DISCONTINUITY-SEQUENCE, but I suspect this is likely to be the case. EXT-X-DISCONTINUITY-SEQUENCE has been in the spec for around 3 years now. Given it's relevant to live streams (only), it's not like there's a huge volume of legacy content that omits the tag. It seems reasonable for us to require that live stream providers aren't more than 3 years behind the spec. |
The manifest in question uses EXT-X-VERSION:3. According to the EXT-X-VERSION: The EXT-X-VERSION tag indicates the compatibility version of the The most recent spec documenting protocol version 3 is https://tools.ietf.org/html/draft-pantos-http-live-streaming-06 which does not contain EXT-X-DISCONTINUITY-SEQUENCE. It would be improper for the client that implements compatibility with VERSION 3 to require tags that are not part of the version 3 specification. |
Yep. So I think you can consider ExoPlayer as not supporting live streams prior to version 6 in the specific case that they include EXT-X-DISCONTINUITY tags. As per above, it seems reasonable that live stream providers shouldn't be using a spec that's 3 years old. ExoPlayer will successfully play on-demand streams and live streams that do not include EXT-X-DISCONTINUITY tags that are prior to version 6. We could proactively detect the unsupported case and fail with a clearer warning, if you feel that would be worthwhile. |
It does seem reasonable to proactively fail unsupported formats and/or versions. |
FWIW it seems like it's just the video renderers that have issues with this older HLS spec. We play an audio-only stream (http://espn.edge-1.cis.abacast.net/espn-network-cloud.m3u8?source=espnradio) using hls v3, see EXT-X-DISCONTINUITY tags without corresponding EXT-X-DISCONTINUITY-SEQUENCE tags and playback works as expected. So perhaps we don't always want to proactively fail playback in all cases? |
|
We now plan to provide best-effort support for EXT-X-DISCONTINUITY without EXT-X-DISCONTINUITY-SEQUENCE. We'll likely do this sometime in Jan. |
This is an initial version that does not handle cross-playlists adjustment in an ideal way. Issue:#1789 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=144692969
The latest |
Video playback freezes with this sample stream.
http://52.203.119.217:8180/cdn/linear/espn-new/index.m3u8
The exact error I see is "com.google.android.exoplayer.demo E/AudioTrack: Discontinuity detected [expected 24035133, got 9012800]" coinciding with the freeze.
We are simply looping through five segments with a #EXT-X-DISCONTINUITY tag. It's unclear to me if EXT-X-DISCONTINUITY-SEQUENCE is a MUST if there are no variants as per the HLS draft#19.
FWIW, this same stream plays fine on Apple devices (Safari/Quicktime, iOS, etc.). May be Apple is more lenient with discontinuities.
The text was updated successfully, but these errors were encountered: