Module ffmpeg

Source
Expand description

The one place that knows where ffmpeg is, and what to say when it is not.

ffmpeg is an external program, not a dependency. Nothing is linked, nothing is vendored, and a checkout without ffmpeg installed builds and passes its tests — the features that need it say so and stop. Copying, spectrum rendering and playback share these install instructions: a fact hand-copied into several places will eventually be wrong in one of them.

The search is deliberately plain — ffmpeg, on the PATH. A GUI application has to hunt through /opt/homebrew/bin and the rest because it is launched by Finder and inherits no shell environment; a command run from a terminal inherits the user’s PATH by construction, and looking anywhere else would only find a different ffmpeg from the one they get when they type the name themselves. Playback uses it for formats that the native decoder cannot open, currently Opus, AAC and ALAC.

Functions§

find
Where ffmpeg is, or None when it is not installed.
missing
What to tell somebody who has no ffmpeg, worded so they can act on it.