initial commmit
A video player controller for the video player node
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
# System deps: ffmpeg for muxing, nodejs for yt-dlp JS runtime, ca-certs for TLS
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ffmpeg \
|
||||
nodejs \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Optional but strongly recommended: keep yt-dlp fresh (only if installed via pip)
|
||||
RUN python -m pip install --no-cache-dir -U yt-dlp
|
||||
|
||||
# Make yt-dlp defaults persistent (so your subprocess call doesn't need flags)
|
||||
# 1) tell yt-dlp to use node as JS runtime
|
||||
# 2) (optional) force android client to dodge SABR weirdness more often
|
||||
RUN mkdir -p /etc/yt-dlp && printf "%s\n" \
|
||||
"--js-runtimes node" \
|
||||
"--extractor-args youtube:player_client=android" \
|
||||
> /etc/yt-dlp.conf
|
||||
|
||||
COPY app.py ./app.py
|
||||
COPY controller_core.py ./controller_core.py
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
EXPOSE 8000
|
||||
CMD ["python", "app.py"]
|
||||
Reference in New Issue
Block a user