ffmpeg & codecs
The engine renders every frame itself; FFmpeg is the separate program that
encodes those frames into MP4, WebM, MOV and GIF files. Since 1.0.1 every
installer ships it, so video export works out of the box — there is nothing to
install. (Before 1.0.1 it had to be on your PATH.)
Which formats use it
| Written by the engine on its own | Encoded by FFmpeg |
|---|---|
| PNG, JPEG and EXR sequences | MP4 (H.264 + AAC) |
| Still frame (PNG) | WebM (VP9 + Opus) |
| WAV | MOV (ProRes 4444) |
| Lottie, project and interchange exports | GIF |
| Export formats added by plugins | HDR10 and HLG (10-bit HEVC) |
So if FFmpeg is ever unavailable, stills, image sequences and WAV audio still export.
The copy that ships
Each installer carries one pinned build of FFmpeg 9.0.2 in
<app resources>/ffmpeg/ — for Windows x64, and for macOS on Apple silicon and
Intel. Packaging checks it against a SHA-256 pin, runs it, and confirms it has
every encoder export uses; a package without it is refused, and the release
build checks that it is in every installer and matches the engine’s processor.
When video export needs a repair
A shipped copy can still go missing or stop working on a particular machine — security software quarantines or blocks it, a disk error damages it. Premation does not wait for an export to find that out:
- It checks at startup, and before every export that encodes. Each check actually runs FFmpeg rather than only looking for the file.
- If the copy that should work does not, a notice says Video export needs a quick repair, once per session, with a Fix button.
- When you export a format that needs FFmpeg and it is not ready, the Fix video export dialog opens before you choose where to save. Once it is fixed, Continue carries on with the export; Cancel export stops.
- Window ▸ Customize… ▸ Appearance ▸ Video Export shows the state any time:
Working with the copy in use (Built in, Repaired copy, Your
FFmpeg,
FFMPEG_PATHor System FFmpeg), Check again, and Fix… when it is not working. Some video formats unavailable means a copy runs but lacks an encoder some formats need.
The Fix video export dialog
It says what is wrong in plain terms — the file is missing, security software is stopping it, it was built for a different processor, it is damaged, it did not respond, or it was built without what a format needs — and offers one main action: Download and fix, with the download size on the button.
That downloads the same pinned build the installer ships, checks the free disk
space and the SHA-256, installs it into Premation’s own user-data folder
(tools/ffmpeg/), and runs it to make sure it works, ending with Video export
works again. You can keep working while it runs. The download goes through your
system’s proxy settings, and an interrupted download continues where it left off
on Try again.
If the download cannot happen, the dialog says why in one sentence and offers the next step:
| What happened | Next step |
|---|---|
| Not connected, the server is not answering, the download stalled or arrived damaged | Try again |
| A work or school network blocked it | Copy download link, download it on another device, then Choose file… to pick the .zip |
| Not enough disk space | Free some space, then Try again — the dialog says roughly how much is needed |
| Security software blocked it after the install | Allow Premation (or restore the file) in the antivirus, then Check again |
| No pinned build for this computer | Choose file… to pick an FFmpeg you already have |
Choose file… accepts an ffmpeg executable (ffmpeg.exe on Windows) or the
pinned .zip. A copy you chose shows as Your FFmpeg in Settings, with Use
built-in to go back. Technical details at the bottom of the dialog holds
the raw reasons, for a support request.
Failed exports say what to do
When an export does fail, the failed job says why in one sentence, with the button that helps:
| Failure | Offered |
|---|---|
| FFmpeg missing or blocked | Fix — repairs it, then renders the job again |
| The disk is full | Retry, after freeing space or choosing another drive |
| The output file is open in another app | Retry, after closing it there |
| The folder cannot be written to | Export again to another location, such as Documents or Desktop |
Which copy is used
The check tries these in order and uses the first that runs with every encoder export needs (failing that, the first that runs at all):
$FFMPEG_PATH, if set.- A copy you chose with Choose file….
- The copy shipped with the app,
<app resources>/ffmpeg/ffmpeg[.exe]. - A repaired copy the app downloaded.
ffmpegon yourPATH.
Proxy generation uses the same copy as export. The
command line uses $FFMPEG_PATH if set, then the copy shipped
with the app, then PATH.
The installers ship ffmpeg but not ffprobe. The import probe that reads a
video’s exact frame rate and codec details uses an ffprobe from
$FFPROBE_PATH, beside the FFmpeg in use, or on your PATH when there is one;
without it a file still imports, and those fields stay unknown. See Importing media.
Pointing at a specific build
export FFMPEG_PATH=/path/to/ffmpegFFMPEG_PATH takes priority over everything else, provided it runs.
Building from source
A development run (npm run electron:dev:local) has no shipped copy, so export
uses FFMPEG_PATH, a copy you chose, a repaired copy or ffmpeg on your PATH
— Video Export ▸ Fix… works here too. To put one on your PATH:
Windows
winget install Gyan.FFmpegPackaging fetches the pinned build itself. npm run dist:local (and the
other packaging scripts) download the archive pinned in
electron/ffmpegManifest.json for each platform and architecture into
build/.cache/ffmpeg/, check its SHA-256, extract the executable, run it to check
its encoders (where the build machine can run it), and stage it with its licence
into the package. A failure stops the
build. PREMATION_PACKAGE_WITHOUT_FFMPEG=1 allows an offline local rehearsal
without it — the packaged app then offers the repair download on first export;
the release build ignores that setting.
Licence
The shipped FFmpeg is a GPL build, chosen because export uses libx264,
libvpx-vp9 and libopus, which an LGPL build does not have. It runs as a
separate program, and its licence text and a pointer to its source
(LICENSE.txt, NOTICE.txt) ship beside it in <app resources>/ffmpeg/. If
you distribute your own package of Premation, those terms travel with the binary.
Why a separate process
The engine renders each frame and pipes it straight into an FFmpeg child process. Two things follow:
- The encode never competes with the editor’s interface, so a long export leaves the app usable.
- Only a few frames are in memory at once. The finished file is moved into place, so a multi-gigabyte export never passes through the app’s memory.