Skip to content

Commit

Permalink
Add x264 support to local ffmpeg (#3383)
Browse files Browse the repository at this point in the history
* Add x264 support to local ffmpeg

* Add x264 support to local ffmpeg
  • Loading branch information
mjh1 authored Feb 7, 2025
1 parent 57dc107 commit ed11baa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN apt update \
&& curl -fsSl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& add-apt-repository "deb [arch=${BUILDARCH}] https://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-14 main" \
&& apt update \
&& apt -yqq install clang-14 clang-tools-14 lld-14 build-essential pkg-config autoconf git python docker-ce-cli pciutils gcc-multilib libgcc-8-dev-arm64-cross gcc-mingw-w64-x86-64 zlib1g zlib1g-dev
&& apt -yqq install clang-14 clang-tools-14 lld-14 build-essential pkg-config autoconf git python docker-ce-cli pciutils gcc-multilib libgcc-8-dev-arm64-cross gcc-mingw-w64-x86-64 zlib1g zlib1g-dev libx264-dev

RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 30 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 30 \
Expand All @@ -33,7 +33,7 @@ RUN GRPC_HEALTH_PROBE_VERSION=v0.3.6 \
RUN FFMPEG_SHA=b76053d8bf322b197a9d07bd27bbdad14fd5bc15 git clone --depth 1 https://git.ffmpeg.org/ffmpeg.git /ffmpeg \
&& cd /ffmpeg && git fetch --depth 1 origin ${FFMPEG_SHA} \
&& git checkout ${FFMPEG_SHA} \
&& ./configure --prefix=build && make -j"$(nproc)" && make install
&& ./configure --enable-gpl --enable-libx264 --prefix=build && make -j"$(nproc)" && make install

ENV GOPATH=/go \
GO_BUILD_DIR=/build/ \
Expand Down Expand Up @@ -68,6 +68,8 @@ FROM livepeer-${TARGETARCH}-base

ENV NVIDIA_DRIVER_CAPABILITIES=all

RUN apt update && apt install -y libx264-155

COPY --from=build /build/ /usr/local/bin/
COPY --from=build /usr/bin/grpc_health_probe /usr/local/bin/grpc_health_probe
COPY --from=build /src/tasmodel.pb /tasmodel.pb
Expand Down

0 comments on commit ed11baa

Please sign in to comment.