Skip to content

Add delay to wait until YouTube resource is ready to be played - #1087

Open
SpazeDev wants to merge 1 commit into
Splamy:developfrom
SpazeDev:youtube-delay
Open

Add delay to wait until YouTube resource is ready to be played#1087
SpazeDev wants to merge 1 commit into
Splamy:developfrom
SpazeDev:youtube-delay

Conversation

@SpazeDev

@SpazeDev SpazeDev commented Sep 4, 2026

Copy link
Copy Markdown

For a while now I have noticed that some YouTube links could not be played.

After some debugging I noticed that the started ffmpeg process exited with the error:
Error opening input files: Server returned 403 Forbidden (access denied)
But when testing the same command extracted from logs manually it always worked without a problem.

After some searching I found out that at least yt-dlp contains a available_at timestamp that matches the new delay YouTube makes us wait before a video starts.
Parsing and waiting for that delay has fixed playback for me.

I'm not entirely sure if this is the best location for the check.. but moving it somewhere else would require more refactoring.

@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

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.

1 participant