Enable bun as yt-dlp JS runtime to avoid throttled stream URLs

This commit is contained in:
Jonathan Sykes
2026-08-23 22:41:37 +08:00
parent 8177f5c665
commit 831063125d

View File

@@ -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 ----