forked from pocka/docker-ffmpeg-vaapi
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
58 lines (53 loc) · 1.82 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM centos:7.3.1611
MAINTAINER Sho Fuji <[email protected]>
CMD ["--help"]
ENTRYPOINT ["ffmpeg"]
WORKDIR /work
ENV TARGET_VERSION=4.0 \
LIBVA_VERSION=1.8.2 \
LIBDRM_VERSION=2.4.80 \
SRC=/usr \
PKG_CONFIG_PATH=/usr/lib/pkgconfig
RUN yum install -y --enablerepo=extras epel-release yum-utils && \
# Install libdrm
yum install -y libdrm libdrm-devel && \
# Install build dependencies
build_deps="automake autoconf bzip2 \
cmake freetype-devel gcc \
gcc-c++ git libtool make \
mercurial nasm pkgconfig \
yasm zlib-devel" && \
yum install -y ${build_deps} && \
# Build libva
DIR=$(mktemp -d) && cd ${DIR} && \
curl -sL https://www.freedesktop.org/software/vaapi/releases/libva/libva-${LIBVA_VERSION}.tar.bz2 | \
tar -jx --strip-components=1 && \
./configure CFLAGS=' -O2' CXXFLAGS=' -O2' --prefix=${SRC} && \
make && make install && \
rm -rf ${DIR} && \
# Build libva-intel-driver
DIR=$(mktemp -d) && cd ${DIR} && \
curl -sL https://www.freedesktop.org/software/vaapi/releases/libva-intel-driver/intel-vaapi-driver-${LIBVA_VERSION}.tar.bz2 | \
tar -jx --strip-components=1 && \
./configure && \
make && make install && \
rm -rf ${DIR} && \
# Build ffmpeg
DIR=$(mktemp -d) && cd ${DIR} && \
curl -sL http://ffmpeg.org/releases/ffmpeg-${TARGET_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
./configure \
--prefix=${SRC} \
--enable-small \
--enable-gpl \
--enable-vaapi \
--disable-doc \
--disable-debug && \
make && make install && \
make distclean && \
hash -r && \
# Cleanup build dependencies and temporary files
rm -rf ${DIR} && \
yum history -y undo last && \
yum clean all && \
ffmpeg -buildconf