Skip to content
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

Fix repeated requests for initialization segments #4452

Merged

Conversation

erkreutzer
Copy link
Contributor

This PR will...

Prevent unnecessary requests for the same initialization segment. For live video, merging playlists did not updated non-overlapping fragments. Now, the level-helper will update any non-overlapping fragmentHint or fragments to reference existing initSegment fragments.

Why is this Pull Request needed?

When multiple EXT-X-MAP support was included #3859, live playlists that include EXT-X-MAP may unnecessarily request the same initialization segment multiple times.

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

I'm not super familiar with LL-HLS so it took me a while to figure out I needed to also include the fragmentHint in the update check. If there's something else missing with LL-HLS integration let me know and I can work through those issues. I've tested with the LL-HLS test stream

I've verified the behavior with some internal non-LL-HLS streams. Additionally the demo LL-HLS stream no longer shows repeated requests. Additionally npm run test:func and npm run test:unit pass on this branch. Otherwise I don't have a very diverse set of test cases available so if there are other areas that need testing any guidance on those tests would be appreciated.

Resolves issues:

#4450

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

Testing:

Fixes video-dev#4450
For live video, merging playlists did not updated non-overlapping
fragments. Now, the level-helper will update any non-overlapping
fragmentHint or fragments to reference existing initSegment
fragments.
robwalch
robwalch previously approved these changes Dec 3, 2021
Copy link
Collaborator

@robwalch robwalch left a comment

Choose a reason for hiding this comment

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

👍

@robwalch robwalch added the Bug label Dec 6, 2021
@robwalch robwalch added this to the 1.1.2 milestone Dec 6, 2021
@robwalch robwalch merged commit 4914b5c into video-dev:master Dec 6, 2021
littlespex pushed a commit to cbsinteractive/hls.js that referenced this pull request Dec 9, 2022
The test to show that src= playbacks can log width/height data was
failing on Tizen.  This is because Tizen was ignoring the SAR (sample
aspect ratio) and showing the content at 256 pixels wide, whereas
other platforms were displaying at 258 pixels wide.  The point of the
test was never to check a platform's support for SAR, so the video has
been re-encoded to display consistently across platforms.

This issue began when the test was added in PR video-dev#4435.

The video file is now also much smaller than it was before (from 177kB
to 37kB).

Re-encoding was done with:

```sh
ffmpeg \
  -i test/test/assets/small.mp4.orig \
  -c:v h264 -vf setsar=1:1 -crf 51 \
  -c:a aac -b:a 16k \
  -y test/test/assets/small.mp4
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants