Skip to content

Commit

Permalink
Enable vaapi, to support hardware acceleration (#106)
Browse files Browse the repository at this point in the history
* Enable vaapi

* Add libva

* Don't install recommended packages
  • Loading branch information
qmfrederik authored and jrottenberg committed Jun 21, 2018
1 parent 551fa61 commit f52782d
Show file tree
Hide file tree
Showing 38 changed files with 177 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker-images/2.8/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ RUN buildDeps="autoconf \
tar \
yasm \
zlib-dev \
libva-dev \
expat-dev" && \
apk add --no-cache --update ${buildDeps}
## opencore-amr https://sourceforge.net/projects/opencore-amr/
Expand Down Expand Up @@ -340,6 +341,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down Expand Up @@ -368,5 +370,8 @@ ENTRYPOINT ["ffmpeg"]

COPY --from=build /usr/local /usr/local

RUN \
apk add --no-cache --update libva

# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output
6 changes: 6 additions & 0 deletions docker-images/2.8/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ RUN buildDeps="autoconf \
tar \
yasm \
which \
libva-devel \
zlib-devel" && \
echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \
yum --enablerepo=extras install -y epel-release && \
Expand Down Expand Up @@ -341,6 +342,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down Expand Up @@ -369,5 +371,9 @@ ENV LD_LIBRARY_PATH=/usr/local/lib64

COPY --from=build /usr/local/ /usr/local/

RUN \
yum install -y libva && \
rm -rf /var/cache/yum

# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output
2 changes: 2 additions & 0 deletions docker-images/2.8/scratch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ RUN buildDeps="autoconf \
openssl-dev \
tar \
yasm \
libva-dev \
zlib-dev" && \
apk add --update ${buildDeps} libgcc libstdc++ ca-certificates libcrypto1.0 libssl1.0

Expand Down Expand Up @@ -336,6 +337,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down
7 changes: 7 additions & 0 deletions docker-images/2.8/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ RUN buildDeps="autoconf \
python \
libssl-dev \
yasm \
libva-dev \
zlib1g-dev" && \
apt-get -yqq update && \
apt-get install -yq --no-install-recommends ${buildDeps}
Expand Down Expand Up @@ -342,6 +343,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down Expand Up @@ -370,5 +372,10 @@ ENV LD_LIBRARY_PATH=/usr/local/lib

COPY --from=build /usr/local /usr/local/

RUN \
apt-get update -y && \
apt-get install -y --no-install-recommends libva-drm1 libva1 && \
rm -rf /var/lib/apt/lists/*

# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output
5 changes: 5 additions & 0 deletions docker-images/3.0/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ RUN buildDeps="autoconf \
tar \
yasm \
zlib-dev \
libva-dev \
expat-dev" && \
apk add --no-cache --update ${buildDeps}
## opencore-amr https://sourceforge.net/projects/opencore-amr/
Expand Down Expand Up @@ -340,6 +341,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down Expand Up @@ -368,5 +370,8 @@ ENTRYPOINT ["ffmpeg"]

COPY --from=build /usr/local /usr/local

RUN \
apk add --no-cache --update libva

# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output
6 changes: 6 additions & 0 deletions docker-images/3.0/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ RUN buildDeps="autoconf \
tar \
yasm \
which \
libva-devel \
zlib-devel" && \
echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \
yum --enablerepo=extras install -y epel-release && \
Expand Down Expand Up @@ -341,6 +342,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down Expand Up @@ -369,5 +371,9 @@ ENV LD_LIBRARY_PATH=/usr/local/lib64

COPY --from=build /usr/local/ /usr/local/

RUN \
yum install -y libva && \
rm -rf /var/cache/yum

# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output
2 changes: 2 additions & 0 deletions docker-images/3.0/scratch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ RUN buildDeps="autoconf \
openssl-dev \
tar \
yasm \
libva-dev \
zlib-dev" && \
apk add --update ${buildDeps} libgcc libstdc++ ca-certificates libcrypto1.0 libssl1.0

Expand Down Expand Up @@ -336,6 +337,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down
7 changes: 7 additions & 0 deletions docker-images/3.0/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ RUN buildDeps="autoconf \
python \
libssl-dev \
yasm \
libva-dev \
zlib1g-dev" && \
apt-get -yqq update && \
apt-get install -yq --no-install-recommends ${buildDeps}
Expand Down Expand Up @@ -342,6 +343,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down Expand Up @@ -370,5 +372,10 @@ ENV LD_LIBRARY_PATH=/usr/local/lib

COPY --from=build /usr/local /usr/local/

RUN \
apt-get update -y && \
apt-get install -y --no-install-recommends libva-drm1 libva1 && \
rm -rf /var/lib/apt/lists/*

# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output
5 changes: 5 additions & 0 deletions docker-images/3.1/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ RUN buildDeps="autoconf \
tar \
yasm \
zlib-dev \
libva-dev \
expat-dev" && \
apk add --no-cache --update ${buildDeps}
## opencore-amr https://sourceforge.net/projects/opencore-amr/
Expand Down Expand Up @@ -340,6 +341,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down Expand Up @@ -368,5 +370,8 @@ ENTRYPOINT ["ffmpeg"]

COPY --from=build /usr/local /usr/local

RUN \
apk add --no-cache --update libva

# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output
6 changes: 6 additions & 0 deletions docker-images/3.1/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ RUN buildDeps="autoconf \
tar \
yasm \
which \
libva-devel \
zlib-devel" && \
echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \
yum --enablerepo=extras install -y epel-release && \
Expand Down Expand Up @@ -341,6 +342,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down Expand Up @@ -369,5 +371,9 @@ ENV LD_LIBRARY_PATH=/usr/local/lib64

COPY --from=build /usr/local/ /usr/local/

RUN \
yum install -y libva && \
rm -rf /var/cache/yum

# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output
2 changes: 2 additions & 0 deletions docker-images/3.1/scratch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ RUN buildDeps="autoconf \
openssl-dev \
tar \
yasm \
libva-dev \
zlib-dev" && \
apk add --update ${buildDeps} libgcc libstdc++ ca-certificates libcrypto1.0 libssl1.0

Expand Down Expand Up @@ -336,6 +337,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down
7 changes: 7 additions & 0 deletions docker-images/3.1/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ RUN buildDeps="autoconf \
python \
libssl-dev \
yasm \
libva-dev \
zlib1g-dev" && \
apt-get -yqq update && \
apt-get install -yq --no-install-recommends ${buildDeps}
Expand Down Expand Up @@ -342,6 +343,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down Expand Up @@ -370,5 +372,10 @@ ENV LD_LIBRARY_PATH=/usr/local/lib

COPY --from=build /usr/local /usr/local/

RUN \
apt-get update -y && \
apt-get install -y --no-install-recommends libva-drm1 libva1 && \
rm -rf /var/lib/apt/lists/*

# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output
5 changes: 5 additions & 0 deletions docker-images/3.2/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ RUN buildDeps="autoconf \
tar \
yasm \
zlib-dev \
libva-dev \
expat-dev" && \
apk add --no-cache --update ${buildDeps}
## opencore-amr https://sourceforge.net/projects/opencore-amr/
Expand Down Expand Up @@ -340,6 +341,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down Expand Up @@ -368,5 +370,8 @@ ENTRYPOINT ["ffmpeg"]

COPY --from=build /usr/local /usr/local

RUN \
apk add --no-cache --update libva

# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output
6 changes: 6 additions & 0 deletions docker-images/3.2/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ RUN buildDeps="autoconf \
tar \
yasm \
which \
libva-devel \
zlib-devel" && \
echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \
yum --enablerepo=extras install -y epel-release && \
Expand Down Expand Up @@ -341,6 +342,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down Expand Up @@ -369,5 +371,9 @@ ENV LD_LIBRARY_PATH=/usr/local/lib64

COPY --from=build /usr/local/ /usr/local/

RUN \
yum install -y libva && \
rm -rf /var/cache/yum

# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output
2 changes: 2 additions & 0 deletions docker-images/3.2/scratch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ RUN buildDeps="autoconf \
openssl-dev \
tar \
yasm \
libva-dev \
zlib-dev" && \
apk add --update ${buildDeps} libgcc libstdc++ ca-certificates libcrypto1.0 libssl1.0

Expand Down Expand Up @@ -336,6 +337,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down
7 changes: 7 additions & 0 deletions docker-images/3.2/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ RUN buildDeps="autoconf \
python \
libssl-dev \
yasm \
libva-dev \
zlib1g-dev" && \
apt-get -yqq update && \
apt-get install -yq --no-install-recommends ${buildDeps}
Expand Down Expand Up @@ -342,6 +343,7 @@ RUN \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs=-ldl \
Expand Down Expand Up @@ -370,5 +372,10 @@ ENV LD_LIBRARY_PATH=/usr/local/lib

COPY --from=build /usr/local /usr/local/

RUN \
apt-get update -y && \
apt-get install -y --no-install-recommends libva-drm1 libva1 && \
rm -rf /var/lib/apt/lists/*

# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output
Loading

0 comments on commit f52782d

Please sign in to comment.