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

BANDWIDTH / AVERAGE-BANDWIDTH #946 #1362

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

sannies
Copy link

@sannies sannies commented Jun 21, 2022

Hi @erankor,

I got a very early proof of concept here. It works for my single test file - not enough but a start.
The code that creates the i-frame playlist was transformed to compute segment sizes and (AVERAGE-)BANDWIDTH.
I believe I added a few too many things to the hls_master_request in ngx_http_vod_hls.c - that might introduce a performance penalty. But it's hard for me to understand which REQUEST and PARSE flags are actually required.

As I don't have a lot of experience with the plugin: Is this approach something you'd support?

@kaltura-hooks
Copy link

Hi @sannies,
Thank you for contributing this pull request!
Please sign the Kaltura CLA so we can review and merge your contribution.
Learn more at http://bit.ly/KalturaContrib

@sannies
Copy link
Author

sannies commented Jul 7, 2022

Hi @erankor , any comment on my code? Is it the correct approach?

@sannies
Copy link
Author

sannies commented Sep 22, 2022

The numbers in BANDWIDTH and AVG_BANDWIDTH are now right with a single quality e.g.:

TOS_,1000000,.mp4.urlset/master.m3u8 gives the right result
TOS_,1000000,1400000,.mp4.urlset/master.m3u8 doesn't as it calculates the values for a stream that contains both qualities' bitstreams.

The new hls_muxer_simulate_get_segment_sizes in hls_muxer.c doesn't select the current track for simulation but the entire media_set. It looks like I got to create a media_set from the request_context's media_set that only contains the tracks required for this variant.

(If anyone wants to chime in please do so otherwise this is a note to myself)

I don't believe it's right what I'm doing here, but it works.
@sannies
Copy link
Author

sannies commented Sep 22, 2022

I now restrict the media_set via

media_set->filtered_tracks = cur_track_ptr[0];
media_set->filtered_tracks_end = cur_track_ptr[0];
media_set->total_track_count = 1;

and everything seems to work. I don't believe the approach is 100% right but I couldn't find a better way

@sannies sannies marked this pull request as ready for review October 19, 2022 14:05
@sannies
Copy link
Author

sannies commented Nov 29, 2022

@erankor Hi, any comment? AMA!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants