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

testers/m3utester2: properly match Mist renditions #196

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

iameli
Copy link
Contributor

@iameli iameli commented Sep 14, 2022

This changes the m3u8 parsing logic (with -mist=true set) to properly match Mist's new HLS output.

So given a playlist like this:

#EXTM3U
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:CODECS="avc1.64002a,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=60,BANDWIDTH=10600418,AVERAGE-BANDWIDTH=8969585
0_1/index.m3u8?mTrack=0&iMsn=2&sessId=2801500359
#EXT-X-STREAM-INF:CODECS="avc1.4d4020,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=60,BANDWIDTH=2768303,AVERAGE-BANDWIDTH=2342410
2_1/index.m3u8?mTrack=0&iMsn=2&sessId=2801500359
#EXT-X-STREAM-INF:CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=854x480,FRAME-RATE=60,BANDWIDTH=1584950,AVERAGE-BANDWIDTH=1341111
3_1/index.m3u8?mTrack=0&iMsn=2&sessId=2801500359
#EXT-X-STREAM-INF:CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=60,BANDWIDTH=900141,AVERAGE-BANDWIDTH=761658
4_1/index.m3u8?mTrack=0&iMsn=2&sessId=2801500359
#EXT-X-STREAM-INF:CODECS="avc1.4d401e,mp4a.40.2",RESOLUTION=426x240,FRAME-RATE=60,BANDWIDTH=429998,AVERAGE-BANDWIDTH=363845
5_1/index.m3u8?mTrack=0&iMsn=2&sessId=2801500359

loadtester/recordtester will only look at the 0_1/index.m3u8 piece for deciding whether a new rendition needs to be pulled. But it will still instigate the (initial) pull using the full 0_1/index.m3u8?mTrack=0&iMsn=2&sessId=2801500359 bit, including the session id in the URL and simulating an actual Mist viewer. This fixes the bug where each iMsn and sessId was detected as a new rendition, causing more and more and more to get pulled, aka https://github.com/livepeer/livepeer-infra/issues/943

@iameli iameli requested a review from a team as a code owner September 14, 2022 16:55
@iameli iameli requested a review from emranemran September 14, 2022 16:57
@iameli iameli merged commit c3c2f3b into master Sep 14, 2022
@iameli iameli deleted the eli/mist-hls-matching branch September 14, 2022 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant