Skip to content

Avoid replacing partial GOPs on LL-HLS upswitch - #8087

Open
maxlapshin wants to merge 1 commit into
video-dev:masterfrom
flussonic:ml-65211-llhls-gop-switch
Open

maxlapshin wants to merge 1 commit into
video-dev:masterfrom
flussonic:ml-65211-llhls-gop-switch

Conversation

@maxlapshin

Copy link
Copy Markdown

This PR will...

Protects from hanging video while switching quality inside a LL-HLS segment.

When quality is changed with switching between parts of different qualities, video hangs.

Why is this Pull Request needed?

We have freezes without it.

Are there any points in the code the reviewer needs to double check?

Don't know

Resolves issues:

#6355

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

Finish the buffered rendition before automatically increasing bitrate. Cover open fragments, pending parts, completed segments, manual selection and downswitches.

@robwalch robwalch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling nextLoadLevel should be avoided completely to avoid changes that impact other components and the active loadLevel.

This PR conflicts with an open PR that changes switch frequency. It would be better to file a new issue and work with maintainers to describe the ideal behavior we want to achieve. For example: Only switch on independent parts (or after appending complete GoP) in low-latency mode.

@robwalch

Copy link
Copy Markdown
Collaborator

This does not resolve #6355.

#6355 is a user caused browser issue - calling currentLevel flushes the buffer so a stall is expected, but some browsers play through an additional second of buffered content unless interrupted by a seek (see the comments from #6355 (comment)).

The tracked issue this change is more closely related to is #3596. Work to resolve that has started, first with detecting video buffer starvation in f5fc937

Optimizing switch timing to land on parts that will land before the playhead passes them will come in a followup in v1.8. A change like this, that backtracks level selection, is not the direction we want to go in.

@robwalch

Copy link
Copy Markdown
Collaborator

This change uncannily resembles #8026.

I won't take either as written, but will consider that switches during part loading should primarily happen at full segment boundaries.

@maxlapshin

Copy link
Copy Markdown
Author

@robwalch I'm pretty sure that you can offer a better place to make this fix. But yes, we cannot change quality from part to part, need to wait for the end of the segment.

@dzianis-dashkevich

Copy link
Copy Markdown
Collaborator

Agree with @robwalch here. I suggest implementing LL SwitchOnPolicy: eg allow switch only on independent parts or segment boundaries. (eg partIndex === 0).

@maxlapshin

Copy link
Copy Markdown
Author

Should I change the PR?

@robwalch

Copy link
Copy Markdown
Collaborator

Should I change the PR?

Hi @maxlapshin. I can't assure you that I would take the change, as I am unable to provide a review that addresses the complexity required.

Ultimately we want to address the concerns you've raised with this PR, as well as those in #8026. The video freezing brought up in #6355 is still separate issue and will remain open until we have implemented estimation of late appends performed over the playhead.

I still really appreciate the contribution, dialog, and finding from this PR. Up to you if you want to take it further in the direction I am able to share.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants