From 9907f0831f73322a8c008ed3c3a75c0a5e5316bf Mon Sep 17 00:00:00 2001 From: Jeff Sheffield Date: Thu, 14 Nov 2024 01:05:41 -0600 Subject: [PATCH] fix ffmpeg filter drawtext on the containers (#413) * fix drawtext on the containers --- CONTRIBUTING.md | 16 +++++++++------- docker-images/6.1/alpine320/Dockerfile | 7 +++++++ docker-images/6.1/alpine320/build_source.sh | 3 +++ docker-images/6.1/ubuntu2404-edge/Dockerfile | 6 ++++++ .../6.1/ubuntu2404-edge/build_source.sh | 3 +++ docker-images/6.1/ubuntu2404/Dockerfile | 8 +++++++- docker-images/6.1/ubuntu2404/build_source.sh | 3 +++ docker-images/6.1/vaapi2404/Dockerfile | 10 ++++++++-- docker-images/6.1/vaapi2404/build_source.sh | 3 +++ docker-images/7.0/alpine320/Dockerfile | 7 +++++++ docker-images/7.0/alpine320/build_source.sh | 3 +++ docker-images/7.0/nvidia2404/Dockerfile | 7 ++++++- docker-images/7.0/nvidia2404/build_source.sh | 2 ++ docker-images/7.0/scratch320/Dockerfile | 8 ++++++++ docker-images/7.0/scratch320/build_source.sh | 3 +++ docker-images/7.0/ubuntu2404-edge/Dockerfile | 6 ++++++ .../7.0/ubuntu2404-edge/build_source.sh | 3 +++ docker-images/7.0/ubuntu2404/Dockerfile | 8 +++++++- docker-images/7.0/ubuntu2404/build_source.sh | 3 +++ docker-images/7.0/vaapi2404/Dockerfile | 10 ++++++++-- docker-images/7.0/vaapi2404/build_source.sh | 3 +++ docker-images/7.1/alpine320/Dockerfile | 7 +++++++ docker-images/7.1/alpine320/build_source.sh | 3 +++ docker-images/7.1/nvidia2404/Dockerfile | 7 ++++++- docker-images/7.1/nvidia2404/build_source.sh | 2 ++ docker-images/7.1/scratch320/Dockerfile | 8 ++++++++ docker-images/7.1/scratch320/build_source.sh | 3 +++ docker-images/7.1/ubuntu2404-edge/Dockerfile | 6 ++++++ .../7.1/ubuntu2404-edge/build_source.sh | 3 +++ docker-images/7.1/ubuntu2404/Dockerfile | 8 +++++++- docker-images/7.1/ubuntu2404/build_source.sh | 3 +++ docker-images/7.1/vaapi2404/Dockerfile | 10 ++++++++-- docker-images/7.1/vaapi2404/build_source.sh | 3 +++ templates/Dockerfile-env-nvidia | 2 +- templates/Dockerfile-env-ubuntu | 2 +- templates/Dockerfile-env-vaapi | 2 +- templates/Dockerfile-template.alpine320 | 7 +++++++ templates/Dockerfile-template.nvidia2404 | 5 +++++ templates/Dockerfile-template.scratch320 | 8 ++++++++ templates/Dockerfile-template.ubuntu2404 | 6 ++++++ templates/Dockerfile-template.ubuntu2404-edge | 6 ++++++ templates/Dockerfile-template.vaapi2404 | 8 +++++++- update.py | 5 ++++- 43 files changed, 213 insertions(+), 23 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 02c40299..f9db58cf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,38 +55,38 @@ If you are not running the amd64 platform, you may need to pass in the --platfor - 7.1-ubuntu2404 ```sh -$ ./update.py; time docker build --platform linux/amd64 -t ffmpeg-7.1-ubuntu2404-desktop-build docker-images/7.1/ubuntu2404 +$ ./update.py; docker build --platform linux/amd64 -t ffmpeg-7.1-ubuntu2404-desktop-build docker-images/7.1/ubuntu2404 $ docker run -it --rm --entrypoint='bash' --platform="linux/amd64" ffmpeg-7.1-ubuntu2404-desktop-build:latest ``` - 7.1-ubuntu2404-edge ```sh -$ ./update.py; time docker build --platform linux/amd64 -t ffmpeg-7.1-ubuntu2404-edge-desktop-build docker-images/7.1/ubuntu2404-edge +$ ./update.py; docker build --platform linux/amd64 -t ffmpeg-7.1-ubuntu2404-edge-desktop-build docker-images/7.1/ubuntu2404-edge $ docker run -it --rm --entrypoint='bash' --platform="linux/amd64" ffmpeg-7.1-ubuntu2404-edge-desktop-build:latest ``` - 7.1-nvidia2404 ```sh -$ ./update.py; time docker build --platform linux/amd64 -t ffmpeg-7.1-nvidia2404-desktop-build docker-images/7.1/nvidia2404 +$ ./update.py; docker build --platform linux/amd64 -t ffmpeg-7.1-nvidia2404-desktop-build docker-images/7.1/nvidia2404 $ docker run -it --rm --entrypoint='bash' --platform="linux/amd64" ffmpeg-7.1-nvidia2404-desktop-build:latest ``` - vaapi2404 ```sh -$ ./update.py; time docker build --platform linux/amd64 -t ffmpeg-7.1-vaapi2404-desktop-build docker-images/7.1/vaapi2404 +$ ./update.py; docker build --platform linux/amd64 -t ffmpeg-7.1-vaapi2404-desktop-build docker-images/7.1/vaapi2404 $ docker run -it --rm --entrypoint='bash' --platform="linux/amd64" ffmpeg-7.1-vaapi2404-desktop-build:latest ``` - alpine320 ```sh -$ ./update.py; time docker build --platform linux/amd64 -t ffmpeg-7.1-alpine320-desktop-build docker-images/7.1/alpine320 +$ ./update.py; docker build --platform linux/amd64 -t ffmpeg-7.1-alpine320-desktop-build docker-images/7.1/alpine320 $ docker run -it --rm --entrypoint='sh' --platform="linux/amd64" ffmpeg-7.1-alpine320-desktop-build:latest ``` ```sh -$ ./update.py; time docker build --platform linux/amd64 -t ffmpeg-7.1-scratch320-desktop-build docker-images/7.1/scratch320 +$ ./update.py; docker build --platform linux/amd64 -t ffmpeg-7.1-scratch320-desktop-build docker-images/7.1/scratch320 $ docker run -it --rm --entrypoint='sh' --platform="linux/amd64" ffmpeg-7.1-scratch320-desktop-build:latest ``` @@ -110,6 +110,7 @@ In the bash shell, run the following commands but they are all there $ for i in ogg amr vorbis theora mp3lame opus vpx xvid fdk x264 x265;do echo $i; find /usr/local/ -name *$i*;done $ ffmpeg -buildconf + $ ffmpeg -filters 3: Convert an avi file to an mp4 file. `docker run --rm -v $(pwd):$(pwd) -w $(pwd) --platform="linux/amd64" ffmpeg-7.1-ubuntu2404-desktop-build:latest -i drop_video_1.avi outfile/dv_converted.mp4` @@ -117,8 +118,9 @@ In the bash shell, run the following commands 4: Convert a asf file to an mp4 `docker run --rm -v $(pwd):$(pwd) -w $(pwd) --platform="linux/amd64" ffmpeg-7.1-ubuntu2404-desktop-build:latest -i MU_2_Discharge_Bottle___Inlet_to_Discharge.asf outfile/mpu2_discharge_bottle_converted.mp4` +5: using a drawtext filter + `docker run --rm -v $(pwd):$(pwd) -w $(pwd) --platform="linux/amd64" jrottenberg/ffmpeg:7.1-ubuntu2404 -i sample-5s_1.mp4 -vf "drawtext=text='Stack Overflow':fontcolor=white:fontsize=24:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2" outfile/sample-5s_1_with_text.mp4` ``` - # Reviewing diff --git a/docker-images/6.1/alpine320/Dockerfile b/docker-images/6.1/alpine320/Dockerfile index c45ada3c..6b228434 100644 --- a/docker-images/6.1/alpine320/Dockerfile +++ b/docker-images/6.1/alpine320/Dockerfile @@ -99,6 +99,7 @@ RUN libDeps="libgomp \ fontconfig \ fontconfig-static \ fontconfig-dev \ + font-dejavu \ # https://github.com/libass/libass libass \ libass-dev \ @@ -198,6 +199,12 @@ RUN /tmp/workdir/install_ffmpeg.sh ### Release Stage FROM alpine:3.20 AS release # RUN apk add --no-cache --update bash less tree file vim +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local COPY --from=builder /tmp/fakeroot/ / diff --git a/docker-images/6.1/alpine320/build_source.sh b/docker-images/6.1/alpine320/build_source.sh index e5d8f57e..cb096e64 100644 --- a/docker-images/6.1/alpine320/build_source.sh +++ b/docker-images/6.1/alpine320/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/docker-images/6.1/ubuntu2404-edge/Dockerfile b/docker-images/6.1/ubuntu2404-edge/Dockerfile index ebec0926..817fb159 100644 --- a/docker-images/6.1/ubuntu2404-edge/Dockerfile +++ b/docker-images/6.1/ubuntu2404-edge/Dockerfile @@ -198,6 +198,12 @@ RUN /tmp/workdir/install_ffmpeg.sh # Stage 2: Final Image ( shrink the size back down ) FROM ubuntu:24.04 AS runtime +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local/ LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ diff --git a/docker-images/6.1/ubuntu2404-edge/build_source.sh b/docker-images/6.1/ubuntu2404-edge/build_source.sh index e5d8f57e..cb096e64 100644 --- a/docker-images/6.1/ubuntu2404-edge/build_source.sh +++ b/docker-images/6.1/ubuntu2404-edge/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/docker-images/6.1/ubuntu2404/Dockerfile b/docker-images/6.1/ubuntu2404/Dockerfile index 301e1eb3..24800618 100644 --- a/docker-images/6.1/ubuntu2404/Dockerfile +++ b/docker-images/6.1/ubuntu2404/Dockerfile @@ -81,7 +81,7 @@ ARG OPENJP_PKGS="libopenjp2-7 libopenjp2-7-dev" # libwebp7 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev # manpages manpages-dev rpcsvc-proto zlib1g-dev ARG FREETYPE_PKGS="libfreetype6-dev" -ARG FONTCONFIG_PKGS="libfontconfig-dev libfontconfig1 fontconfig-config fontconfig-config fonts-dejavu-core fonts-dejavu-mono" +ARG FONTCONFIG_PKGS="fontconfig libfontconfig-dev libfontconfig1 fontconfig-config fonts-dejavu-core fonts-dejavu-mono" ARG VIDSTAB_PKGS="libvidstab-dev libvidstab1.1" ARG FRIBIDI_PKGS="libfribidi-dev libfribidi0" # libass-dev wanted to install a boat-load of packages @@ -189,6 +189,12 @@ RUN /tmp/workdir/install_ffmpeg.sh # Stage 2: Final Image ( shrink the size back down ) FROM ubuntu:24.04 AS runtime +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local/ LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ diff --git a/docker-images/6.1/ubuntu2404/build_source.sh b/docker-images/6.1/ubuntu2404/build_source.sh index e5d8f57e..cb096e64 100644 --- a/docker-images/6.1/ubuntu2404/build_source.sh +++ b/docker-images/6.1/ubuntu2404/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/docker-images/6.1/vaapi2404/Dockerfile b/docker-images/6.1/vaapi2404/Dockerfile index 8a47e1f5..7dc7721f 100644 --- a/docker-images/6.1/vaapi2404/Dockerfile +++ b/docker-images/6.1/vaapi2404/Dockerfile @@ -81,7 +81,7 @@ ARG OPENJP_PKGS="libopenjp2-7 libopenjp2-7-dev" # libwebp7 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev # manpages manpages-dev rpcsvc-proto zlib1g-dev ARG FREETYPE_PKGS="libfreetype6-dev" -ARG FONTCONFIG_PKGS="libfontconfig-dev libfontconfig1 fontconfig-config fontconfig-config fonts-dejavu-core fonts-dejavu-mono" +ARG FONTCONFIG_PKGS="fontconfig libfontconfig-dev libfontconfig1 fontconfig-config fonts-dejavu-core fonts-dejavu-mono" ARG VIDSTAB_PKGS="libvidstab-dev libvidstab1.1" ARG FRIBIDI_PKGS="libfribidi-dev libfribidi0" # libass-dev wanted to install a boat-load of packages @@ -193,7 +193,13 @@ RUN /tmp/workdir/install_ffmpeg.sh # Stage 2: Final Image ( shrink the size back down ) -FROM ubuntu:24.04 +FROM ubuntu:24.04 AS runtime +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local/ LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ diff --git a/docker-images/6.1/vaapi2404/build_source.sh b/docker-images/6.1/vaapi2404/build_source.sh index 05da92ac..5cdb0ae2 100644 --- a/docker-images/6.1/vaapi2404/build_source.sh +++ b/docker-images/6.1/vaapi2404/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/docker-images/7.0/alpine320/Dockerfile b/docker-images/7.0/alpine320/Dockerfile index 52d1e6b9..98b92c65 100644 --- a/docker-images/7.0/alpine320/Dockerfile +++ b/docker-images/7.0/alpine320/Dockerfile @@ -99,6 +99,7 @@ RUN libDeps="libgomp \ fontconfig \ fontconfig-static \ fontconfig-dev \ + font-dejavu \ # https://github.com/libass/libass libass \ libass-dev \ @@ -198,6 +199,12 @@ RUN /tmp/workdir/install_ffmpeg.sh ### Release Stage FROM alpine:3.20 AS release # RUN apk add --no-cache --update bash less tree file vim +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local COPY --from=builder /tmp/fakeroot/ / diff --git a/docker-images/7.0/alpine320/build_source.sh b/docker-images/7.0/alpine320/build_source.sh index e5d8f57e..cb096e64 100644 --- a/docker-images/7.0/alpine320/build_source.sh +++ b/docker-images/7.0/alpine320/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/docker-images/7.0/nvidia2404/Dockerfile b/docker-images/7.0/nvidia2404/Dockerfile index 9aa44a7d..dd63f570 100644 --- a/docker-images/7.0/nvidia2404/Dockerfile +++ b/docker-images/7.0/nvidia2404/Dockerfile @@ -85,7 +85,7 @@ ARG OPENJP_PKGS="libopenjp2-7 libopenjp2-7-dev" # libwebp7 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev # manpages manpages-dev rpcsvc-proto zlib1g-dev ARG FREETYPE_PKGS="libfreetype6-dev" -ARG FONTCONFIG_PKGS="libfontconfig-dev libfontconfig1 fontconfig-config fontconfig-config fonts-dejavu-core fonts-dejavu-mono" +ARG FONTCONFIG_PKGS="fontconfig libfontconfig-dev libfontconfig1 fontconfig-config fonts-dejavu-core fonts-dejavu-mono" ARG VIDSTAB_PKGS="libvidstab-dev libvidstab1.1" ARG FRIBIDI_PKGS="libfribidi-dev libfribidi0" # libass-dev wanted to install a boat-load of packages @@ -213,6 +213,11 @@ COPY --from=builder /usr/local/share /usr/local/share/ COPY --from=builder /usr/local/lib /usr/local/lib/ COPY --from=builder /usr/local/include /usr/local/include/ +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video ENV DEBIAN_FRONTEND=nonintercative WORKDIR /tmp/workdir diff --git a/docker-images/7.0/nvidia2404/build_source.sh b/docker-images/7.0/nvidia2404/build_source.sh index 04275b3d..1aebe612 100644 --- a/docker-images/7.0/nvidia2404/build_source.sh +++ b/docker-images/7.0/nvidia2404/build_source.sh @@ -327,7 +327,9 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ diff --git a/docker-images/7.0/scratch320/Dockerfile b/docker-images/7.0/scratch320/Dockerfile index 53fd7301..e817c08e 100644 --- a/docker-images/7.0/scratch320/Dockerfile +++ b/docker-images/7.0/scratch320/Dockerfile @@ -65,6 +65,7 @@ RUN buildDeps="autoconf \ fribidi \ fribidi-static \ fribidi-dev\ + font-dejavu \ # https://github.com/libass/libass libass \ libass-dev\ @@ -197,6 +198,13 @@ RUN /tmp/workdir/install_ffmpeg.sh --strip ### Release Stage FROM alpine:3.20 AS release # RUN apk add --no-cache --update bash less tree file vim +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +# Probably don't want the fc-* utilities in the scratch image +# COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local COPY --from=builder /tmp/fakeroot/ / diff --git a/docker-images/7.0/scratch320/build_source.sh b/docker-images/7.0/scratch320/build_source.sh index e5d8f57e..cb096e64 100644 --- a/docker-images/7.0/scratch320/build_source.sh +++ b/docker-images/7.0/scratch320/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/docker-images/7.0/ubuntu2404-edge/Dockerfile b/docker-images/7.0/ubuntu2404-edge/Dockerfile index f4ac629f..4573b98c 100644 --- a/docker-images/7.0/ubuntu2404-edge/Dockerfile +++ b/docker-images/7.0/ubuntu2404-edge/Dockerfile @@ -198,6 +198,12 @@ RUN /tmp/workdir/install_ffmpeg.sh # Stage 2: Final Image ( shrink the size back down ) FROM ubuntu:24.04 AS runtime +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local/ LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ diff --git a/docker-images/7.0/ubuntu2404-edge/build_source.sh b/docker-images/7.0/ubuntu2404-edge/build_source.sh index e5d8f57e..cb096e64 100644 --- a/docker-images/7.0/ubuntu2404-edge/build_source.sh +++ b/docker-images/7.0/ubuntu2404-edge/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/docker-images/7.0/ubuntu2404/Dockerfile b/docker-images/7.0/ubuntu2404/Dockerfile index 7f5cb619..cda79a94 100644 --- a/docker-images/7.0/ubuntu2404/Dockerfile +++ b/docker-images/7.0/ubuntu2404/Dockerfile @@ -81,7 +81,7 @@ ARG OPENJP_PKGS="libopenjp2-7 libopenjp2-7-dev" # libwebp7 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev # manpages manpages-dev rpcsvc-proto zlib1g-dev ARG FREETYPE_PKGS="libfreetype6-dev" -ARG FONTCONFIG_PKGS="libfontconfig-dev libfontconfig1 fontconfig-config fontconfig-config fonts-dejavu-core fonts-dejavu-mono" +ARG FONTCONFIG_PKGS="fontconfig libfontconfig-dev libfontconfig1 fontconfig-config fonts-dejavu-core fonts-dejavu-mono" ARG VIDSTAB_PKGS="libvidstab-dev libvidstab1.1" ARG FRIBIDI_PKGS="libfribidi-dev libfribidi0" # libass-dev wanted to install a boat-load of packages @@ -189,6 +189,12 @@ RUN /tmp/workdir/install_ffmpeg.sh # Stage 2: Final Image ( shrink the size back down ) FROM ubuntu:24.04 AS runtime +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local/ LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ diff --git a/docker-images/7.0/ubuntu2404/build_source.sh b/docker-images/7.0/ubuntu2404/build_source.sh index e5d8f57e..cb096e64 100644 --- a/docker-images/7.0/ubuntu2404/build_source.sh +++ b/docker-images/7.0/ubuntu2404/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/docker-images/7.0/vaapi2404/Dockerfile b/docker-images/7.0/vaapi2404/Dockerfile index 44e8dabc..a26c8ebb 100644 --- a/docker-images/7.0/vaapi2404/Dockerfile +++ b/docker-images/7.0/vaapi2404/Dockerfile @@ -81,7 +81,7 @@ ARG OPENJP_PKGS="libopenjp2-7 libopenjp2-7-dev" # libwebp7 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev # manpages manpages-dev rpcsvc-proto zlib1g-dev ARG FREETYPE_PKGS="libfreetype6-dev" -ARG FONTCONFIG_PKGS="libfontconfig-dev libfontconfig1 fontconfig-config fontconfig-config fonts-dejavu-core fonts-dejavu-mono" +ARG FONTCONFIG_PKGS="fontconfig libfontconfig-dev libfontconfig1 fontconfig-config fonts-dejavu-core fonts-dejavu-mono" ARG VIDSTAB_PKGS="libvidstab-dev libvidstab1.1" ARG FRIBIDI_PKGS="libfribidi-dev libfribidi0" # libass-dev wanted to install a boat-load of packages @@ -193,7 +193,13 @@ RUN /tmp/workdir/install_ffmpeg.sh # Stage 2: Final Image ( shrink the size back down ) -FROM ubuntu:24.04 +FROM ubuntu:24.04 AS runtime +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local/ LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ diff --git a/docker-images/7.0/vaapi2404/build_source.sh b/docker-images/7.0/vaapi2404/build_source.sh index 05da92ac..5cdb0ae2 100644 --- a/docker-images/7.0/vaapi2404/build_source.sh +++ b/docker-images/7.0/vaapi2404/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/docker-images/7.1/alpine320/Dockerfile b/docker-images/7.1/alpine320/Dockerfile index 087704ab..eb7dd5be 100644 --- a/docker-images/7.1/alpine320/Dockerfile +++ b/docker-images/7.1/alpine320/Dockerfile @@ -99,6 +99,7 @@ RUN libDeps="libgomp \ fontconfig \ fontconfig-static \ fontconfig-dev \ + font-dejavu \ # https://github.com/libass/libass libass \ libass-dev \ @@ -198,6 +199,12 @@ RUN /tmp/workdir/install_ffmpeg.sh ### Release Stage FROM alpine:3.20 AS release # RUN apk add --no-cache --update bash less tree file vim +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local COPY --from=builder /tmp/fakeroot/ / diff --git a/docker-images/7.1/alpine320/build_source.sh b/docker-images/7.1/alpine320/build_source.sh index e5d8f57e..cb096e64 100644 --- a/docker-images/7.1/alpine320/build_source.sh +++ b/docker-images/7.1/alpine320/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/docker-images/7.1/nvidia2404/Dockerfile b/docker-images/7.1/nvidia2404/Dockerfile index 47b9532b..a58cb3b1 100644 --- a/docker-images/7.1/nvidia2404/Dockerfile +++ b/docker-images/7.1/nvidia2404/Dockerfile @@ -85,7 +85,7 @@ ARG OPENJP_PKGS="libopenjp2-7 libopenjp2-7-dev" # libwebp7 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev # manpages manpages-dev rpcsvc-proto zlib1g-dev ARG FREETYPE_PKGS="libfreetype6-dev" -ARG FONTCONFIG_PKGS="libfontconfig-dev libfontconfig1 fontconfig-config fontconfig-config fonts-dejavu-core fonts-dejavu-mono" +ARG FONTCONFIG_PKGS="fontconfig libfontconfig-dev libfontconfig1 fontconfig-config fonts-dejavu-core fonts-dejavu-mono" ARG VIDSTAB_PKGS="libvidstab-dev libvidstab1.1" ARG FRIBIDI_PKGS="libfribidi-dev libfribidi0" # libass-dev wanted to install a boat-load of packages @@ -213,6 +213,11 @@ COPY --from=builder /usr/local/share /usr/local/share/ COPY --from=builder /usr/local/lib /usr/local/lib/ COPY --from=builder /usr/local/include /usr/local/include/ +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video ENV DEBIAN_FRONTEND=nonintercative WORKDIR /tmp/workdir diff --git a/docker-images/7.1/nvidia2404/build_source.sh b/docker-images/7.1/nvidia2404/build_source.sh index 04275b3d..1aebe612 100644 --- a/docker-images/7.1/nvidia2404/build_source.sh +++ b/docker-images/7.1/nvidia2404/build_source.sh @@ -327,7 +327,9 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ diff --git a/docker-images/7.1/scratch320/Dockerfile b/docker-images/7.1/scratch320/Dockerfile index ddc1ebfc..4f645e31 100644 --- a/docker-images/7.1/scratch320/Dockerfile +++ b/docker-images/7.1/scratch320/Dockerfile @@ -65,6 +65,7 @@ RUN buildDeps="autoconf \ fribidi \ fribidi-static \ fribidi-dev\ + font-dejavu \ # https://github.com/libass/libass libass \ libass-dev\ @@ -197,6 +198,13 @@ RUN /tmp/workdir/install_ffmpeg.sh --strip ### Release Stage FROM alpine:3.20 AS release # RUN apk add --no-cache --update bash less tree file vim +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +# Probably don't want the fc-* utilities in the scratch image +# COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local COPY --from=builder /tmp/fakeroot/ / diff --git a/docker-images/7.1/scratch320/build_source.sh b/docker-images/7.1/scratch320/build_source.sh index e5d8f57e..cb096e64 100644 --- a/docker-images/7.1/scratch320/build_source.sh +++ b/docker-images/7.1/scratch320/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/docker-images/7.1/ubuntu2404-edge/Dockerfile b/docker-images/7.1/ubuntu2404-edge/Dockerfile index 0fa13d01..0389daa7 100644 --- a/docker-images/7.1/ubuntu2404-edge/Dockerfile +++ b/docker-images/7.1/ubuntu2404-edge/Dockerfile @@ -198,6 +198,12 @@ RUN /tmp/workdir/install_ffmpeg.sh # Stage 2: Final Image ( shrink the size back down ) FROM ubuntu:24.04 AS runtime +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local/ LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ diff --git a/docker-images/7.1/ubuntu2404-edge/build_source.sh b/docker-images/7.1/ubuntu2404-edge/build_source.sh index e5d8f57e..cb096e64 100644 --- a/docker-images/7.1/ubuntu2404-edge/build_source.sh +++ b/docker-images/7.1/ubuntu2404-edge/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/docker-images/7.1/ubuntu2404/Dockerfile b/docker-images/7.1/ubuntu2404/Dockerfile index fd76d1da..0acd0deb 100644 --- a/docker-images/7.1/ubuntu2404/Dockerfile +++ b/docker-images/7.1/ubuntu2404/Dockerfile @@ -81,7 +81,7 @@ ARG OPENJP_PKGS="libopenjp2-7 libopenjp2-7-dev" # libwebp7 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev # manpages manpages-dev rpcsvc-proto zlib1g-dev ARG FREETYPE_PKGS="libfreetype6-dev" -ARG FONTCONFIG_PKGS="libfontconfig-dev libfontconfig1 fontconfig-config fontconfig-config fonts-dejavu-core fonts-dejavu-mono" +ARG FONTCONFIG_PKGS="fontconfig libfontconfig-dev libfontconfig1 fontconfig-config fonts-dejavu-core fonts-dejavu-mono" ARG VIDSTAB_PKGS="libvidstab-dev libvidstab1.1" ARG FRIBIDI_PKGS="libfribidi-dev libfribidi0" # libass-dev wanted to install a boat-load of packages @@ -189,6 +189,12 @@ RUN /tmp/workdir/install_ffmpeg.sh # Stage 2: Final Image ( shrink the size back down ) FROM ubuntu:24.04 AS runtime +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local/ LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ diff --git a/docker-images/7.1/ubuntu2404/build_source.sh b/docker-images/7.1/ubuntu2404/build_source.sh index e5d8f57e..cb096e64 100644 --- a/docker-images/7.1/ubuntu2404/build_source.sh +++ b/docker-images/7.1/ubuntu2404/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/docker-images/7.1/vaapi2404/Dockerfile b/docker-images/7.1/vaapi2404/Dockerfile index 6e92f316..c7da0a9d 100644 --- a/docker-images/7.1/vaapi2404/Dockerfile +++ b/docker-images/7.1/vaapi2404/Dockerfile @@ -81,7 +81,7 @@ ARG OPENJP_PKGS="libopenjp2-7 libopenjp2-7-dev" # libwebp7 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev # manpages manpages-dev rpcsvc-proto zlib1g-dev ARG FREETYPE_PKGS="libfreetype6-dev" -ARG FONTCONFIG_PKGS="libfontconfig-dev libfontconfig1 fontconfig-config fontconfig-config fonts-dejavu-core fonts-dejavu-mono" +ARG FONTCONFIG_PKGS="fontconfig libfontconfig-dev libfontconfig1 fontconfig-config fonts-dejavu-core fonts-dejavu-mono" ARG VIDSTAB_PKGS="libvidstab-dev libvidstab1.1" ARG FRIBIDI_PKGS="libfribidi-dev libfribidi0" # libass-dev wanted to install a boat-load of packages @@ -193,7 +193,13 @@ RUN /tmp/workdir/install_ffmpeg.sh # Stage 2: Final Image ( shrink the size back down ) -FROM ubuntu:24.04 +FROM ubuntu:24.04 AS runtime +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local/ LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ diff --git a/docker-images/7.1/vaapi2404/build_source.sh b/docker-images/7.1/vaapi2404/build_source.sh index 05da92ac..5cdb0ae2 100644 --- a/docker-images/7.1/vaapi2404/build_source.sh +++ b/docker-images/7.1/vaapi2404/build_source.sh @@ -325,7 +325,10 @@ build_ffmpeg() { --enable-libbluray \ --enable-libdav1d \ --enable-libfdk-aac \ + --enable-libfontconfig \ --enable-libfreetype \ + --enable-libfribidi \ + --enable-libharfbuzz \ --enable-libkvazaar \ --enable-libmp3lame \ --enable-libopencore-amrnb \ diff --git a/templates/Dockerfile-env-nvidia b/templates/Dockerfile-env-nvidia index a12c4338..0edcf234 100644 --- a/templates/Dockerfile-env-nvidia +++ b/templates/Dockerfile-env-nvidia @@ -65,7 +65,7 @@ ARG OPENJP_PKGS="libopenjp2-7 libopenjp2-7-dev" # libwebp7 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev # manpages manpages-dev rpcsvc-proto zlib1g-dev ARG FREETYPE_PKGS="libfreetype6-dev" -ARG FONTCONFIG_PKGS="libfontconfig-dev libfontconfig1 fontconfig-config fontconfig-config fonts-dejavu-core fonts-dejavu-mono" +ARG FONTCONFIG_PKGS="fontconfig libfontconfig-dev libfontconfig1 fontconfig-config fonts-dejavu-core fonts-dejavu-mono" ARG VIDSTAB_PKGS="libvidstab-dev libvidstab1.1" ARG FRIBIDI_PKGS="libfribidi-dev libfribidi0" # libass-dev wanted to install a boat-load of packages diff --git a/templates/Dockerfile-env-ubuntu b/templates/Dockerfile-env-ubuntu index 31ec16fc..2cb62ab2 100644 --- a/templates/Dockerfile-env-ubuntu +++ b/templates/Dockerfile-env-ubuntu @@ -63,7 +63,7 @@ ARG OPENJP_PKGS="libopenjp2-7 libopenjp2-7-dev" # libwebp7 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev # manpages manpages-dev rpcsvc-proto zlib1g-dev ARG FREETYPE_PKGS="libfreetype6-dev" -ARG FONTCONFIG_PKGS="libfontconfig-dev libfontconfig1 fontconfig-config fontconfig-config fonts-dejavu-core fonts-dejavu-mono" +ARG FONTCONFIG_PKGS="fontconfig libfontconfig-dev libfontconfig1 fontconfig-config fonts-dejavu-core fonts-dejavu-mono" ARG VIDSTAB_PKGS="libvidstab-dev libvidstab1.1" ARG FRIBIDI_PKGS="libfribidi-dev libfribidi0" # libass-dev wanted to install a boat-load of packages diff --git a/templates/Dockerfile-env-vaapi b/templates/Dockerfile-env-vaapi index 31ec16fc..2cb62ab2 100644 --- a/templates/Dockerfile-env-vaapi +++ b/templates/Dockerfile-env-vaapi @@ -63,7 +63,7 @@ ARG OPENJP_PKGS="libopenjp2-7 libopenjp2-7-dev" # libwebp7 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev # manpages manpages-dev rpcsvc-proto zlib1g-dev ARG FREETYPE_PKGS="libfreetype6-dev" -ARG FONTCONFIG_PKGS="libfontconfig-dev libfontconfig1 fontconfig-config fontconfig-config fonts-dejavu-core fonts-dejavu-mono" +ARG FONTCONFIG_PKGS="fontconfig libfontconfig-dev libfontconfig1 fontconfig-config fonts-dejavu-core fonts-dejavu-mono" ARG VIDSTAB_PKGS="libvidstab-dev libvidstab1.1" ARG FRIBIDI_PKGS="libfribidi-dev libfribidi0" # libass-dev wanted to install a boat-load of packages diff --git a/templates/Dockerfile-template.alpine320 b/templates/Dockerfile-template.alpine320 index cc2fd230..db863044 100644 --- a/templates/Dockerfile-template.alpine320 +++ b/templates/Dockerfile-template.alpine320 @@ -92,6 +92,7 @@ RUN libDeps="libgomp \ fontconfig \ fontconfig-static \ fontconfig-dev \ + font-dejavu \ # https://github.com/libass/libass libass \ libass-dev \ @@ -171,6 +172,12 @@ RUN buildDeps="autoconf \ ### Release Stage FROM alpine:3.20 AS release # RUN apk add --no-cache --update bash less tree file vim +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local COPY --from=builder /tmp/fakeroot/ / diff --git a/templates/Dockerfile-template.nvidia2404 b/templates/Dockerfile-template.nvidia2404 index 0bab49c5..e84cd280 100644 --- a/templates/Dockerfile-template.nvidia2404 +++ b/templates/Dockerfile-template.nvidia2404 @@ -88,6 +88,11 @@ COPY --from=builder /usr/local/share /usr/local/share/ COPY --from=builder /usr/local/lib /usr/local/lib/ COPY --from=builder /usr/local/include /usr/local/include/ +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video ENV DEBIAN_FRONTEND=nonintercative WORKDIR /tmp/workdir diff --git a/templates/Dockerfile-template.scratch320 b/templates/Dockerfile-template.scratch320 index 32cba1be..08ffbec5 100644 --- a/templates/Dockerfile-template.scratch320 +++ b/templates/Dockerfile-template.scratch320 @@ -58,6 +58,7 @@ RUN buildDeps="autoconf \ fribidi \ fribidi-static \ fribidi-dev\ + font-dejavu \ # https://github.com/libass/libass libass \ libass-dev\ @@ -78,6 +79,13 @@ RUN buildDeps="autoconf \ ### Release Stage FROM alpine:3.20 AS release # RUN apk add --no-cache --update bash less tree file vim +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +# Probably don't want the fc-* utilities in the scratch image +# COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local COPY --from=builder /tmp/fakeroot/ / diff --git a/templates/Dockerfile-template.ubuntu2404 b/templates/Dockerfile-template.ubuntu2404 index 4a7665cd..7d8cc66a 100644 --- a/templates/Dockerfile-template.ubuntu2404 +++ b/templates/Dockerfile-template.ubuntu2404 @@ -70,6 +70,12 @@ RUN buildDeps="autoconf \ # Stage 2: Final Image ( shrink the size back down ) FROM ubuntu:24.04 AS runtime +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local/ LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ diff --git a/templates/Dockerfile-template.ubuntu2404-edge b/templates/Dockerfile-template.ubuntu2404-edge index 9637c6b6..3934cb3e 100644 --- a/templates/Dockerfile-template.ubuntu2404-edge +++ b/templates/Dockerfile-template.ubuntu2404-edge @@ -72,6 +72,12 @@ RUN buildDeps="autoconf \ # Stage 2: Final Image ( shrink the size back down ) FROM ubuntu:24.04 AS runtime +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local/ LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ diff --git a/templates/Dockerfile-template.vaapi2404 b/templates/Dockerfile-template.vaapi2404 index 68cb93e8..ab9ed672 100644 --- a/templates/Dockerfile-template.vaapi2404 +++ b/templates/Dockerfile-template.vaapi2404 @@ -70,7 +70,13 @@ RUN buildDeps="autoconf \ # Stage 2: Final Image ( shrink the size back down ) -FROM ubuntu:24.04 +FROM ubuntu:24.04 AS runtime +# Copy fonts and fontconfig from builder +COPY --from=builder /usr/share/fonts /usr/share/fonts +COPY --from=builder /usr/share/fontconfig /usr/share/fontconfig +COPY --from=builder /usr/bin/fc-* /usr/bin/ + +# Copy rest of the content COPY --from=builder /usr/local /usr/local/ LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ diff --git a/update.py b/update.py index 33afd9bc..568fbd04 100755 --- a/update.py +++ b/update.py @@ -201,7 +201,11 @@ def read_ffmpeg_template(variant_name, env_or_run="env"): "--enable-fontconfig", "--enable-libass", "--enable-libbluray", + # https://ffmpeg.org/ffmpeg-filters.html#drawtext-1 "--enable-libfreetype", + "--enable-libharfbuzz", + "--enable-libfontconfig", + "--enable-libfribidi", "--enable-libmp3lame", "--enable-libopencore-amrnb", "--enable-libopencore-amrwb", @@ -271,7 +275,6 @@ def read_ffmpeg_template(variant_name, env_or_run="env"): FFMPEG_CONFIG_FLAGS.append("--enable-cuda") FFMPEG_CONFIG_FLAGS.append("--enable-cuvid") FFMPEG_CONFIG_FLAGS.append("--enable-libnpp") - FFMPEG_CONFIG_FLAGS.append("--enable-libharfbuzz") if float(version[0:3]) >= 5.1: # from https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu#FFmpeg