-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
[extractor/nbc] Fix NBCOlympicsStreamIE #29688
base: master
Are you sure you want to change the base?
Conversation
|
It appears not all videos require getting a tokenized url, and for those that don't we get a
|
@asedeno good to know, thanks! For people who are stuck with older versions of ffmpeg, one option would be to use a (local) proxy to strip request headers from the outbound requests. That's what I did initially:
Hmm, I do see It might be helpful if you could link to such a stream, but failing that, I'm happy to make the change and keep it if you say it works for you. I just don't want to submit a branch of code that hasn't been run by someone. In any case, thank you very much for taking a look at this and providing important feedback! It's very late here but I will check back tomorrow. |
Yeah, that's what I'm saying. Here's one that appears that way for me. https://stream.nbcolympics.com/gymnastics-event-finals-mens-floor-pommel-horse-womens-vault-bars |
@asedeno thanks for the super quick link! You were exactly right. Update incoming, with a new test case |
This got me to the point of ffmpeg starting, but it always died with a 403 error. After adding these extra headers, things started working:
I didn't test different combinations to see if they were all required. Just added what was missing from the browser. After this, ffmpeg downloads the stream just fine. Edit: Now it works fine this morning without the extra headers, strange. Suggest using the |
@wesnm interesting, thanks for noting this. I will take a look later today. It’s conceivable that a server would restrict its activity based on
It makes sense that a live stream might behave differently than a reply! I’ll check whether the code works on a live stream, though I won’t be able to add a long-lasting test case for that. |
I thought about this some more and I don't think it's worth adding prophylactic
Darn, I'm not able to load any live streams with my credentials, either via a web browser or via youtube-dl. I can't figure out if such pages even allow clients to go back to the very beginning of the stream. Can we skip this for now? I assume replays are the priority. |
@remitamine @dstftw or others, could someone please approve the workflow when you get a chance? I think this PR is ready to go! |
My credentials work for live streams, so I can test things if needed, though I agree replays are the priority and shouldn't block this. |
If it's not needed to work, I wouldn't include it. I don't know what was going on last night, maybe just needed sleep.
One thing the "live" status does is determine if youtube-dl will delegate to alternate downloaders. If an event is flagged as live, it will only download using ffmpeg with a single worker, which is much much slower. These live events in the browser do allow rewinding to any point in the stream. |
PR: ytdl-org/youtube-dl#29688 Closes: #617, ytdl-org/youtube-dl#29665 * Livestreams are untested * If using ffmpeg as downloader, v4.3+ is needed since `-http_seekable` option is necessary * Instead of making a seperate key for each arg that needs to be passed to ffmpeg, I made `_ffmpeg_args` * This deprecates `_seekable`, but the option is kept for compatibility Authored by: nchilada, pukkandan
PR: ytdl-org/youtube-dl#29688 Closes: yt-dlp#617, ytdl-org/youtube-dl#29665 * Livestreams are untested * If using ffmpeg as downloader, v4.3+ is needed since `-http_seekable` option is necessary * Instead of making a seperate key for each arg that needs to be passed to ffmpeg, I made `_ffmpeg_args` * This deprecates `_seekable`, but the option is kept for compatibility Authored by: nchilada, pukkandan
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
This PR fixes NBCOlympicsStreamIE, which applies to stream.nbcolympics.com and is therefore the main extractor for the NBC Olympics in 2020/2021. See #29665, yt-dlp/yt-dlp#617.
This does not address NBCOlympicsIE, which is responsible for any news articles on www.nbcolympics.com that happen to have embedded videos. That extractor is still broken and fixing it doesn’t feel like a high priority.