FFMpegCore 5.1.0

dotnet add package FFMpegCore --version 5.1.0
NuGet\Install-Package FFMpegCore -Version 5.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FFMpegCore" Version="5.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FFMpegCore --version 5.1.0
#r "nuget: FFMpegCore, 5.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FFMpegCore as a Cake Addin
#addin nuget:?package=FFMpegCore&version=5.1.0

// Install FFMpegCore as a Cake Tool
#tool nuget:?package=FFMpegCore&version=5.1.0


NuGet Badge GitHub issues GitHub stars GitHub CI GitHub code contributors

A .NET Standard FFMpeg/FFProbe wrapper for easily integrating media analysis and conversion into your .NET applications. Supports both synchronous and asynchronous calls



Use FFProbe to analyze media files:

var mediaInfo = await FFProbe.AnalyseAsync(inputPath);


var mediaInfo = FFProbe.Analyse(inputPath);


Use FFMpeg to convert your media files. Easily build your FFMpeg arguments using the fluent argument builder:

Convert input file to h264/aac scaled to 720p w/ faststart, for web playback

    .OutputToFile(outputPath, false, options => options
        .WithVideoFilters(filterOptions => filterOptions

Convert to and/or from streams

await FFMpegArguments
    .FromPipeInput(new StreamPipeSource(inputStream))
    .OutputToPipe(new StreamPipeSink(outputStream), options => options

Helper methods

The provided helper methods makes it simple to perform common operations.

Easily capture snapshots from a video file:

// process the snapshot in-memory and use the Bitmap directly
var bitmap = FFMpeg.Snapshot(inputPath, new Size(200, 400), TimeSpan.FromMinutes(1));

// or persists the image on the drive
FFMpeg.Snapshot(inputPath, outputPath, new Size(200, 400), TimeSpan.FromMinutes(1));

You can also capture GIF snapshots from a video file:

FFMpeg.GifSnapshot(inputPath, outputPath, new Size(200, 400), TimeSpan.FromSeconds(10));

// or async
await FFMpeg.GifSnapshotAsync(inputPath, outputPath, new Size(200, 400), TimeSpan.FromSeconds(10));

// you can also supply -1 to either one of Width/Height Size properties if you'd like FFMPEG to resize while maintaining the aspect ratio
await FFMpeg.GifSnapshotAsync(inputPath, outputPath, new Size(480, -1), TimeSpan.FromSeconds(10));

Join video parts into one single file:


Create a sub video


Join images into a video:

FFMpeg.JoinImageSequence(@"..\joined_video.mp4", frameRate: 1,

Mute the audio of a video file:

FFMpeg.Mute(inputPath, outputPath);

Extract the audio track from a video file:

FFMpeg.ExtractAudio(inputPath, outputPath);

Add or replace the audio track of a video file:

FFMpeg.ReplaceAudio(inputPath, inputAudioPath, outputPath);

Combine an image with audio file, for youtube or similar platforms

FFMpeg.PosterWithAudio(inputPath, inputAudioPath, outputPath);
// or
var image = Image.FromFile(inputImagePath);
image.AddAudio(inputAudioPath, outputPath);

Other available arguments could be found in FFMpegCore.Arguments namespace.

Input piping

With input piping it is possible to write video frames directly from program memory without saving them to jpeg or png and then passing path to input of ffmpeg. This feature also allows for converting video on-the-fly while frames are being generated or received.

An object implementing the IPipeSource interface is used as the source of data. Currently, the IPipeSource interface has two implementations; StreamPipeSource for streams, and RawVideoPipeSource for raw video frames.

Working with raw video frames

Method for generating bitmap frames:

IEnumerable<IVideoFrame> CreateFrames(int count)
    for(int i = 0; i < count; i++)
        yield return GetNextFrame(); //method that generates of receives the next frame

Then create a RawVideoPipeSource that utilises your video frame source

var videoFramesSource = new RawVideoPipeSource(CreateFrames(64))
    FrameRate = 30 //set source frame rate
await FFMpegArguments
    .OutputToFile(outputPath, false, options => options

If you want to use System.Drawing.Bitmaps as IVideoFrames, a BitmapVideoFrameWrapper wrapper class is provided.



If you prefer to manually download them, visit ffbinaries or zeranoe Windows builds.

Windows (using choco)

command: choco install ffmpeg -y

location: C:\ProgramData\chocolatey\lib\ffmpeg\tools\ffmpeg\bin


command: brew install ffmpeg mono-libgdiplus

location: /usr/local/bin


command: sudo apt-get install -y ffmpeg libgdiplus

location: /usr/bin

Path Configuration

Option 1

The default value of an empty string (expecting ffmpeg to be found through PATH) can be overwritten via the FFOptions class:

// setting global options
GlobalFFOptions.Configure(new FFOptions { BinaryFolder = "./bin", TemporaryFilesFolder = "/tmp" });

// or
GlobalFFOptions.Configure(options => options.BinaryFolder = "./bin");

// on some systems the absolute path may be required, in which case 
GlobalFFOptions.Configure(new FFOptions { BinaryFolder = Server.MapPath("./bin"), TemporaryFilesFolder = Server.MapPath("/tmp") });

// or individual, per-run options
await FFMpegArguments
    .ProcessAsynchronously(true, new FFOptions { BinaryFolder = "./bin", TemporaryFilesFolder = "/tmp" });

// or combined, setting global defaults and adapting per-run options
GlobalFFOptions.Configure(new FFOptions { BinaryFolder = "./bin", TemporaryFilesFolder = "./globalTmp", WorkingDirectory = "./" });

await FFMpegArguments
    .Configure(options => options.WorkingDirectory = "./CurrentRunWorkingDir")
    .Configure(options => options.TemporaryFilesFolder = "./CurrentRunTmpFolder")

Option 2

The root and temp directory for the ffmpeg binaries can be configured via the ffmpeg.config.json file, which will be read on first use only.

  "BinaryFolder": "./bin",
  "TemporaryFilesFolder": "/tmp"

Supporting both 32 and 64 bit processes

If you wish to support multiple client processor architectures, you can do so by creating two folders, x64 and x86, in the BinaryFolder directory. Both folders should contain the binaries (ffmpeg.exe and ffprobe.exe) built for the respective architectures.

By doing so, the library will attempt to use either /{BinaryFolder}/{ARCH}/(ffmpeg|ffprobe).exe.

If these folders are not defined, it will try to find the binaries in /{BinaryFolder}/(ffmpeg|ffprobe.exe).

(.exe is only appended on Windows)


Older versions of ffmpeg might not support all ffmpeg arguments available through this library. The library has been tested with version 3.3 to 4.2

Code contributors

<a href="https://github.com/rosenbjerg/ffmpegcore/graphs/contributors"> <img src="https://contrib.rocks/image?repo=rosenbjerg/ffmpegcore" /> </a>

Other contributors

<a href="https://github.com/tiesont"><img src="https://avatars3.githubusercontent.com/u/420293?v=4" title="tiesont" width="80" height="80"></a>


Copyright © 2023

Released under MIT license

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (20)

Showing the top 5 NuGet packages that depend on FFMpegCore:

Package Downloads
SIL.Media The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

SIL.Media contains Windows Forms UI elements and classes for processing audio on Windows and Linux.


Fsel Core Package


Headless CMS based on ASP.NET Core and Blazor


Package Description


Image extension for FFMpegCore using System.Common.Drawing

GitHub repositories (9)

Showing the top 5 popular GitHub repositories that depend on FFMpegCore:

Repository Stars
哔哩哔哩UWP Lite
Resources for visualizing data using C# and the .NET platform
Dorisoy.Pan 是基于.net core8 的跨平台文档管理系统,使用 MS SQL 2012 / MySql8.0(或更高版本)后端数据库,您可以在 Windows、Linux 或 Mac 上运行它,项目中的所有方法都是异步的,支持令牌基身份验证,项目体系结构遵循著名的软件模式和最佳安全实践。源代码是完全可定制的,热插拔且清晰的体系结构,使开发定制功能和遵循任何业务需求变得容易。 系统使用最新的 Microsoft 技术,高性能稳定性和安全性
An instruction trace visualisation tool for dynamic program analysis
Version Downloads Last updated
5.1.0 542,716 3/15/2023
5.0.2 71,168 2/21/2023
5.0.1 4,047 2/16/2023
5.0.0 28,023 2/4/2023
4.8.0 303,226 4/15/2022
4.7.0 115,122 1/8/2022
4.6.0 102,424 11/1/2021
4.5.0 45,979 8/12/2021
4.4.0 20,471 7/15/2021
4.3.0 33,239 6/8/2021
4.2.0 14,630 5/14/2021
4.1.0 41,150 3/15/2021
4.0.0 13,355 3/6/2021
3.4.0 6,706 2/3/2021
3.3.0 7,434 12/19/2020
3.2.4 34,351 12/9/2020
3.2.3 1,470 12/9/2020
3.2.2 1,576 12/7/2020
3.2.1 1,621 12/5/2020
3.2.0 8,132 11/25/2020
3.1.0 11,916 10/28/2020
3.0.0 6,042 10/24/2020
2.2.6 18,576 8/10/2020
2.2.5 4,204 8/8/2020
2.2.4 2,815 7/26/2020
2.2.3 1,633 7/25/2020
2.2.2 3,405 7/13/2020
2.2.1 7,479 6/23/2020
2.2.0 1,949 6/20/2020
2.1.1 1,508 6/19/2020
2.1.0 1,568 6/18/2020
2.0.1 3,556 6/6/2020
2.0.0 1,934 5/24/2020
1.4.0 3,802 5/6/2020
1.3.3 3,276 4/15/2020
1.3.2 1,583 4/14/2020
1.3.1 6,966 3/1/2020
1.3.0 1,498 3/1/2020
1.2.0 1,587 2/25/2020
1.1.0 1,657 2/21/2020
1.0.12 3,780 1/29/2020
1.0.11 15,613 9/30/2019
1.0.10 8,302 5/20/2019
1.0.9 1,694 5/11/2019
1.0.8 3,915 5/3/2019
1.0.7 5,878 4/1/2019
1.0.6 3,453 3/27/2019
1.0.5 5,824 3/4/2019
1.0.4 3,691 3/2/2019
1.0.2 3,515 2/26/2019
1.0.1 3,617 2/26/2019
1.0.0 5,378 2/8/2019