-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add adaptive streaming bitrate control to Clapper API #506
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add APIs to allow apps to select start, min and max bitrates for adaptive streaming. Combining min+max values can allow to implement a video quality selector, although possible bitrates/qualities are not communicated with an app yet.
New GStreamer adaptive demuxers work only within playbin3. In order to not introduce new APIs (setting adaptive bitrate) that do not work by default and to have the whole "clapper-enhancers" concept working correctly, its about time to move on to playbin3.
Still need to update CI to latest runtime that has GStreamer 1.24 before merging. |
Setting "start-bitrate" property requires at least GStreamer 1.24. We do not want to introduce APIs that work only if user has a certain dependency version, thus this bump instead of version check. Related work on GStreamer side: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3894 https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3895 Since these were contributed to GStreamer almost 2 years ago with the intention of using them in Clapper, I think its about time to start do so.
Rafostar
force-pushed
the
adaptive
branch
3 times, most recently
from
November 14, 2024 22:12
68bdef2
to
8119d3b
Compare
We do not yet have GStreamer 1.24 in Flathub repo, so for testing purposes add it here temporarily
Apps can use it to determine and set an optimal value for start bitrate instead of starting at some constant value.
Watch for "adaptive-bandwidth" changes during adaptive streaming, use these to set "adaptive-start-bitrate" player property, so we do not always start streaming from some constant bitrate value which might not be the best for everyone. Additionally, store last value in GSettings on app exit and also add a command line arg to set this too.
When new instance of adaptive demuxer is created (different video is played) this prop value would become zero. We want to avoid that and instead report only bandwidth after fragment is downloaded, so when video will be unplayable, next one will not start from lowest quality.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow setting start, min and max bitrates when streaming adaptive content such as DASH or HLS. This has potential to allow to implement video quality selector, although available representations bitrates are not yet forwarded to apps.
With this comes a GStreamer version bump to 1.24 and a switch to
playbin3
by default. We do not want to introduce APIs that work only if user has a certain dependency version, thus this bump instead of version check. This is also needed for recently introduced adaptive streaming fromclapper-enhancers
to work correctly with default settings. All major Linux distros (including LTS) should be already on GStreamer 1.24, thus we should be able to bump this version without much complains now.Related work on GStreamer side (since 1.24 - reason for version bump):
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3894
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3895