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

ytdl_hook: use the new max_request_size AVOption if needed #15612

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CounterPillow
Copy link
Contributor

@CounterPillow CounterPillow commented Jan 1, 2025

Some sites throttle requests, but throttling can be avoided with many small range requests. yt-dlp implements a "http_chunk_size" key in its -J output to inform us of the ideal size.

With the appropriate FFmpeg addition, we can properly implement this now, which greatly speeds up how fast YouTube videos get loaded into the cache by mpv.

Should the FFmpeg that mpv is built against lack the max_request_size AVOption, then this will silently not do anything new, so no version checks are needed.

Fixes #8655.

Draft until the FFmpeg patch gets applied, should not be merged before that because the way we implement this might change during the review process.

Some sites throttle requests, but throttling can be avoided with
many small range requests. yt-dlp implements a "http_chunk_size"
key in its -J output to inform us of the ideal size.

With the appropriate[1] FFmpeg addition, we can properly implement
this now, which greatly speeds up how fast YouTube videos get loaded
into the cache by mpv.

Should the FFmpeg that mpv is built against lack the max_request_size
AVOption, then this will silently not do anything new, so no version
checks are needed.

Fixes mpv-player#8655.

[1]: https://patchwork.ffmpeg.org/project/ffmpeg/patch/20250101204126.748587-1-ffmpeg@fratti.ch/
Copy link

github-actions bot commented Jan 1, 2025

Download the artifacts for this pull request:

Windows
macOS

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.

mpv slow download speed?
1 participant