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/roosterteeth] Add Brightcove fallback #9403

Merged
merged 3 commits into from Mar 9, 2024

Conversation

bashonly
Copy link
Member

@bashonly bashonly commented Mar 9, 2024

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 Mar 9, 2024
@NBruderman
Copy link

There was a talk on the previous PR about extracting bonus content. This PR is unrelated to that, am I right?

@bashonly
Copy link
Member Author

bashonly commented Mar 9, 2024

@NBruderman yes, unrelated. I don't even know how to do it, so someone else needs to open a PR for that

@vidyava
Copy link

vidyava commented Mar 9, 2024

Thank you for getting this together so quickly. I can confirm it works for the most part for videos previously failing with 403 errors, but is this workaround limited in format? I've found that running with -f "b" works fine, but -f "b[height<=720]" gets a few fragments in before they start failing with 403 errors. Not a big deal for archival, just wanted to check if I was missing something.

@bashonly
Copy link
Member Author

bashonly commented Mar 9, 2024

These are the only formats available to the browser as well

@vidyava
Copy link

vidyava commented Mar 9, 2024

To clarify, here are the formats available for https://roosterteeth.com/watch/lets-play-2013-126:

ID        EXT RESOLUTION │    TBR PROTO │ VCODEC      ACODEC
───────────────────────────────────────────────────────────────
hls-3513  mp4 426x238    │  3513k m3u8  │ avc1.4d001f mp4a.40.2
hls-10572 mp4 640x360    │ 10572k m3u8  │ avc1.4d001f mp4a.40.2
hls-18239 mp4 1280x720   │ 18239k m3u8  │ avc1.4d001f mp4a.40.2
hls-44769 mp4 1920x1080  │ 44769k m3u8  │ avc1.4d001f mp4a.40.2

If I set -f "b[height<=720]" it catches the correct format ID, just doesn't work downloading it:

WARNING: [RoosterTeeth] Direct m3u8 URL returned HTTP Error 403; retrying with Brightcove extraction
[brightcove:new] Extracting URL: https://players.brightcove.net/6203312018001/default_default/index.html?videoId=6311613926112#__y...-play-2013-126%22%7D
[brightcove:new] 6311613926112: Downloading JSON metadata
[brightcove:new] 6311613926112: Downloading m3u8 information
[RoosterTeeth] lets-play-2013-126: Downloading episode JSON metadata
[MetadataParser] Changed title to: WWE 13
[MetadataParser] Changed series to: Lets Play
[info] 17845: Downloading 1 format(s): hls-18239
[info] Writing video description to: Lets Play/NA - WWE 13.description
[info] There are no subtitles for the requested languages
[info] Downloading video thumbnail thumb ...
[info] Writing video thumbnail thumb to: Lets Play/NA - WWE 13.jpg
[info] Writing video metadata as JSON to: Lets Play/NA - WWE 13.info.json
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 2019
[download] Destination: Lets Play/NA - WWE 13.mp4
[download]   0.2% of ~   1.89GiB at    4.08MiB/s ETA Unknown (frag 5/2019)[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 6 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 6 (2/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 6 (3/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 6 (4/inf)...

I wasn't sure if the brightcove ID changed per format or something?

@bashonly
Copy link
Member Author

bashonly commented Mar 9, 2024

I wasn't sure if the brightcove ID changed per format or something?

No.

I can reproduce the issue with the 720p format. But I also can't get it to play in my browser. Can you?

I don't see a way of fixing this. As it stands, this PR is an improvement over doing nothing, since at least you can get the 1080p format.

@vidyava
Copy link

vidyava commented Mar 9, 2024

Good question. It says it's switching resolution streams in the network logs but the video quality doesn't noticeably change from 240p to 1080p so probably not.

And I totally agree that this PR is exactly what's needed, I was just checking if I was missing something.

Thanks!

Authored by: bashonly
Authored by: bashonly
@bashonly bashonly merged commit b2cc150 into yt-dlp:master Mar 9, 2024
6 checks passed
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
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

3 participants