From 8da361b087ccec0e5355c5cea88d10ca5911f04f Mon Sep 17 00:00:00 2001 From: Mattias Tall Date: Tue, 26 May 2026 17:48:10 +0200 Subject: [PATCH] Fix quality: use tv_embedded,web player client instead of web-only YouTube's web client gets SABR format restrictions in 2025-2026 yt-dlp, limiting available streams and causing fallback to 360p. tv_embedded bypasses SABR and exposes the full format list including 4K. Co-Authored-By: Claude Sonnet 4.6 --- backend/services/ytdlp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/services/ytdlp.py b/backend/services/ytdlp.py index 5a16e53..b9dad2b 100644 --- a/backend/services/ytdlp.py +++ b/backend/services/ytdlp.py @@ -232,7 +232,7 @@ def fetch_video_metadata(video_id: str) -> dict | None: base_cmd = [ "yt-dlp", url, "--dump-json", "--no-download", "--no-playlist", - "--extractor-args", "youtube:player_client=web", + "--extractor-args", "youtube:player_client=tv_embedded,web", ] stdout, stderr, code = _run([*base_cmd, *cookie_args], timeout=30) if code != 0: @@ -646,7 +646,7 @@ def start_download( "--no-part", "--no-mtime", "-o", output_template, "--newline", "--progress", "--no-colors", - "--extractor-args", "youtube:player_client=web", + "--extractor-args", "youtube:player_client=tv_embedded,web", *cookie_args, ], stdout=subprocess.PIPE,