Skip to content

ffmpeg: fdk-aac is opt-in (from-source build) — consider a build switch #13

Description

@ns408

Context

We use the homebrew-ffmpeg/ffmpeg tap (PR #12) with the default bottled build: libass, drawtext/libfreetype, and many extra filters, but not fdk-aac.

Enabling fdk-aac requires brew "homebrew-ffmpeg/ffmpeg/ffmpeg", args: ["with-fdk-aac"], which:

  • forces a from-source compile (no bottle, since FDK AAC is non-free), and
  • recompiles ffmpeg on every version bump — heavy for the unattended daily-update LaunchDaemon.

Decision (current)

Stay on the bottled build; ffmpeg's native AAC encoder is fine for current needs. The trade-off is noted inline in packages/Brewfile.developer and packages/Brewfile.cloud-engineer.

Future enhancement: a build switch

Let the user opt into the FDK AAC build without editing the Brewfile. Options to weigh:

  1. Brewfile conditional (Ruby). Brewfiles are Ruby, so:

    brew "homebrew-ffmpeg/ffmpeg/ffmpeg", args: ENV["NS_FFMPEG_FDK_AAC"] ? ["with-fdk-aac"] : []

    Set NS_FFMPEG_FDK_AAC=1 before brew bundle to get the source build.

  2. bootstrap flag / machine config. A --ffmpeg-fdk-aac flag (or a key in ~/.config/ns-bootstrap/config) that the install step reads to decide the args.

Either way, document the source-build + recompile-on-update cost, and consider pinning/skipping ffmpeg in the unattended updater when the source build is selected so a 3am rebuild doesn't stall.

Acceptance

  • A documented, single switch to choose bottled vs with-fdk-aac.
  • Default stays bottled.
  • Unattended updater not silently doing heavy source rebuilds.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions