[Bug]: Automatic downloads only negotiate SABR-restricted player clients (web_embedded/tv_downgraded), capping quality at format 18 regardless of Download Format settings
I've read the documentation
- I'm running the latest version of Tube Archivist and have read the release notes.
- I'm beta testing and am running the latest unstable build.
- I have read the how to open an issue guide, particularly the bug report section. I've double checked that I don't open a yt-dlp issue here.
Operating System
Docker Desktop on Windows 10
Your Bug Report
Describe the bug
TA's automatic downloads are consistently capped at the legacy pre-merged format 18 (360p, single audio-only track bundled in), regardless of the configured Download Format / Sort Format settings, PO Token provider, or cookies — not because the settings are ignored, but because TA's internal yt-dlp session only ever negotiates the web_embedded and tv_downgraded player clients, both of which YouTube's SABR restriction caps at format 18 no matter what PO Token is supplied.
A manually invoked yt-dlp session — same binary, same version, same PO Token provider, run from inside the same container — reaches the visionos/web clients instead, and correctly returns and downloads the full format range (up to 1080p60 and beyond) for the same videos.
This is confirmed reproducible across two independent, previously-untouched video IDs, including one tested immediately after a full docker compose down && up (fresh containers, fresh session state), ruling out caching, rate-limiting, or per-video exhaustion as explanations.
Environment / setup
- TA settings:
- Download Format:
bestvideo+bestaudio/best - Sort Download Formats:
res:1080,fps
- Download Format:
- PO Token Provider URL configured and working:
http://bgutil-provider:4416(bgutil-ytdlp-pot-provider v1.3.2, running as a companion container) - Cookies configured and validated in TA's Cookie settings
- No per-channel Download Format override set (confirmed empty)
- yt-dlp version:
2026.08.19(confirmed current)
Steps To Reproduce
- Set global Download Format to
bestvideo+bestaudio/bestand Sort Format tores:1080,fps. - Set up a working PO Token Provider and cookies (both independently confirmed functional — see below).
- Queue any video for download (tested with two different, previously untouched video IDs:
aJER6NwMfg4andQeCLr4NT27w). - Enable
DJANGO_DEBUG=Trueand capture full container logs (docker logs -f tubearchivist 2>&1) across theextract_downloadanddownload_pendingtasks. - Inspect the logged yt-dlp config dict TA passes for the actual download, and the resulting format selection.
Expected behavior
With bestvideo+bestaudio/best and res:1080,fps configured, and a working PO Token provider, the download should resolve to the highest available quality (1080p or above, depending on the video), matching what a manual yt-dlp invocation with equivalent settings produces.
Actual behavior
TA passes the correct format string — confirmed directly from the logged yt-dlp config dict for the real download step:
{'default_search': 'ytsearch', 'socket_timeout': 10, 'extractor_retries': 3, 'retries': 10, 'cachedir': '/cache/ytdlp', 'plugin_dirs': [], 'merge_output_format': 'mp4', 'outtmpl': '/cache/download/%(id)s.mp4', 'progress_hooks': [...], 'noprogress': True, 'continuedl': True, 'writethumbnail': False, 'noplaylist': True, 'color': 'no_color', 'format': 'bestvideo+bestaudio/best', 'format_sort': ['res:1080', 'fps'], 'postprocessors': [{'key': 'FFmpegMetadata', 'add_chapters': True}], 'cookiefile': <_io.StringIO object>, 'extractor_args': {'youtubepot-bgutilhttp': {'base_url': ['http://bgutil-provider:4416']}}}But the resulting yt-dlp session only ever reaches these player clients before resolving formats:
[youtube] <id>: Downloading web embedded client config
[youtube] <id>: Downloading player <player-id>
[youtube] <id>: Downloading web embedded player API JSON
[youtube] <id>: Downloading tv downgraded player API JSON
[youtube] [jsc:deno] Solving JS challenges using deno
WARNING: [youtube] <id>: Some web_embedded client https formats have been skipped as they are missing a URL. YouTube may have enabled the SABR-only streaming experiment for your account.
[youtube] [pot:bgutil:http] Generating a gvs PO Token for web client via bgutil HTTP server
[info] Testing format 18
[info] <id>: Downloading 1 format(s): 18The PO Token is generated ("for web client"), but the format probe (Testing format 18) never actually happens against an unrestricted client — bestvideo+bestaudio/best correctly evaluates to format 18 because, from what this session can see, that genuinely is the only viable option. The format selector isn't broken; the client negotiation feeding it a format list is.
Proof this reproduces on multiple, previously-untouched videos
Video 1 — aJER6NwMfg4, tested across multiple sessions and a full container recreation:
[info] aJER6NwMfg4: Downloading 1 format(s): 18Video 2 — QeCLr4NT27w, a completely fresh video ID, tested immediately after docker compose down && docker compose up -d (no prior history with this video):
[youtube] QeCLr4NT27w: Downloading tv downgraded player API JSON
WARNING: [youtube] QeCLr4NT27w: Some web_embedded client https formats have been skipped... SABR-only streaming experiment
[youtube] [pot:bgutil:http] Generating a gvs PO Token for web client via bgutil HTTP server
[info] Testing format 18
[info] QeCLr4NT27w: Downloading 1 format(s): 18Identical pattern both times. This rules out per-video rate-limiting/exhaustion as the explanation — it's systematic, not video-specific.
Proof a manual yt-dlp session (same binary, same PO Token provider) reaches the full format range
Run from inside the same container, with no player_client override:
docker exec -it tubearchivist yt-dlp --extractor-args "youtubepot-bgutilhttp:base_url=http://bgutil-provider:4416" -F "https://www.youtube.com/watch?v=<id>"Output shows:
[youtube] <id>: Downloading visionos player API JSON
[youtube] <id>: Downloading m3u8 information
[youtube] [pot:bgutil:http] Generating a gvs PO Token for web client via bgutil HTTP server...followed by the full format list (144p through 1080p60, multiple codecs, ~19 audio language tracks with the original/default English track present).
A manual download with an explicit format string also succeeds correctly on a different video:
docker exec -it tubearchivist yt-dlp --cookies "/cache/cookies.txt" --extractor-args "youtubepot-bgutilhttp:base_url=http://bgutil-provider:4416" -f "bestvideo[height<=1080][vcodec^=avc1]+bestaudio[language^=en]/best[height<=1080]" --merge-output-format mp4 -o "%(title)s [%(id)s].%(ext)s" "https://www.youtube.com/watch?v=6B96xetwrqI"Result: 1920x1080 h264 video + English audio, merged correctly into .mp4.
The only meaningful difference between the manual session and TA's internal session is which player clients get negotiated — manual reaches visionos/web, TA's internal call only ever reaches web_embedded/tv_downgraded.
Ruled out
- yt-dlp version: confirmed current (
2026.08.19). - Download Format / Sort Format settings not applied: disproven — confirmed byte-for-byte correct in the logged yt-dlp config dict.
- PO Token / SABR provider not working: disproven — PO tokens are generated successfully on every attempt.
- Cookies: configured, validated, actively used (present in the logged config as
cookiefile). - Per-channel Download Format override: confirmed empty.
- Per-video rate limiting / exhaustion: disproven — reproduces identically on a completely fresh, previously untouched video ID immediately after a full container recreation.
- Stale settings / caching: retested after
docker compose down && docker compose up -d --force-recreatewith settings retyped from scratch. Identical result.
Relevant log output
Full sequence for `download_pending` task on video `QeCLr4NT27w` (DJANGO_DEBUG enabled, container recreated fresh immediately prior):
[2026-09-27 08:42:55,706: WARNING/ForkPoolWorker-4] {'default_search': 'ytsearch', 'socket_timeout': 10, 'extractor_retries': 3, 'retries': 10, 'cachedir': '/cache/ytdlp', 'plugin_dirs': [], 'merge_output_format': 'mp4', 'outtmpl': '/cache/download/%(id)s.mp4', 'progress_hooks': [...], 'noprogress': True, 'continuedl': True, 'writethumbnail': False, 'noplaylist': True, 'color': 'no_color', 'format': 'bestvideo+bestaudio/best', 'format_sort': ['res:1080', 'fps'], 'postprocessors': [{'key': 'FFmpegMetadata', 'add_chapters': True}], 'cookiefile': <_io.StringIO object>, 'extractor_args': {'youtubepot-bgutilhttp': {'base_url': ['http://bgutil-provider:4416']}}}
[youtube] Extracting URL: QeCLr4NT27w
[youtube] QeCLr4NT27w: Downloading webpage
[youtube] QeCLr4NT27w: Downloading web embedded client config
[youtube] QeCLr4NT27w: Downloading player <player-id>
[youtube] QeCLr4NT27w: Downloading web embedded player API JSON
[youtube] QeCLr4NT27w: Downloading tv downgraded player API JSON
[youtube] [jsc:deno] Solving JS challenges using deno
WARNING: [youtube] QeCLr4NT27w: Some web_embedded client https formats have been skipped as they are missing a URL. YouTube may have enabled the SABR-only streaming experiment for your account. See https://github.com/yt-dlp/yt-dlp/issues/12482 for more details
[youtube] [pot:bgutil:http] Generating a gvs PO Token for web client via bgutil HTTP server
[info] Testing format 18
[info] QeCLr4NT27w: Downloading 1 format(s): 18
[download] Destination: /cache/download/QeCLr4NT27w.mp4Anything else?
Related but distinct issues:
- #1029 (closed as
pending-release) covers the SABR/HLS-format-hiding symptom generally, and appears to be fixed for theextract_download/metadata path. This report shows the same underlying SABR restriction still affecting the actualdownload_pendingfile-download path, specifically because that session never negotiates a client outsideweb_embedded/tv_downgraded. - #905 and #650 report similar surface symptoms (wrong quality/format downloaded) but were closed — #905 correctly, as an outdated yt-dlp version at the time. That root cause does not apply here: yt-dlp is confirmed current, and this report pinpoints the actual mechanism (client negotiation) with a config-dict-level comparison between TA's internal call and a manual CLI call using the identical yt-dlp version and PO Token provider.
Suspected fix direction: TA's internal yt-dlp invocation may need to explicitly set a player_client extractor-arg (e.g., youtube:player_client=web,mweb or similar, per yt-dlp's current PO Token guidance recommending the mweb client for GVS PO Token use) rather than relying on yt-dlp's default client negotiation order, which in this environment consistently lands on the SABR-restricted web_embedded/tv_downgraded clients instead.
Happy to provide the full docker-compose configuration, test additional videos, or try suggested player_client values if that would help narrow this down further.
Source: tubearchivist/tubearchivist