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

Starting a youtube video (playback) with mpv takes above 5 seconds #10205

Closed
6 of 9 tasks
geextahslex opened this issue Jun 18, 2024 · 3 comments
Closed
6 of 9 tasks

Starting a youtube video (playback) with mpv takes above 5 seconds #10205

geextahslex opened this issue Jun 18, 2024 · 3 comments
Labels
question Question

Comments

@geextahslex
Copy link

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Please make sure the question is worded well enough to be understood

Starting a youtube video (playback) with mpv and yt-dlp takes above 5 seconds on average, is there a way to speed this up?
I don't use yt-dlp to download files only for youtube video playback in 1080p/1440p/4k VP9.
On discord someone give me this line --extractor-args "youtube:player_skip=webpage,configs,js;player_client=ios" but this breaks the seek functionality.

Thank you :)

Information:
I'm on Windows 10 22H2
latest nightly yt-dlp
mpv v0.38.0

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

As I use yt-dlp only with mpv, I don't know which command is going into yt-dlp
@geextahslex geextahslex added the question Question label Jun 18, 2024
@bashonly
Copy link
Member

No. Most of this startup time is yt-dlp decoding the nsig parameter, which is necessary for web client formats (or else their download speeds will be throttled to 30KB/s). The only alternative is the extractor-args given to you on discord.

@geextahslex
Copy link
Author

geextahslex commented Jun 19, 2024

I understand.
What does this line actually do? script-opts-append=ytdl_hook-try_ytdl_first=yes
script-opts=ytdl_hook-try_ytdl_first=yes,ytdl_hook-exclude="%.webm$|%.ts$|%.mp3$|%.m3u8$|%.m3u$|%.mkv$|%.mp4$|%.VOB$"

@bashonly
Copy link
Member

That's an mpv argument, not a yt-dlp option. But from what I can tell, ytdl_hook-try_ytdl_first=yes tells mpv to try yt-dl/p first when given URL input (instead of trying to playback the URL with mpv directly first), and ytdl_hook-exclude tells mpv to exclude URLs ending in .webm etc from the ytdl/p hook and instead playback those URLs directly with mpv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question
Projects
None yet
Development

No branches or pull requests

2 participants