From 831063125d91372f43bbe37a5355ef61ead5d4b5 Mon Sep 17 00:00:00 2001 From: Jonathan Sykes Date: Sun, 23 Aug 2026 22:41:37 +0800 Subject: [PATCH] Enable bun as yt-dlp JS runtime to avoid throttled stream URLs --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index ec59de8..6c7b78d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,13 @@ RUN curl -fsSL \ -o /usr/local/bin/yt-dlp && \ chmod +x /usr/local/bin/yt-dlp +# yt-dlp needs a JS runtime to solve YouTube's "n" challenge. Without one the +# stream URLs it returns are THROTTLED to ~50 KB/s by googlevideo (720p +# playback stalled / fell back to 144p, saves crawled) and some formats go +# missing. Only deno is enabled by default; bun is already in this image, so +# enable it via the system-wide config every yt-dlp invocation reads. +RUN printf -- '--js-runtimes bun:/usr/local/bin/bun\n' > /etc/yt-dlp.conf + WORKDIR /app # ---- Install Node/Bun deps ----