forked from markjlorenz/ffpmeg-gl
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgl_dockerfile
96 lines (82 loc) · 3.04 KB
/
gl_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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# docker build . -f gl_dockerfile -t clofus/ffmpeg:gl
FROM clofus/ffmpeg:base AS base
WORKDIR /tmp/workdir
ARG PKG_CONFIG_PATH=/opt/ffmpeg/lib/pkgconfig
ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib
ARG PREFIX=/opt/ffmpeg
ARG MAKEFLAGS="-j2"
COPY ./ffmpeg-gl-transition ${WORKDIR}/ffmpeg-gl-transition
COPY ./selections.conf ${WORKDIR}/selections.conf
RUN \
DEBIAN_FRONTEND=noninteractive apt-get install -yq debconf-utils
RUN \
debconf-set-selections < ${WORKDIR}/selections.conf
RUN \
DEBIAN_FRONTEND=noninteractive apt-get install -yq keyboard-configuration
# Install packages needed for gltransitions
RUN \
apt-get install -yq libass-dev libx265-dev libxvidcore-dev libnuma-dev libvpx-dev libx264-dev libopus-dev libglfw3 libglfw3-dev libglew1.13 libglew-dev glew-utils libxcb1 libxcb1-dev libxcb-shm0-dev libxcb-shm0 libxcb-xfixes0-dev libxcb-xfixes0 libgl1-mesa-glx xserver-xorg-video-dummy mesa-utils x11-apps
## ffmpeg https://ffmpeg.org/
RUN \
git clone http://source.ffmpeg.org/git/ffmpeg.git ${WORKDIR}/ffmpeg && \
cd ${WORKDIR}/ffmpeg && \
ln -s ${WORKDIR}/ffmpeg-gl-transition/vf_gltransition.c libavfilter/ && \
ls libavfilter && \
git apply ${WORKDIR}/ffmpeg-gl-transition/ffmpeg.diff && \
./configure \
--disable-debug \
--disable-doc \
--disable-ffplay \
--enable-shared \
--enable-avresample \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-filter=gltransition \
--enable-gpl \
--enable-libass \
--enable-libfreetype \
--enable-libvidstab \
--enable-libmp3lame \
--enable-libopenjpeg \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx265 \
--enable-libxvid \
--enable-libx264 \
--enable-nonfree \
--enable-opengl \
--enable-openssl \
--enable-libfdk_aac \
--enable-postproc \
--enable-small \
--enable-version3 \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" \
--extra-libs="-ldl -lGLEW -lglfw" \
--prefix="${PREFIX}" && \
make && \
make install && \
make distclean && \
hash -r && \
cd tools && \
make qt-faststart && \
cp qt-faststart ${PREFIX}/bin
## cleanup
RUN \
ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \
cp ${PREFIX}/bin/* /usr/local/bin/ && \
cp -r ${PREFIX}/share/ffmpeg /usr/local/share/ && \
LD_LIBRARY_PATH=/usr/local/lib ffmpeg -buildconf && \
ldconfig
# Get the dummyX11 config
RUN \
curl -sL http://xpra.org/xorg.conf > /etc/X11/xorg.conf
COPY ./init.sh /etc/init.sh
COPY ./filters /filters
CMD ["ffmpeg"]
ENTRYPOINT ["/etc/init.sh"]
ENV LD_LIBRARY_PATH=/usr/local/lib \
FONTCONFIG_PATH=/etc/fonts \
DISPLAY=:1