|
|
@@ -192,6 +192,10 @@ RUN set -eux; \
|
|
|
test -f /out/index.html
|
|
|
|
|
|
|
|
|
+# -----------------------------------------------------------------------------
|
|
|
+# Build the legacy Pixelflux capture library required by pixelflux 1.6.4
|
|
|
+# -----------------------------------------------------------------------------
|
|
|
+
|
|
|
FROM docker.io/library/ubuntu:${DISTRIB_RELEASE} AS pixelflux-legacy-builder
|
|
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
@@ -219,45 +223,30 @@ RUN apt-get update \
|
|
|
|
|
|
WORKDIR /tmp/pixelflux
|
|
|
|
|
|
-RUN curl -fsSL \
|
|
|
+RUN set -eux; \
|
|
|
+ curl -fsSL \
|
|
|
"https://codeload.github.com/linuxserver/pixelflux/tar.gz/refs/tags/${PIXELFLUX_VERSION}" \
|
|
|
- -o /tmp/pixelflux.tar.gz \
|
|
|
- && tar -xzf /tmp/pixelflux.tar.gz \
|
|
|
+ -o /tmp/pixelflux.tar.gz; \
|
|
|
+ tar -xzf /tmp/pixelflux.tar.gz \
|
|
|
--strip-components=1 \
|
|
|
- -C /tmp/pixelflux \
|
|
|
- && mkdir -p /out \
|
|
|
- && test -f /usr/include/va/va.h \
|
|
|
- && test -f /usr/include/va/va_drm.h \
|
|
|
- && test -f /usr/include/libdrm/drm.h \
|
|
|
- && pkg-config --exists libavcodec libavutil libva libdrm x11 xext xfixes \
|
|
|
- && g++ \
|
|
|
- -std=c++17 \
|
|
|
- -Wno-unused-function \
|
|
|
- -fPIC \
|
|
|
- -O3 \
|
|
|
- -flto \
|
|
|
- -shared \
|
|
|
- -Ipixelflux/include \
|
|
|
- -o /out/screen_capture_module.so \
|
|
|
- pixelflux/screen_capture_module.cpp \
|
|
|
- pixelflux/include/xxhash.c \
|
|
|
- -lX11 \
|
|
|
- -lXext \
|
|
|
- -lXfixes \
|
|
|
- -ljpeg \
|
|
|
- -lx264 \
|
|
|
- -lyuv \
|
|
|
- -ldl \
|
|
|
- -lavcodec \
|
|
|
- -lavutil \
|
|
|
- && test -s /out/screen_capture_module.so \
|
|
|
- && ! ldd /out/screen_capture_module.so | grep -q "not found"
|
|
|
- && g++ \
|
|
|
+ -C /tmp/pixelflux; \
|
|
|
+ install -d -m 0755 /out; \
|
|
|
+ test -f /usr/include/va/va.h; \
|
|
|
+ test -f /usr/include/va/va_drm.h; \
|
|
|
+ test -f /usr/include/libdrm/drm.h; \
|
|
|
+ pkg-config --exists \
|
|
|
+ libavcodec \
|
|
|
+ libavutil \
|
|
|
+ libva \
|
|
|
+ libdrm \
|
|
|
+ x11 \
|
|
|
+ xext \
|
|
|
+ xfixes; \
|
|
|
+ g++ \
|
|
|
-std=c++17 \
|
|
|
-Wno-unused-function \
|
|
|
-fPIC \
|
|
|
- -O3 \
|
|
|
- -flto \
|
|
|
+ -O2 \
|
|
|
-shared \
|
|
|
-Ipixelflux/include \
|
|
|
-o /out/screen_capture_module.so \
|
|
|
@@ -271,8 +260,13 @@ RUN curl -fsSL \
|
|
|
-lyuv \
|
|
|
-ldl \
|
|
|
-lavcodec \
|
|
|
- -lavutil \
|
|
|
- && test -s /out/screen_capture_module.so
|
|
|
+ -lavutil; \
|
|
|
+ test -s /out/screen_capture_module.so; \
|
|
|
+ ldd /out/screen_capture_module.so | tee /tmp/pixelflux-ldd.txt; \
|
|
|
+ if grep -q "not found" /tmp/pixelflux-ldd.txt; then \
|
|
|
+ echo "Missing Pixelflux shared-library dependency"; \
|
|
|
+ exit 1; \
|
|
|
+ fi
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
# Final image
|
|
|
@@ -311,7 +305,7 @@ ENV TZ="${TZ}" \
|
|
|
XDG_SESSION_TYPE="x11" \
|
|
|
SELKIES_MODE="websockets" \
|
|
|
SELKIES_PORT="8081" \
|
|
|
- SELKIES_ENCODER="h264enc" \
|
|
|
+ SELKIES_ENCODER="x264enc" \
|
|
|
SELKIES_ENABLE_RESIZE="false" \
|
|
|
SELKIES_ENABLE_BASIC_AUTH="true" \
|
|
|
NVIDIA_VISIBLE_DEVICES="all" \
|
|
|
@@ -512,6 +506,11 @@ RUN apt-get update \
|
|
|
apache2-utils \
|
|
|
nginx \
|
|
|
netcat-openbsd \
|
|
|
+ libavcodec60 \
|
|
|
+ libavutil58 \
|
|
|
+ libjpeg-turbo8 \
|
|
|
+ libx264-164 \
|
|
|
+ libyuv0 \
|
|
|
&& apt-get clean \
|
|
|
&& rm -rf \
|
|
|
/var/lib/apt/lists/* \
|