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

[ie/wrestleuniverse] Avoid partial stream formats #9800

Merged
merged 2 commits into from May 4, 2024

Conversation

bashonly
Copy link
Member

@bashonly bashonly commented Apr 27, 2024

Some master m3u8s for PPV/livestreams actually provide variants for two separate streams, e.g. https://vod.asset.wrestle-universe.com/2e6gptHzDNQS47VDSvUPGQ/live-b.m3u8 has a live-a stream and a live-b stream:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:BANDWIDTH=23383278,AVERAGE-BANDWIDTH=20222400,CODECS="avc1.640029,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=29.970
live-b_1080p_2997fps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=23383278,AVERAGE-BANDWIDTH=20222400,CODECS="avc1.640029,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=29.970
live-a_1080p_2997fps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=10416034,AVERAGE-BANDWIDTH=9011200,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=29.970
live-b_720p_2997fps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=10416034,AVERAGE-BANDWIDTH=9011200,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=29.970
live-a_720p_2997fps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=5243216,AVERAGE-BANDWIDTH=4540800,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=960x540,FRAME-RATE=29.970
live-b_540p_2997fps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=5243216,AVERAGE-BANDWIDTH=4540800,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=960x540,FRAME-RATE=29.970
live-a_540p_2997fps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2692008,AVERAGE-BANDWIDTH=2340800,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970
live-b_360p_2997fps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2692008,AVERAGE-BANDWIDTH=2340800,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970
live-a_360p_2997fps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1416404,AVERAGE-BANDWIDTH=1240800,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=426x240,FRAME-RATE=29.970
live-b_240p_2997fps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1416404,AVERAGE-BANDWIDTH=1240800,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=426x240,FRAME-RATE=29.970
live-a_240p_2997fps.m3u8

If we look at https://vod.asset.wrestle-universe.com/2e6gptHzDNQS47VDSvUPGQ/live-a_1080p_2997fps.m3u8, we can see it is only the first ~30 minutes of https://vod.asset.wrestle-universe.com/2e6gptHzDNQS47VDSvUPGQ/live-b_1080p_2997fps.m3u8.

This patch prefers the variant playlists that have the same basename as the master manifest to avoid such partial streams.

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • I am the original author of this code and I am willing to release it under Unlicense

What is the purpose of your pull request?

  • Fix or improvement to an extractor (Make sure to add/update tests)

@bashonly bashonly added the site-bug Issue with a specific website label Apr 27, 2024
Authored by: bashonly
@bashonly bashonly merged commit c485365 into yt-dlp:master May 4, 2024
6 checks passed
@bashonly bashonly deleted the fix/wu-full branch May 10, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-bug Issue with a specific website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant