mangui / mangui/flashls

HLS.nextLevel / AUTO cause skipping

Open
#436 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug fixed/answered
Dominant language
ActionScript
Stars
744
Forks
259
PR merge metrics
No merged PRs in 30d

Description

Hello,

Firstly, really congrats for this work and doing something that changes the online video community! It's such a pity HLS isn't implemented natively on desktop.. Anyway.

I am having issues with FlasHls's level switching logic.
What usually happens is that audio skips one segment behind with freezing image when an AUTO level switch or manual via HLS.nextLevel = index is being made.
This doesn't happen on every switch though but it is often enough.
Of course it is very disturbing.

I reproduce it on a custom Clappr build with level control UI support that uses smooth switching (HLS.nextLevel) but this issue also reproduces for example here with AUTO:
http://www.flashls.org/latest/examples/osmf/GrindPlayer.html?src=http%3A%2F%2F176.9.1.233%2Fflashlstest%2Ftest.m3u8
- Start playback
- Manual switch to lowest quality (it is done via currentLevel from which i've seen as it is instant)
- Put it in AUTO and wait for the switch
- Usually the first time seems to be a good aligned one but retry the manual/AUTO 1-2 times, usually second AUTO switch is bad
I am seing it on latest Mac OS X / Chrome.

The source, http://176.9.1.233/flashlstest/test.m3u8 seems to run perfectly on iOS/OS X, no issues at switching points. also latest mediastreamvalidator reports everything good.

I assume there is something wrong with the logic in StreamBuffer.nextLevel at least for manual switches but my knowledge is still to low to figure out how that code works. Is this actually used also for AUTO?

Thanks again.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the StreamBuffer.nextLevel logic and tracing how HLS.nextLevel, currentLevel, and AUTO switches are handled. Reproduce the issue with the linked test.m3u8 stream using the listed manual/AUTO switching steps. Done means repeated level switches no longer leave audio one segment behind or freeze the image.

Written by the indexing model from the issue text.

Assessment

Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.