Git Product home page Git Product logo

static-ffmpeg's Issues

UPX worthiness

Have you played with UPX at all? I figure it sometimes GREATLY reduces my binaries but sometimes, without having any knowledge of how (truly), it makes them almost unusable even thoe they run correctly at facevalue. Maybe worth investigating...

[Bug] Custom font config in `/etc/fonts/conf.d` not working due to missing fontconfig binaries

Problem

With FFmpeg 7.0.1 image, the currently installed fontconfig for is 2.15.0 (as seen from the version.json), which has a /etc/fonts/fonts.conf like so:

/etc/fonts/fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>
        <description>Default configuration file</description>

<!--
        DO NOT EDIT THIS FILE.
        IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
        LOCAL CHANGES BELONG IN 'local.conf'.

        The intent of this standard configuration file is to be adequate for
        most environments.  If you have a reasonably normal environment and
        have found problems with this configuration, they are probably
        things that others will also want fixed.  Please submit any problems
        to the fontconfig issue tracking system located at fontconfig.org

        Note that the normal 'make install' procedure for fontconfig is to
        replace any existing fonts.conf file with the new version.  Place
        any local customizations in local.conf which this file references.

        Keith Packard
-->

<!-- Font directory list -->

        <dir>/usr/share/fonts</dir>

        <dir prefix="xdg">fonts</dir>
        <!-- the following element will be removed in the future -->
        <dir>~/.fonts</dir>

<!--
  Accept deprecated 'mono' alias, replacing it with 'monospace'
-->
        <match target="pattern">
                <test qual="any" name="family">
                        <string>mono</string>
                </test>
                <edit name="family" mode="assign" binding="same">
                        <string>monospace</string>
                </edit>
        </match>

<!--
  Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
-->
        <match target="pattern">
                <test qual="any" name="family">
                        <string>sans serif</string>
                </test>
                <edit name="family" mode="assign" binding="same">
                        <string>sans-serif</string>
                </edit>
        </match>

<!--
  Accept deprecated 'sans' alias, replacing it with 'sans-serif'
-->
        <match target="pattern">
                <test qual="any" name="family">
                        <string>sans</string>
                </test>
                <edit name="family" mode="assign" binding="same">
                        <string>sans-serif</string>
                </edit>
        </match>
<!--
  Accept alternate 'system ui' spelling, replacing it with 'system-ui'
-->
        <match target="pattern">
                <test qual="any" name="family">
                        <string>system ui</string>
                </test>
                <edit name="family" mode="assign" binding="same">
                        <string>system-ui</string>
                </edit>
        </match>

<!--
  Load local system customization file
-->
        <include ignore_missing="yes">conf.d</include>

<!-- Font cache directory list -->

        <cachedir>/var/cache/fontconfig</cachedir>
        <cachedir prefix="xdg">fontconfig</cachedir>
        <!-- the following element will be removed in the future -->
        <cachedir>~/.fontconfig</cachedir>

        <config>
<!--
  Rescan configuration every 30 seconds when FcFontSetList is called
 -->
                <rescan>
                        <int>30</int>
                </rescan>
        </config>

</fontconfig>

If I want to use custom font config to allow for more font directories (e.g. /usr/localx/share/fonts), I have to create a custom config in /etc/fonts/conf.d. The problem however is, that even if I add a custom config, it will not be used as it seems the image is missing fontconfig binaries (don't seem to be copied in final1 stage).

So even if I mounted a custom config now, when running FFmpeg this will lead to fonts not being found:

[Parsed_subtitles_0 @ 0x7f7683b39a80] fontselect: failed to find any fallback with glyph 0x0 for font: (Arial, 400, 0)

A workaround is to manually install fontconfig and no longer copy the /etc/fonts directory.

COPY --from=mwader/static-ffmpeg:7.0.1 /ffmpeg /usr/bin/
COPY --from=mwader/static-ffmpeg:7.0.1 /ffprobe /usr/bin/
# Not copying /etc/fonts as it causes conflicts reinstalling later
# COPY --from=mwader/static-ffmpeg:7.0.1 /etc/fonts /etc/fonts 

# Installs fontconfig `2.14.1-4`
RUN set -ex \
    && apt-get update \
    && apt install -y fontconfig

# Custom config containing the fonts directory "/usr/localx/share/fonts"
COPY <<EOF /etc/fonts/conf.d/50-custom.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
  <dir>/usr/localx/share/fonts</dir>
</fontconfig>
EOF

When running FFmpeg now I see the font being found:

[Parsed_subtitles_0 @ 0x7f6c30969a80] fontselect: (Arial, 400, 0) -> /usr/localx/share/fonts/Arial Narrow.TTF, 0, ArialNarrow

Solution

Add the fontconfig binaries to the final1 stage so they can be copied as well (?)

build issue

Step 102/151 : COPY --from=cargo-c /usr/local/cargo/bin/cargo-c* /usr/bin When using COPY with more than one source file, the destination must be a directory and end with a /
this seems new. at least i never seen this.

AC3 support?

This is missing AC3 support. Any chance you could add it? Thanks!

LLVM issue with rust install

Step 86/129 : RUN apk add --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community rust cargo
 ---> Running in e56df34cd89f
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
ERROR: unable to select packages:
  so:libLLVM-12.so (no such package):
    required by: rust-1.55.0-r2[so:libLLVM-12.so]
The command '/bin/sh -c apk add --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community rust cargo' returned a non-zero code: 3

Caching research

After some tweaks and enabling caching, I was able to get the build down to 10 minutes for an added library (libsnappy) and 1 minute for non-Dockerfile changes. Updating x265 took about 17 minutes. I think this is the way to go for speed.

What I did to my repo:

  • Move most ARGs to the top
  • Inherit ARGs only where needed
  • Enable caching for GitHub actions docker builds
  • Parallelize the builds by breaking them up into multi-stage
  • Use COPY command to copy only files needed from previous stages
  • Added several new libraries

Build fails

Hi

the following line fails since tonight:

$ echo "0644d73d4dcb8171c465334dba891b0965311f9ec66b1987805c2882afa0cc58 libssh.tar.gz" | sha256sum -c -
libssh.tar.gz: FAILED
sha256sum: WARNING: 1 computed checksum did NOT match

I have no clue why and how to fix, maybe it will fix itself somehow in the next days, please just have a look.

Thank you!

Add SVT-VP9 codec

As the reference encoder for VP9 is very slow this looks like the only sane way to use vp9 with ffmpeg to me.
https://github.com/OpenVisualCloud/SVT-VP9

I tried adding it myself but as have no idea what im doing regarding C/C++/make/ffmpeg I didn't manage to create a working version.

They explain the use of a git patch over here: https://github.com/OpenVisualCloud/SVT-VP9/tree/master/ffmpeg_plugin but this doesn't work for me with your Dockerfile.

Thank you for creating this project!

This is what I've adapted from your code for SVT-VP9.

ARG SVTVP9_VERSION=0.3.0
ARG SVTVP9_URL="https://github.com/OpenVisualCloud/SVT-VP9/archive/refs/tags/v$SVTVP9_VERSION.tar.gz"
ARG SVTVP9_SHA256=6ee01b81c43816170b18709c6045b6245cecc2953f01cecc9e98f82b49ea4f73
RUN \
  wget $WGET_OPTS -O svt-vp9.tar.gz "$SVTVP9_URL" && \
  echo "$SVTVP9_SHA256  svt-vp9.tar.gz" | sha256sum --status -c - && \
  tar xf svt-vp9.tar.gz && \
  cd SVT-VP9-* && \
  mkdir -p build && cd build && \
  cmake \
    -G"Unix Makefiles" \
    -DCMAKE_VERBOSE_MAKEFILE=ON \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DBUILD_SHARED_LIBS=OFF \
    -DCMAKE_BUILD_TYPE=Release \
    .. && \
  make -j$(nproc) && make install

ffmpeg: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

Hiya.

Thanks for the amazing work that went in to this project. - monumental !!

Building and running form the latest Master when starting the container i get shared library error
ffmpeg | ffmpeg: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

going over the Dockerfile i cant see anything pointing at it being shared.

Any clues would be appreciated

svyatko

OpenSSL issue with binary outside container (RedHat/Fedora specific)

I use the product of this great project on various systems and since aome of them have no running docker instance, i've got the habbit of copying the binaries from the image to a distribution server which is then used to update other systems where i use ffmpeg and friend.

I recently came upon a ssl error while using ffprobe and found out, after some digging, that RedHat flavored distributions apply a patch to modify openssl config file in order to add special, distro-specific config parameters which in turn is unrecognized from an unpatched openssl instance.

[tls @ 0x7f80c8ec3800] error:030000A9:digital envelope routines::unknown option

I first tried adding -reconnect_on_network_error true to my ffprobe command with some success.
the initial error message still shows but the command is ran without problems afterwards.

After some research.. i found this openssl/openssl#23016

I then found what ultimately works for me which is explained in my comment HERE

file /etc/crypto-policies/back-ends/opensslcnf.config contains the unrecognized config argument (Fedora set to yes and no on RedHat)

[evp_properties] rh-allow-sha1-signatures = yes

I raise this to let you know about my issue and how i 'fixed' it so you can see if it's worth including in the readme file somehow.

ENABLE_FDKAAC=1 not working

Building image with:
docker build --build-arg ENABLE_FDKAAC=1 . -t my-ffmpeg-static:latest

Then extracting binaries and running, results in no --enable-libfdk-aac:
`ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 13.2.1 (Alpine 13.2.1_git20231014) 20231014
configuration: --pkg-config-flags=--static --extra-cflags=-fopenmp --extra-ldflags='-fopenmp -Wl,-z,stack-size=2097152' --toolchain=hardened --disable-debug --disable-shared --disable-ffplay --enable-static --enable-gpl --enable-version3 --enable-fontconfig --enable-gray --enable-iconv --enable-lcms2 --enable-libaom --enable-libaribb24 --enable-libass --enable-libbluray --enable-libdav1d --enable-libdavs2 --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libkvazaar --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librabbitmq --enable-librav1e --enable-librtmp --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openssl --enable-libjxl
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'`

Cannot resolve another docker container hostname

I'm trying to ffmpeg -i http://other_container but it cannot resolve the hostname.

/app # ping server
PING server (172.23.0.4): 56 data bytes
64 bytes from 172.23.0.4: seq=0 ttl=64 time=0.068 ms
drill64 bytes from 172.23.0.4: seq=1 ttl=64 time=0.073 ms
^C
--- server ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.068/0.070/0.073 ms
/app # apk add drill
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
(1/2) Installing ldns (1.7.2_git20210911-r1)

;; ANSWER SECTION:
server. 600     IN      A       172.23.0.4

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 0 msec
;; SERVER: 127.0.0.11
;; WHEN: Thu Aug  4 09:51:48 2022
;; MSG SIZE  rcvd: 46
/app # ffmpeg -i http://server/
ffmpeg version 4.4.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disabl
e-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable
-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrn
b --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --e
nable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libweb
p --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[tcp @ 0x5df1640] Failed to resolve hostname server: System error
http://server/: Input/output error

I'm not sure what to do here... I remember having a similar problem with nginx that was solved by changing the configuration, but I don't know how to apply that here.

In the meanwhile I'm using a different image tnk4on/yt-dlp:alpine-pip instead of tnk4on/yt-dlp:alpine-static and that seems to fix the issue.

librav1e produces segfault

Trying to encode a file into av1 with librav1e results in segfault

podman run -it --rm -v "$PWD:$PWD" -w "$PWD" docker.io/mwader/static-ffmpeg -v debug -i PXL_20240630_122849440.mp4 -c:v librav1e 'PXL_20240630_122849440.av1.mp4'; echo $?

There is no output, but dmesg shows:

librav1e[2506]: segfault at 0 ip 00007f7e713a5b48 sp 00007f7e6b3ac0f0 error 6 in ffmpeg[7f7e6d895000+5b11000] likely on CPU 3 (core 3, socket 0)

Copying the ffmpeg bin from container to host results in the same error.

Thank you

You are a true lifesaver. Thank you for this!

More architectures like arm32, riscv etc

Current issues are:

  • Problem finding hosting providing native ARM32, RISCV etc hosts
  • Cross compile is messy
  • Emulated docker builds a bit less messy but have issues:
    • Emulation is user-land only so /proc/cpuinfo etc from the host leaks into the container confusing some build systems (ex: aom ARM32 build gets confused about CPU features, I think it looks as cpuinfo)
    • How to verify that successful build actually was built with CPU features we want?
  • Emulated build is slow and uses lots of resources
    • Current static-ffmpeg with all features can't be build on github action host. Runs out of memory and would probably also run out of CPU time (6h max jobs time). Biggest memory/CPU user is rust it seems, without that it might work.

Some details and attempts here #204

Update ffmpeg version with bugfix

Hello,

i am using your project and recently i found a bug on ffmpeg. Guys from ffmpeg comunity were so kind to fix it immediately and i now i need this version in your project.

Can you please add this version in your project ?

KR,

License issue

Great project, very useful!
However, it seems the binaries built by this dockerfile are non-distributable, as far as I can tell this is caused by the inclusion of libfk-aac . I would suggest removing libdfk-aac to make the image distributable, at least for the image published on dockerhub.
Perhaps it might also be worth providing a dockerimage with just the dependencies (basically the builder stage without the ff* binaries) to make it easy to build a static ffmpeg dockerimage with libfdk-aac locally.

ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924
  configuration: --pkg-config-flags=--static --extra-cflags=-fopenmp --extra-ldflags='-fopenmp -Wl,-z,stack-size=2097152' --toolchain=hardened --disable-debug --disable-shared --disable-ffplay --enable-static --enable-gpl --enable-version3 --enable-nonfree --enable-fontconfig --enable-gray --enable-iconv --enable-libaom --enable-libaribb24 --enable-libass --enable-libbluray --enable-libdav1d --enable-libdavs2 --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libkvazaar --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librabbitmq --enable-librav1e --enable-librtmp --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openssl
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
This version of ffmpeg has nonfree parts compiled in.
Therefore it is not legally redistributable.

Help

Hi,
I'm trying to use your docker images to test something here but I'm having some issue.
Based on your readme, I've used this inside my dockerfile:

COPY --from=mwader/static-ffmpeg:7.0-2 /ffmpeg /usr/local/bin/
COPY --from=mwader/static-ffmpeg:7.0-2 /ffprobe /usr/local/bin/

but when I EXEC inside my built image, there's nothing on those folders.
Can you help, please? Maybe I'm doing something wrong.

Thanks in advance

own version tag for changes

First of all, thank you for your work!
Maybe it's a good idea to create your own versions as a tag?
For example, if you update svtav1 from 0.9.1 to 1.0.0 you could create version 5.0.1.1
Then dependabot will also find a new version. Otherwise people will stay on version 5.0.1 for a long time and not get the new changes.

Suggestion: using UPX to pack binaries

using UPX greatly reduces filesizes, without issues so far (at least with ffprobe and the few months i've been trying...)
upx -v --ultra-brute --preserve-build-id --best --8086 --8mib-ram ffprobe
is the command i use.

97573416 ->  25757873   26.40%   linux/amd64   ffprobe
Packed 1 file.

as per this asciicast

feel free to discard

Alternatives for more modular builds and patches support

Make it possible to enable/disable features when building. Alos thinking about adding some kind of optional patches support. Ex: put files in a patches directory and then will be applied in sorted order. Maybe patches/$FEATURE/001-fix.patch?

I think an ideal usage would be something like this:

# as before, all features enabled
docker build .

# all except rav1e
docker build --build-arg FEATURES="-rav1e" .

# no features at all
docker build --build-arg FEATURES="-all" .

# only libfdk-aac
docker build --build-arg FEATURES="-all +libfdk-aac" .

Issues to think about:

  • Build cache (one RUN running a big shell script can not use cache)
  • Feature dependencies (libogg needed by libvorbis etc)
  • How to keep it simple. I currently like that it is just a very standard Dockerfile without many moving parts of big helper scripts
  • Would be nice if all things for a feature could be kept together. Currently verison, build instructions is separate from ffmpeg args
  • Possibly could use heredoc but maybe a too new feature
  • Normalize feature names. vorbis -> libvorbis etc? use what ffmpeg calls it?

Possible implementation combining simple Dockerfile, cache friendly and no big shell script:

ARG FEATURES

# embed or COPY scripts for enable/enabled/download etc

# enable all dependencies and eval $FEATURES
RUN enabled \
  fontconfig \
  gray \
  ... \
  $FEATURES

...
# handle dependencies
RUN \
  enabled vorbis && enable ogg; \
  ...

...

libogg build here

...

# bump: vorbis /VORBIS_VERSION=([\d.]+)/ https://github.com/xiph/vorbis.git|*
# bump: vorbis after ./hashupdate Dockerfile VORBIS $LATEST
# bump: vorbis link "CHANGES" https://github.com/xiph/vorbis/blob/master/CHANGES
# bump: vorbis link "Source diff $CURRENT..$LATEST" https://github.com/xiph/vorbis/compare/v$CURRENT..v$LATEST
ARG VORBIS_VERSION=1.3.7
ARG VORBIS_URL="https://downloads.xiph.org/releases/vorbis/libvorbis-$VORBIS_VERSION.tar.gz"
ARG VORBIS_SHA256=0e982409a9c3fc82ee06e08205b1355e5c6aa4c36bca58146ef399621b0ce5ab
RUN if enabled vorbis; then \
  download $DAV1D_URL $DAV1D_SHA256 && \
  add-version vorbis $VORBIS_VERSION && \
  ffmpeg-configure --enable-libvorbis && \
  cd libvorbis-* && ./configure --disable-shared --enable-static --disable-oggtest && \
  make -j$(nproc) install \
fi

A simple way to implement enable/enabled is to just use files in a directory, so enable would for +?name do touch /featurs/$1, for -name do rm /featurs/$1 and for -all do rm /features/*. add-version could just append to a JSON file. ffmpeg-configure just append to a file and download wrapper around wget and checksum check.

[Enhancement] Support for CUDA

I was trying to run FFmpeg and passing --gpus all flag to the docker container, just to realise that the image does not support it yet (which I later read in the "todos" section in the README).

Any chance to compile FFmpeg with CUDA?

https://docs.nvidia.com/video-technologies/video-codec-sdk/12.0/ffmpeg-with-nvidia-gpu/index.html#compiling-for-linux


If you do not have time to do it yourself, I can try to take a shot at it (but it might take me a while to understand and fix it). Let me know.

Inconsistent DNS resolution

Hello,

Sometimes when I try to use ffmpeg to stream video from a URL I get DNS errors, ffmpeg not being able to resolve the hostname, I did a -v trace but it shows just the same information without the option enabled.

[https @ 0x7fc0c12fd300] header='HTTP/1.1 302 Found'
[https @ 0x7fc0c12fd300] http_code=302
[https @ 0x7fc0c12fd300] header='Server: ####/0.1'
[https @ 0x7fc0c12fd300] header='Date: Wed, 29 Mar 2023 10:21:24 GMT'
[https @ 0x7fc0c12fd300] header='Connection: Close'
[https @ 0x7fc0c12fd300] header='Content-Length: 0'
[https @ 0x7fc0c12fd300] header='Location: #####'
[https @ 0x7fc0c12fd300] header='Access-Control-Allow-Headers: *'
[https @ 0x7fc0c12fd300] header='Access-Control-Expose-Headers: X-TCDN'
[https @ 0x7fc0c12fd300] header='X-TCDN: Host: ####.1, Type: m'
[https @ 0x7fc0c12fd300] header=''
[tcp @ 0x7fc0c12fd500] Failed to resolve hostname REDACTED.com: Try again
[dash @ 0x7fc0c15b2840] Failed to open an initialization section
[dash @ 0x7fc0c15b2840] Error when loading first fragment of playlist
[AVIOContext @ 0x7fc0c1501340] Statistics: 32768 bytes read, 0 seeks
[AVIOContext @ 0x7fc0c143da80] Statistics: 32768 bytes read, 0 seeks
[AVIOContext @ 0x7fc0c1437380] Statistics: 32768 bytes read, 0 seeks
[AVIOContext @ 0x7fc0c12ed280] Statistics: 32768 bytes read, 0 seeks
[AVIOContext @ 0x7fc0c1556b40] Statistics: 31938 bytes read, 0 seeks
https://REDACTED: I/O error

This happened after it being able to resolve several domains before reaching this point in the same ffmpeg execution.

If I immediately try again, it may or may not work, it usually does at the second attempt.

Is there any explanation for this? Using dig inside the same container I never have any problem resolving the same domains. Does ffmpeg rely on OS for DNS resolution or does it use its own system?

platform tags missing

Hi @wader - first of all, thank you for your brilliant work.

As of ~last week, image(s) on Docker Hub with tags including the architecture - specifically mwader/static-ffmpeg:6.1.1-arm64 - seem missing. Only mwader/static-ffmpeg:6.1.1 now seems left. latest still has arch names in the tag, though.

This broke our CI (yeah I know, we could just build our own, but... ;-) ).

Are you planning on removing tags with arch name permanently from now on?

tag 7.0 and master won't compile

Building tag 7.0 or master results in the following error:

e.g.
docker build --build-arg ENABLE_FDKAAC=1 . -t my-ffmpeg-static:latest

MAN doc/libavutil.3 MAN doc/libswscale.3 MAN doc/libswresample.3 MAN doc/libavcodec.3 MAN doc/libavformat.3 MAN doc/libavdevice.3 MAN doc/libavfilter.3 LD ffmpeg_g LD ffprobe_g collect2: fatal error: ld terminated with signal 9 [Killed] compilation terminated. make: *** [Makefile:136: ffmpeg_g] Error 1 make: *** Waiting for unfinished jobs.... The command '/bin/sh -c tar $TAR_OPTS ffmpeg.tar.bz2 && FDKAAC_FLAGS=$(if [[ -n "$ENABLE_FDKAAC" ]] ;then echo " --enable-libfdk-aac --enable-nonfree " ;else echo ""; fi) && cd ffmpeg-* && sed -i 's/add_ldexeflags -fPIE -pie/add_ldexeflags -fPIE -static-pie/' configure && ./configure --pkg-config-flags="--static" --extra-cflags="-fopenmp" --extra-ldflags="-fopenmp -Wl,-z,stack-size=2097152" --toolchain=hardened --disable-debug --disable-shared --disable-ffplay --enable-static --enable-gpl --enable-version3 $FDKAAC_FLAGS --enable-fontconfig --enable-gray --enable-iconv --enable-lcms2 --enable-libaom --enable-libaribb24 --enable-libass --enable-libbluray --enable-libdav1d --enable-libdavs2 --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libkvazaar --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librabbitmq --enable-librav1e --enable-librtmp --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openssl --enable-libjxl || (cat ffbuild/config.log ; false) && make -j$(nproc) install' returned a non-zero code: 2

ARM images?

First, just want to say thanks for putting this together!
It works perfectly on amd64, but any chance we could get an image for armhf and arm64?
thanks!

Multi-arch build is currently failing

Seems to be something to do with cargo in alpine stable in combined with ec2 (faster network?) that causes cargo download etc to fail. Seems to work better with alpine edge so hopefully will get fixed by next stable release.

/checkelf: not found

After solving #367, I ran into this issue:

...
 => CACHED [builder 48/49] COPY checkelf /                                                                                                                                               0.0s
 => ERROR [builder 49/49] RUN   /checkelf /usr/local/bin/ffmpeg &&   /checkelf /usr/local/bin/ffprobe                                                                                    0.3s
------
 > [builder 49/49] RUN   /checkelf /usr/local/bin/ffmpeg &&   /checkelf /usr/local/bin/ffprobe:
0.282 /bin/sh: /checkelf: not found
------
Dockerfile:901
--------------------
 900 |     COPY checkelf /
 901 | >>> RUN \
 902 | >>>   /checkelf /usr/local/bin/ffmpeg && \
 903 | >>>   /checkelf /usr/local/bin/ffprobe
 904 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c /checkelf /usr/local/bin/ffmpeg &&   /checkelf /usr/local/bin/ffprobe" did not complete successfully: exit code: 127

I was able to solve this by dos2unix-ing the checkelf file and re-running the build:

$ dos2unix checkelf
...
 => CACHED [builder 48/49] COPY checkelf /                                                                                                                                               0.0s
 => [builder 49/49] RUN   /checkelf /usr/local/bin/ffmpeg &&   /checkelf /usr/local/bin/ffprobe                                                                                          0.4s
 => [final1 1/9] COPY --from=builder /versions.json /usr/local/bin/ffmpeg /usr/local/bin/ffprobe /                                                                                       0.9s
 => [final1 2/9] COPY --from=builder /usr/local/share/doc/ffmpeg/* /doc/                                                                                                                 0.1s
 => [final1 3/9] COPY --from=builder /etc/ssl/cert.pem /etc/ssl/cert.pem                                                                                                                 0.0s
 => [final1 4/9] RUN ["/ffmpeg", "-version"]                                                                                                                                             0.3s
 => [final1 5/9] RUN ["/ffprobe", "-version"]                                                                                                                                            0.3s
 => [final1 6/9] RUN ["/ffmpeg", "-hide_banner", "-buildconf"]                                                                                                                           0.3s
 => [final1 7/9] RUN ["/ffmpeg", "-f", "lavfi", "-i", "testsrc", "-c:v", "libsvtav1", "-t", "100ms", "-f", "null", "-"]                                                                  0.9s
 => [final1 8/9] RUN ["/ffprobe", "-i", "https://github.com/favicon.ico"]                                                                                                                0.6s
 => [final1 9/9] RUN ["/ffprobe", "-tls_verify", "1", "-ca_file", "/etc/ssl/cert.pem", "-i", "https://github.com/favicon.ico"]                                                           0.5s
 => [final2 1/1] COPY --from=final1 / /                                                                                                                                                  0.9s
 => exporting to image                                                                                                                                                                   1.0s
 => => exporting layers                                                                                                                                                                  1.0s
 => => writing image sha256:cb80d2f0dbc0ff79a6a93b71e3606b56777f0604e34b85fa9bd43accbf5902f0                                                                                             0.0s
 => => naming to docker.io/danbo/ffmpeg-static:6.1  

problem with libfdk_aac

I want to convert some mp3 file (in vbr mode) using libfdk_aac, the following command:

ffmpeg -i file.mp3 -codec:a libfdk_aac -vbr 3 output.m4a

causes:

image

full log:

root@d875d60c107a:/# ffmpeg -i file_3.mp3 -codec:a libfdk_aac -vbr 3 output.m4a
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219
  configuration: --pkg-config-flags=--static --extra-cflags=-fopenmp --extra-ldflags='-fopenmp -Wl,-z,stack-size=2097152' --toolchain=hardened --disable-debug --disable-shared --disable-ffplay --enable-static --enable-gpl --enable-version3 --enable-nonfree --enable-fontconfig --enable-gray --enable-iconv --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdavs2 --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libkvazaar --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librabbitmq --enable-librav1e --enable-librtmp --enable-librubberband --enable-libshine --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openssl
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, mp3, from 'file_3.mp3':
  Metadata:
    title           : Dew
    artist          : Kris Davis
    track           : 2
    album           : Always
    disc            : 1
    genre           : Electro
    TSRC            : DEU671703876
    BARCODE         : 880319962219
    publisher       : AZZUR
    TLEN            : 328000
    album_artist    : Kris Davis
    date            : 2018-07-27
  Duration: 00:05:28.05, start: 0.025056, bitrate: 321 kb/s
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s
    Metadata:
      encoder         : LAME3.99r
    Side data:
      replaygain: track gain - -6.800000, track peak - unknown, album gain - unknown, album peak - unknown, 
  Stream #0:1: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 800x800 [SAR 72:72 DAR 1:1], 90k tbr, 90k tbn (attached pic)
    Metadata:
      title           : cover
      comment         : Cover (front)
Stream mapping:
  Stream #0:1 -> #0:0 (mjpeg (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (mp3 (mp3float) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[ipod @ 0x7f14ca8a5840] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or setting vsync/fps_mode to vfr
[libx264 @ 0x7f14ca90e800] using SAR=1/1
[libx264 @ 0x7f14ca90e800] MB rate (225000000) > level limit (16711680)
[libx264 @ 0x7f14ca90e800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7f14ca90e800] profile High, level 6.2, 4:2:0, 8-bit
[libx264 @ 0x7f14ca90e800] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[libfdk_aac @ 0x7f14ca8ed800] Note, the VBR setting is unsupported and only works with some parameter combinations
[ipod @ 0x7f14ca8a5840] Could not find tag for codec h264 in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 -- 
Conversion failed!
root@d875d60c107a:/# 

Reproduce:

FROM ubuntu 

COPY --from=mwader/static-ffmpeg:5.1.2 /ffmpeg /usr/local/bin/

RUN apt update && apt install wget -y

RUN wget https://transfer.sh/CgVCLS/file.mp3

then:

docker build -t myimage .
docker run -it myimage bash

ffmpeg -i file.mp3 -codec:a libfdk_aac -vbr 3 output.m4a

--enable-libharfbuzz missing

Hi,

First, thanks for this repo. Really useful.

I have noticed drawtext filter is not working. Launching the following command:

docker run -i --rm -u $UID:$GROUPS -v "$PWD:$PWD" -w "$PWD" -v /tmp:/tmp mwader/static-ffmpeg:7.0 -i /tmp/source.mp4 -vf drawtext="fontsize=30:fontfile=/tmp/font.ttf:text='hello world':x=(w-text_w)/2:y=(h-text_h)/2" -c:v libx264 video.mp4
will fail with:

[AVFilterGraph @ 0xffff805a7030] No such filter: 'drawtext'
[vost#0:0/libx264 @ 0xffff805a6050] Error initializing a simple filtergraph

Adding --enable-libharfbuzz \ to the docker file would fix it.

I have built it locally and the following command executes properly:

docker run -i --rm -u $UID:$GROUPS -v "$PWD:$PWD" -w "$PWD" -v /tmp:/tmp ffmpeg -i /tmp/source.mp4 -vf drawtext="fontsize=30:fontfile=/tmp/font.ttf:text='hello world':x=(w-text_w)/2:y=(h-text_h)/2" -c:v libx264 video.mp4

Build multi-arch images on AWS spot instances

The discussion begins here: #157

But i guess it's a bit of a balance, having just one multi-arch image would be quite neat also and very clean and simple for users of the image. So in summary for me i think it's a good idea be allow hacky things inside the Dockerfile to do whatever is needed to produce static binaries but be cautious with complicated things in CI and build env etc?

@wader Maybe it's better to make PR on target libraries for helping them to compile on not only on x86_64 arch instead of hacking the Dockerfile?

To be honest, spawning two parallel universes to build the library on them, looks for me overkill. It's a very interesting challenge for me as an engineer, but it will make things more complicated to maintain.

ERROR: libbluray not found using pkg-config

Hi,
i'm a little noobish in this segement, please just let me know what i'm doing wrong here.
I've git cloned the project and run
docker build -f Dockerfile .

But the result is not what i expected - i will post just the last few lines.
Host is

uname -a
Linux container 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Error log:

gcc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -O3 -s -static-libgcc -fno-strict-overflow -fstack-protector-all -fPIC -fno-strict-overflow -fstack-protector-all -fPIE -fopenmp -std=c11 -fomit-frame-pointer -fPIC -pthread -I/usr/local/include -I/usr/local/include/libvmaf -pthread -I/usr/local/include -I/usr/include/libpng16 -I/usr/local/include -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libpng16 -I/usr/local/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/libpng16 -L/usr/local/lib -L/lib -c -o /tmp/ffconf.14ME0mrr/test.o /tmp/ffconf.14ME0mrr/test.c
gcc -Wl,-z,relro,-z,now -fopenmp -Wl,-z,stack-size=2097152 -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -Wl,-z,noexecstack -fPIE -static-pie -I/usr/local/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/libpng16 -L/usr/local/lib -L/lib -o /tmp/ffconf.14ME0mrr/test /tmp/ffconf.14ME0mrr/test.o -lbluray -lxml2 -lz -llzma -lm -lfontconfig -lfreetype -lbrotlicommon -lexpat -lm -lbz2 -lbrotlidec -lpng16 -lz
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/ccHBNDde.ltrans0.ltrans.o: warning: relocation against `_kBrotliPrefixCodeRanges' in read-only section `.text'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/ccHBNDde.ltrans0.ltrans.o: in function `DecodeLiteralBlockSwitch':
<artificial>:(.text+0xa70): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: <artificial>:(.text+0xb5d): undefined reference to `_kBrotliContextLookupTable'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/ccHBNDde.ltrans0.ltrans.o: in function `SafeDecodeLiteralBlockSwitch':
<artificial>:(.text+0xc8e): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: <artificial>:(.text+0xf07): undefined reference to `_kBrotliContextLookupTable'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/ccHBNDde.ltrans0.ltrans.o: in function `DecodeCommandBlockSwitch':
<artificial>:(.text+0x1098): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/ccHBNDde.ltrans0.ltrans.o: in function `SafeDecodeCommandBlockSwitch':
<artificial>:(.text+0x124e): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/ccHBNDde.ltrans0.ltrans.o: in function `DecodeDistanceBlockSwitch':
<artificial>:(.text+0x1608): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/ccHBNDde.ltrans0.ltrans.o: in function `SafeDecodeDistanceBlockSwitch':
<artificial>:(.text+0x17de): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/ccHBNDde.ltrans0.ltrans.o: in function `ProcessCommands':
<artificial>:(.text+0x42df): undefined reference to `BrotliTransformDictionaryWord'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/ccHBNDde.ltrans0.ltrans.o: in function `SafeProcessCommands':
<artificial>:(.text+0x50ef): undefined reference to `BrotliTransformDictionaryWord'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/ccHBNDde.ltrans0.ltrans.o: in function `BrotliDecoderDecompress':
<artificial>:(.text+0x53b4): undefined reference to `BrotliDefaultAllocFunc'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: <artificial>:(.text+0x53db): undefined reference to `BrotliDefaultFreeFunc'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: <artificial>:(.text+0x54d3): undefined reference to `BrotliGetDictionary'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: <artificial>:(.text+0x54e0): undefined reference to `BrotliGetTransforms'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: <artificial>:(.text+0x5a88): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: <artificial>:(.text+0x5f23): undefined reference to `_kBrotliContextLookupTable'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: read-only segment has dynamic relocations
collect2: error: ld returned 1 exit status
ERROR: libbluray not found using pkg-config
The command '/bin/sh -c wget $WGET_OPTS -O ffmpeg.tar.bz2 "$FFMPEG_URL" &&   echo "$FFMPEG_SHA256  ffmpeg.tar.bz2" | sha256sum --status -c - &&   tar xf ffmpeg.tar.bz2 &&   cd ffmpeg-* &&   sed -i 's/add_ldexeflags -fPIE -pie/add_ldexeflags -fPIE -static-pie/' configure &&   ./configure   --pkg-config-flags="--static"   --extra-cflags="-fopenmp"   --extra-ldflags="-fopenmp -Wl,-z,stack-size=2097152"   --toolchain=hardened   --disable-debug   --disable-shared   --disable-ffplay   --enable-static   --enable-gpl   --enable-version3   --enable-nonfree   --enable-fontconfig   --enable-gray   --enable-iconv   --enable-libaom   --enable-libaribb24   --enable-libass   --enable-libbluray   --enable-libdav1d   --enable-libdavs2   --enable-libfdk-aac   --enable-libfreetype   --enable-libfribidi   --enable-libgme   --enable-libgsm   --enable-libkvazaar   --enable-libmodplug   --enable-libmp3lame   --enable-libmysofa   --enable-libopencore-amrnb   --enable-libopencore-amrwb   --enable-libopenjpeg   --enable-libopus   --enable-librabbitmq   --enable-librav1e   --enable-librtmp   --enable-librubberband   --enable-libshine   --enable-libsnappy   --enable-libsoxr   --enable-libspeex   --enable-libsrt   --enable-libssh   --enable-libsvtav1   --enable-libtheora   --enable-libtwolame   --enable-libuavs3d   --enable-libvidstab   --enable-libvmaf   --enable-libvo-amrwbenc   --enable-libvorbis   --enable-libvpx   --enable-libwebp   --enable-libx264   --enable-libx265   --enable-libxavs2   --enable-libxml2   --enable-libxvid   --enable-libzimg   --enable-openssl   || (cat ffbuild/config.log ; false)   && make -j$(nproc) install' returned a non-zero code: 1

Build fails due to libass extraction

> [builder  8/49] RUN   wget --retry-on-host-error --retry-on-http-error=429,500,502,503 -O libass.tar.gz "https://github.com/libass/libass/releases/download/0.17.1/libass-0.17.1.tar.gz" &&   echo "d653be97198a0543c69111122173c41a99e0b91426f9e17f06a858982c2fb03d  libass.tar.gz" | sha256sum --status -c - &&   tar xf libass.tar.gz &&   cd libass-* && ./configure --disable-shared --enable-static &&   make -j$(nproc) && make install:                                                                
0.489 --2023-11-15 02:36:58--  https://github.com/libass/libass/releases/download/0.17.1/libass-0.17.1.tar.gz                                                         
0.537 Resolving github.com (github.com)... 140.82.112.4                                                                                                               
0.540 Connecting to github.com (github.com)|140.82.112.4|:443... connected.
0.622 HTTP request sent, awaiting response... 302 Found
0.726 Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/11696642/41f30033-10b9-4ac7-a3e6-1dece4ba1ef3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231115T023658Z&X-Amz-Expires=300&X-Amz-Signature=dcc98db23cfab78d5cbd2a4494e41b3637711b865f129efe7568f0c3a882f908&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=11696642&response-content-disposition=attachment%3B%20filename%3Dlibass-0.17.1.tar.gz&response-content-type=application%2Foctet-stream [following]
0.726 --2023-11-15 02:36:58--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/11696642/41f30033-10b9-4ac7-a3e6-1dece4ba1ef3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231115T023658Z&X-Amz-Expires=300&X-Amz-Signature=dcc98db23cfab78d5cbd2a4494e41b3637711b865f129efe7568f0c3a882f908&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=11696642&response-content-disposition=attachment%3B%20filename%3Dlibass-0.17.1.tar.gz&response-content-type=application%2Foctet-stream
0.726 Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.111.133, 185.199.108.133, ...
0.771 Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
0.812 HTTP request sent, awaiting response... 200 OK
0.885 Length: 546658 (534K) [application/octet-stream]
0.885 Saving to: 'libass.tar.gz'
0.888 
0.888      0K .......... .......... .......... .......... ..........  9% 1.75M 0s
0.913     50K .......... .......... .......... .......... .......... 18% 3.59M 0s
0.927    100K .......... .......... .......... .......... .......... 28% 4.65M 0s
0.937    150K .......... .......... .......... .......... .......... 37% 7.04M 0s
0.944    200K .......... .......... .......... .......... .......... 46% 6.83M 0s
0.952    250K .......... .......... .......... .......... .......... 56% 1.83M 0s
0.978    300K .......... .......... .......... .......... .......... 65% 6.76M 0s
0.985    350K .......... .......... .......... .......... .......... 74% 5.74M 0s
0.994    400K .......... .......... .......... .......... .......... 84% 7.16M 0s
1.001    450K .......... .......... .......... .......... .......... 93% 8.02M 0s
1.007    500K .......... .......... .......... ...                  100% 11.3M=0.1s
1.010 
1.010 2023-11-15 02:36:59 (4.20 MB/s) - 'libass.tar.gz' saved [546658/546658]
1.010 
1.029 tar: libass-0.17.1/aclocal.m4: Cannot change ownership to uid 197609, gid 197609: Invalid argument
1.030 tar: libass-0.17.1/Changelog: Cannot change ownership to uid 197609, gid 197609: Invalid argument
... (many more)
1.078 tar: Exiting with failure status due to previous errors
------
Dockerfile:132
--------------------
 131 |     ARG LIBASS_SHA256=d653be97198a0543c69111122173c41a99e0b91426f9e17f06a858982c2fb03d
 132 | >>> RUN \
 133 | >>>   wget $WGET_OPTS -O libass.tar.gz "$LIBASS_URL" && \
 134 | >>>   echo "$LIBASS_SHA256  libass.tar.gz" | sha256sum --status -c - && \
 135 | >>>   tar xf libass.tar.gz && \
 136 | >>>   cd libass-* && ./configure --disable-shared --enable-static && \
 137 | >>>   make -j$(nproc) && make install
 138 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c wget $WGET_OPTS -O libass.tar.gz \"$LIBASS_URL\" &&   echo \"$LIBASS_SHA256  libass.tar.gz\" | sha256sum --status -c - &&   tar xf libass.tar.gz &&   cd libass-* && ./configure --disable-shared --enable-static &&   make -j$(nproc) && make install" did not complete successfully: exit code: 2

I got it to work by adding the --no-same-owner option to the tar command here:

tar xf libass.tar.gz ---no-same-owner && \


Docker version 24.0.7, build afdd53b

AVX512 not working with x265 or svt-av1 codecs

I've tried to run this ffmpeg on a system with AVX512 and found that neither x265 nor svt-av1 are using it. I was able to make svt-av1 use it after adding -DENABLE_AVX512=ON to the Dockerfile (to the compilation flags of svt-av1) but was not able to make x265 use or detect it. Do you know of any reasons why that might be the case with x265?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.