Windows Setup¶
Install and configure FFmpeg on Windows
Table of Contents¶
Installation¶
Download FFmpeg¶
- Go to ffmpeg.org/download.html
- Under "Windows", click on "Windows builds from gyan.dev"
- Download the "ffmpeg-release-essentials.zip" (or full build for more codecs)
- Extract to a folder (e.g.,
C:\ffmpeg)
Add to PATH¶
- Open System Properties (Win+Pause or search "Environment Variables")
- Click "Environment Variables"
- Under "System variables", find "Path" and click "Edit"
- Click "New" and add
C:\ffmpeg\bin - Click OK to save
Verify Installation¶
Open a new Command Prompt and run:
Using Chocolatey¶
Using Scoop¶
Using winget¶
Bundling FFmpeg with Your App¶
Download and Extract¶
- Download the static FFmpeg build
- Extract
ffmpeg.exeandffprobe.exe - Place them in your project's
windows/directory
Modify CMakeLists.txt¶
Add to windows/CMakeLists.txt:
# Install FFmpeg binaries
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg.exe"
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/ffprobe.exe"
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}")
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, 'data', 'ffmpeg.exe');
if (File(ffmpegPath).existsSync()) {
FluvieConfig.configure(ffmpegPath: ffmpegPath);
}
runApp(MyApp());
}
MSIX Packaging¶
When creating an MSIX package:
Include FFmpeg in Package¶
Add to your pubspec.yaml:
Place FFmpeg in windows/assets/.
Configure at Runtime¶
import 'package:path_provider/path_provider.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// For MSIX, assets are in a specific location
final appDir = await getApplicationSupportDirectory();
final ffmpegPath = path.join(appDir.path, 'ffmpeg.exe');
if (File(ffmpegPath).existsSync()) {
FluvieConfig.configure(ffmpegPath: ffmpegPath);
}
runApp(MyApp());
}
Troubleshooting¶
'ffmpeg' is not recognized¶
FFmpeg is not in PATH. Either:
- Add FFmpeg to PATH (see installation steps)
- Or configure the full path:
Windows Defender SmartScreen¶
When running an unsigned app with bundled FFmpeg:
- Click "More info"
- Click "Run anyway"
For distribution, consider code signing your application.
Antivirus False Positives¶
Some antivirus software flags FFmpeg. You may need to:
- Add an exception for your app's directory
- Use a well-known FFmpeg distribution (gyan.dev, BtbN)
Long Path Issues¶
If you encounter path length issues:
- Enable long paths in Windows:
- Restart your computer
Related¶
- Platform Overview - All platforms
- FFmpeg Setup - General FFmpeg guide
- Custom FFmpeg Provider - Custom integrations