macOS Setup¶
Install and configure FFmpeg on macOS
Table of Contents¶
Installation¶
Using Homebrew (Recommended)¶
Using MacPorts¶
Verify Installation¶
Bundling FFmpeg with Your App¶
For distribution via the Mac App Store or notarized apps, you'll want to bundle FFmpeg.
Download Static Build¶
- Download a static FFmpeg build from evermeet.cx
- Place the binary in your project
Add to Xcode Project¶
- In Xcode, right-click on Runner → Add Files to "Runner"
- Select the FFmpeg binary
- Ensure "Copy items if needed" is checked
- Add to the Runner target
Configure Build Phase¶
Add a "Copy Files" build phase:
- Select your target → Build Phases
- Add a "Copy Files" phase
- Destination: Executables
- Add the FFmpeg binary
Configure Fluvie¶
import 'dart:io';
import 'package:path/path.dart' as path;
import 'package:fluvie/fluvie.dart';
void main() {
final execDir = path.dirname(Platform.resolvedExecutable);
final ffmpegPath = path.join(execDir, 'ffmpeg');
if (File(ffmpegPath).existsSync()) {
FluvieConfig.configure(ffmpegPath: ffmpegPath);
}
runApp(MyApp());
}
Code Signing¶
When distributing your app, the bundled FFmpeg binary must be signed.
Sign the Binary¶
Entitlements¶
Create ffmpeg.entitlements:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>
Sign with entitlements:
codesign --force --sign "Developer ID Application: Your Name" \
--options runtime \
--entitlements ffmpeg.entitlements \
path/to/ffmpeg
Notarization¶
For distribution outside the App Store:
# Create a zip for notarization
ditto -c -k --keepParent YourApp.app YourApp.zip
# Submit for notarization
xcrun notarytool submit YourApp.zip \
--apple-id your@email.com \
--team-id YOURTEAMID \
--password app-specific-password \
--wait
# Staple the ticket
xcrun stapler staple YourApp.app
Troubleshooting¶
"ffmpeg" cannot be opened because the developer cannot be verified¶
This happens when FFmpeg isn't properly signed. Either:
- Sign the binary as shown above
- Or for development, allow it in System Preferences → Security & Privacy
Library Not Loaded¶
If FFmpeg reports missing libraries:
Use a statically linked FFmpeg build to avoid dependency issues.
Sandboxed App Restrictions¶
If your app is sandboxed, FFmpeg may have limited file access. Ensure you:
- Request necessary entitlements
- Use app-accessible directories (Documents, temp)
- Or disable sandbox for development
Related¶
- Platform Overview - All platforms
- FFmpeg Setup - General FFmpeg guide
- Custom FFmpeg Provider - Custom integrations