-
Notifications
You must be signed in to change notification settings - Fork 966
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cffe07e
commit 823d964
Showing
7 changed files
with
134 additions
and
569 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# ffmpeg - http://ffmpeg.org/download.html | ||
# | ||
# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu | ||
# | ||
# https://hub.docker.com/r/jrottenberg/ffmpeg/ | ||
# | ||
# | ||
FROM ubuntu:22.04 | ||
|
||
ARG FFMPEG_VERSION="6.0" | ||
ARG X264_SHA="a8b68ebfaa68621b5ac8907610d3335971839d52" | ||
ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib" | ||
ARG MAKEFLAGS="-j6" | ||
ARG PKG_CONFIG_PATH="/opt/ffmpeg/share/pkgconfig:/opt/ffmpeg/lib/pkgconfig:/opt/ffmpeg/lib64/pkgconfig" | ||
ARG PREFIX="/opt/ffmpeg" | ||
ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib:/opt/ffmpeg/lib64" | ||
|
||
RUN apt update -y && \ | ||
apt install -y \ | ||
less \ | ||
curl \ | ||
bzip2 \ | ||
build-essential \ | ||
pkg-config | ||
|
||
WORKDIR /build/x264 | ||
|
||
RUN curl -o x264.tar.bz2 "https://code.videolan.org/videolan/x264/-/archive/${X264_SHA}/x264-${X264_SHA}.tar.bz2" | ||
|
||
RUN tar -jx --strip-components=1 -f x264.tar.bz2 | ||
|
||
WORKDIR /build/ffmpeg | ||
|
||
RUN curl -L -o ffmpeg.tar.bz2 "https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2" | ||
|
||
RUN tar -jx --strip-components=1 -f ffmpeg.tar.bz2 | ||
|
||
WORKDIR /build/x264 | ||
|
||
RUN ./configure \ | ||
--prefix="${PREFIX}" --enable-shared --enable-pic --disable-cli && \ | ||
make && \ | ||
make install | ||
|
||
WORKDIR /build/ffmpeg | ||
|
||
RUN ./configure \ | ||
--enable-gpl \ | ||
--enable-shared \ | ||
--disable-programs \ | ||
--enable-ffmpeg \ | ||
--disable-doc \ | ||
--disable-avdevice \ | ||
--disable-network \ | ||
--enable-pthreads \ | ||
--enable-ffmpeg \ | ||
--disable-avdevice \ | ||
--enable-avcodec \ | ||
--enable-avformat \ | ||
--enable-swresample \ | ||
--enable-swscale \ | ||
--enable-postproc \ | ||
--enable-avfilter \ | ||
--disable-encoders \ | ||
--enable-encoder=libx264 \ | ||
--enable-encoder=mjpeg \ | ||
--enable-encoder=pcm_s16le \ | ||
--disable-decoders \ | ||
--enable-decoder=aac \ | ||
--enable-decoder=h264 \ | ||
--disable-protocols \ | ||
--enable-protocol=file \ | ||
--disable-devices \ | ||
--enable-libx264 \ | ||
--disable-debug \ | ||
--extra-libs=-ldl \ | ||
--prefix="${PREFIX}" \ | ||
--extra-libs=-lpthread \ | ||
--extra-cflags="-I${PREFIX}/include" \ | ||
--extra-ldflags="-L${PREFIX}/lib" && \ | ||
make && \ | ||
make install | ||
|
||
ENV LD_LIBRARY_PATH /opt/ffmpeg/lib:/usr/local/lib | ||
|
||
RUN apt update -y && apt install -y cmake gdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp | ||
{ | ||
"name": "ffmpeg", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
|
||
"containerEnv": { | ||
"ARTIFACTORY_API_KEY": "${localEnv:ARTIFACTORY_API_KEY}" | ||
}, | ||
"capAdd": ["SYS_PTRACE"], | ||
"securityOpt": ["seccomp=unconfined"], | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
"settings": {}, | ||
"extensions": ["ms-vscode.cpptools", "ms-vscode.cmake-tools"] | ||
} | ||
} | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "gcc -v", | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.