Skip to content

Commit

Permalink
Add youtube-dl binary. v5.15.12
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jul 9, 2024
1 parent cf2465e commit 756af23
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,7 @@ The following are the update records for the Oryx server.
* Dubbing: Support scrolling card in fullscreen. v5.15.9
* Support external redis host and using 127.0.0.1 as default. v5.15.10
* Support setup global OpenAI settings. [v5.15.11](https://github.com/ossrs/oryx/releases/tag/v5.15.11)
* Add youtube-dl binary. v5.15.12
* v5.14:
* Merge features and bugfix from releases. v5.14.1
* Dubbing: Support VoD dubbing for multiple languages. [v5.14.2](https://github.com/ossrs/oryx/releases/tag/v5.14.2)
Expand Down
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ ADD usr /g/usr
ADD test /g/test
ADD Makefile /g/Makefile

# For node to use more memory to fix: JavaScript heap out of memory
ENV NODE_OPTIONS="--max-old-space-size=4096"

# By default, make all, including platform and ui, but it will take a long time,
# so there is a MAKEARGS to build without UI, see platform.yml.
WORKDIR /g
Expand All @@ -50,6 +53,19 @@ RUN echo "Before UPX for $TARGETARCH" && \
echo "After UPX for $TARGETARCH" && \
ls -lh /usr/local/srs/objs/srs /usr/local/oryx/platform/platform

# For youtube-dl, see https://github.com/ytdl-org/ytdl-nightly
FROM ${ARCH}python:3.9-slim-bullseye AS ytdl

RUN apt-get update -y && apt-get install -y binutils curl unzip && \
pip install pyinstaller

WORKDIR /g
RUN curl -O -L https://github.com/ytdl-org/youtube-dl/archive/refs/heads/master.zip && \
unzip -q master.zip && cd youtube-dl-master && \
pyinstaller --onefile --clean --noconfirm --name youtube-dl youtube_dl/__main__.py && \
cp dist/youtube-dl /usr/local/bin/ && \
ldd /usr/local/bin/youtube-dl

# http://releases.ubuntu.com/focal/
#FROM ${ARCH}ubuntu:focal AS dist
FROM ${ARCH}ossrs/oryx:focal-1 AS dist
Expand All @@ -60,6 +76,7 @@ EXPOSE 2022 2443 1935 8080 5060 9000 8000/udp 10080/udp
# Copy files from build.
COPY --from=build /usr/local/oryx /usr/local/oryx
COPY --from=build /usr/local/srs /usr/local/srs
COPY --from=ytdl /usr/local/bin/youtube-dl /usr/local/bin/

# Prepare data directory.
RUN mkdir -p /data && \
Expand Down

0 comments on commit 756af23

Please sign in to comment.