This is the latest major version of ffmpeg, codenamed "Huffman".
The feature flags added are one for Whisper filter support via
whisper-cpp, and APV encoding support via OpenAPV(which needed to be
packaged)
Further, the withPostproc feature flag is restricted to before version
8.0, as it was removed.
Currently, nasm is the only supported assembler on 8.0+, so we use that.
in order to not cause a mass rebuild, we don't change the assembler for
older builds, even though nasm has been supported since 3.4.
It is best to keep as many FFmpeg dependencies unpinned as possible,
so that only the packages that actually break are kept behind on old
versions. I ran into many cases recently where a package was pinned
to an old version of FFmpeg but worked fine with the latest one,
making the older versions look more necessary than they actually were.
This will make it easier to find packages that need intervention to
be updated to newer versions and speed up the process of jettisoning
old FFmpeg versions. The cost of potentially holding back the default
version for a little while to let major parts of the ecosystem catch
up is minor by comparison, especially since it has happened with 7
anyway due to Darwin problems.
This is (to my knowledge) a novel pattern that is similar to how
callPackages (note the s) is used. Whereas callPackages would try to make the
arguments of default.nix overrideable, this instead exposes the individual
packages' arguments.
This pattern is a lot more robust than the custom import pattern I had
implemented here before.
It also moves the implementation detail out of all-packages which is great.
Making the version part of the interface allows overriders to declare a
different ABI. Doing so via overrideAttrs would not affect the flags in the
arguments; effectively retaining the overridden package's ABI.
See https://github.com/NixOS/nixpkgs/issues/280645 for an instance of that.
By overriding the arguments using
ffmpeg.override { version = "..."; ... }
the ABI will now be overridden as expected.
This means you could theoretically turn ffmpeg_5-full into ffmpeg_4-headless by overriding it with
{
version = "4.4.4";
hash = ...;
ffmpegVariant = "headless";
}
Having these implicit parameters be explicit parameters feels a lot cleaner and
neater to work with.