-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix ffmpeg filter drawtext on the containers (#413)
* fix drawtext on the containers
- Loading branch information
Showing
43 changed files
with
213 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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,15 +110,17 @@ 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` | ||
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:[email protected]:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2" outfile/sample-5s_1_with_text.mp4` | ||
``` | ||
|
||
</details> | ||
|
||
# Reviewing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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="[email protected]" \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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="[email protected]" \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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="[email protected]" \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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="[email protected]" \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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="[email protected]" \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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="[email protected]" \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.