FFmpegArgs.Filters
2.1.0
dotnet add package FFmpegArgs.Filters --version 2.1.0
NuGet\Install-Package FFmpegArgs.Filters -Version 2.1.0
<PackageReference Include="FFmpegArgs.Filters" Version="2.1.0" />
<PackageVersion Include="FFmpegArgs.Filters" Version="2.1.0" />
<PackageReference Include="FFmpegArgs.Filters" />
paket add FFmpegArgs.Filters --version 2.1.0
#r "nuget: FFmpegArgs.Filters, 2.1.0"
#:package FFmpegArgs.Filters@2.1.0
#addin nuget:?package=FFmpegArgs.Filters&version=2.1.0
#tool nuget:?package=FFmpegArgs.Filters&version=2.1.0
FFmpegArgs
FFmpegArgs is a cli-wrapper library support generate argument for ffmpeg executable.
The standout feature that many cli-wrapper libraries don't have is the FFmpeg FilterGraph system.
Get it on NuGet Package
- Support file/url/pipe in/output.
- Works on most systems - if ffmpeg can execution.
- 130+ filters, add more in future
- 380+ filters auto-generate
Example
FFmpegArg ffmpegArg = new FFmpegArg()
.OverWriteOutput();//global extension
var green_video = ffmpegArg.AddVideoInput(
new VideoFileInput(@"chromakey.mp4")
.SsPosition(TimeSpan.FromSeconds(0.5))//input extension ( -ss )
.AndSet(
x => x.ImageInputAVStream//input video stream
.R(24)//input, video, per-stream extension ( -r )
)
);
var background_videoMap = ffmpegArg.AddVideoInput(new VideoFileInput(@"background.mp4")
.SsPosition(TimeSpan.FromSeconds(1))
.ToPosition(TimeSpan.FromSeconds(10)));
var image_maps = green_video.ImageMaps.First()
.ColorKeyFilter()//ColorKey Filter
.Color(Color.FromArgb(101, 220, 8))
.Similarity(0.25f)
.Enable("between(t,0,10)").MapOut//Filter had ITimelineSupport
.ScaleFilter().W("iw/3").H("ih/3").MapOut//Scale Filter
.SplitFilter(2).MapsOut;//Split Filter
var overlay_map = image_maps.First()
//overlay color_key on-center background_video
.OverlayFilterOn(background_videoMap.ImageMaps.First()).X("(W-w)/2").Y("(H-h)/2").MapOut;
ffmpegArg.AddOutput(
new VideoFileOutput(@"out.mp4", overlay_map, background_videoMap.AudioMaps.First())
.T(TimeSpan.FromSeconds(5))//output extension ( -t )
.AndSet(
x => x.ImageOutputAVStream//output video stream
.R(24)//output, video, per-stream extension ( -r )
)
);
ffmpegArg.AddOutput(
new VideoFileOutput(@"out2.mp4", image_maps.Last(), background_videoMap.AudioMaps.First())
.AndSet(x => x.ImageOutputAVStream.R(30)));
var renderResult = ffmpegArg
.Render(c => c
.WithFFmpegBinaryPath("path to ffmpeg")//or default ffmpeg from PATH
.WithWorkingDirectory("path to working folder")//or default Directory.GetCurrentDirectory()
)
.Execute();
For more example, see FFmpegArgs.Test
- Option/Flag not found?
We can extend for FFmpegArg, Filter, Input, Output, AVStream by extension.
.SetOption("your option","option value")
.SetOptionRange("your option", val, min, max)
.SetFlag("your flag")
- Filter not found?
We can write new Filter class, so much example in FFmpegArgs.Filters
Pull request or request missing feature are welcome.
Recommend namespace
using FFmpegArgs;
using FFmpegArgs.Cores;
using FFmpegArgs.Cores.Enums;
using FFmpegArgs.Cores.Exceptions;
using FFmpegArgs.Cores.Inputs;
using FFmpegArgs.Cores.Filters;
using FFmpegArgs.Cores.Interfaces;
using FFmpegArgs.Cores.Maps;
using FFmpegArgs.Cores.Streams;
using FFmpegArgs.Filters;
using FFmpegArgs.Filters.Exceptions;
using FFmpegArgs.Filters.Attributes;
using FFmpegArgs.Filters.Expressions;
using FFmpegArgs.Filters.AudioFilters;
using FFmpegArgs.Filters.VideoFilters;
using FFmpegArgs.Filters.Multimedia;
using FFmpegArgs.Filters.VideoSources;
using FFmpegArgs.Filters.AudioSources;
//using FFmpegArgs.Filters.Generated;
using FFmpegArgs.Executes;
using FFmpegArgs.Inputs;
using FFmpegArgs.Outputs;
LICENCE
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.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. |
-
.NETStandard 2.0
- FFmpegArgs.Cores (>= 2.1.0 && < 2.2.0)
- FFmpegArgs.Extensions (>= 2.1.0 && < 2.2.0)
-
net6.0
- FFmpegArgs.Cores (>= 2.1.0 && < 2.2.0)
- FFmpegArgs.Extensions (>= 2.1.0 && < 2.2.0)
-
net8.0
- FFmpegArgs.Cores (>= 2.1.0 && < 2.2.0)
- FFmpegArgs.Extensions (>= 2.1.0 && < 2.2.0)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on FFmpegArgs.Filters:
| Package | Downloads |
|---|---|
|
MediaMaker
以图层叠加的模式编辑视频,生成JSON格式的通用配置,基于FFMpegArgs操作ffmpeg,最终形成可用的视频文件。 |
|
|
FFmpegArgs.Filters.Generated
Filters auto generated for FFmpegArgs |
|
|
FFmpegArgs.Filters.VideoSources
Filters.VideoSources for FFmpegArgs |
|
|
FFmpegArgs.Filters.OpenCLVideoFilters
Filters.OpenCLVideoFilters for FFmpegArgs |
|
|
FFmpegArgs.Filters.Multimedia
Filters.Multimedia for FFmpegArgs |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.0 | 376 | 10/23/2025 |
| 2.0.1 | 559 | 1/8/2025 |
| 2.0.1-build241114 | 154 | 11/14/2024 |
| 2.0.0 | 762 | 7/16/2024 |
| 1.6.1 | 642 | 1/16/2024 |
| 1.5.2 | 554 | 5/5/2023 |
| 1.5.0 | 830 | 6/6/2022 |
| 1.4.3 | 2,074 | 4/11/2022 |
| 1.4.2 | 624 | 3/28/2022 |
| 1.4.1 | 587 | 3/26/2022 |
| 1.4.0 | 641 | 2/28/2022 |
| 1.3.0 | 665 | 2/11/2022 |
| 1.2.0 | 638 | 1/13/2022 |
| 1.1.2-build220107 | 391 | 1/7/2022 |
| 1.1.1 | 495 | 1/5/2022 |
| 1.1.0 | 490 | 12/27/2021 |