ImageSharp.AVCodecFormats
3.0.8
See the version list below for details.
dotnet add package ImageSharp.AVCodecFormats --version 3.0.8
NuGet\Install-Package ImageSharp.AVCodecFormats -Version 3.0.8
<PackageReference Include="ImageSharp.AVCodecFormats" Version="3.0.8" />
paket add ImageSharp.AVCodecFormats --version 3.0.8
#r "nuget: ImageSharp.AVCodecFormats, 3.0.8"
// Install ImageSharp.AVCodecFormats as a Cake Addin #addin nuget:?package=ImageSharp.AVCodecFormats&version=3.0.8 // Install ImageSharp.AVCodecFormats as a Cake Tool #tool nuget:?package=ImageSharp.AVCodecFormats&version=3.0.8
ImageSharp.AVCodecFormats
FFmpeg decoders for ImageSharp
Install
via NuGet:
PM> Install-Package ImageSharp.AVCodecFormats
Native libs for x64 Linux and Windows:
PM> Install-Package ImageSharp.AVCodecFormats.Native
also, we can install separate native packages:
PM> Install-Package ImageSharp.AVCodecFormats.Native.win-x64
PM> Install-Package ImageSharp.AVCodecFormats.Native.linux-x64
Without native packages you should provide your own shared FFmpeg build and set path:
FFmpegBinaries.Path = "/path/to/native/binaries"
On Linux you have another way to get native libs. Just install ffmpeg from your package manager, but I have no guarantees that it will work as expected.
Usage
using System.IO;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Jpeg;
using SixLabors.ImageSharp.Processing;
using HeyRed.ImageSharp.AVCodecFormats;
// Create custom configuration with all available decoders
var configuration = new Configuration().WithAVDecoders(); // With options WithAVDecoders(options)
// Or only required decoders
var configuration = new Configuration(
new AviConfigurationModule(),
new MkvConfigurationModule(),
new MovConfigurationModule(),
new Mp4ConfigurationModule(),
new WebmConfigurationModule(),
new WmvConfigurationModule(),
new MpegTsConfigurationModule(),
new Mp3ConfigurationModule());
using var inputStream = File.OpenRead("/path/to/video.mp4");
using var outputStream = File.OpenWrite("/path/to/resized_image.jpeg");
// Pass it into image load method(for example)
using var image = Image.Load(configuration, inputStream);
// Resize
image.Mutate(x => x.Resize(image.Width / 2, image.Height / 2));
// Save using jpeg encoder
image.Save(outputStream, new JpegEncoder());
More info https://docs.sixlabors.com/articles/imagesharp/configuration.html
Blackframe filter
You can skip first (n) of frames that are black or almost black.
var options = new AVDecoderOptions
{
// With default values(see docs)
BlackFilterOptions = new BlackFrameFilterOptions()
};
var configuration = new Configuration().WithAVDecoders(options);
using var inputStream = File.OpenRead(filePath);
using var image = Image.Load(configuration, inputStream);
The docs for filter options can be found here.
Supported formats
mp4, webm, avi, mkv, mov, ts, wmv, mp3(extract cover image).
Supported codecs
Native package provides codecs listed below:
H263, H264, H.265(HEVC), VP8, VP9, AV1, MPEG-4, MJPEG, PNG, MS MPEG4(v1,v2,v3), WMV(v1,v2,v3), VC-1, MPEG-1 Audio Layer 3.
License
Product | Versions 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. |
-
.NETStandard 2.0
- FFmpeg.AutoGen (>= 5.0.0)
- SixLabors.ImageSharp (>= 2.1.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ImageSharp.AVCodecFormats:
Package | Downloads |
---|---|
elfinder.Net8
An elFinder backend connector with less magic code and more compatibility. This enables .NET 8 projects to easily integrate elFinder functionalities. See the example project on Github for usage detail. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
4.6.0 | 2,648 | 1/23/2024 |
4.4.0 | 378 | 12/6/2023 |
4.3.0 | 193 | 11/19/2023 |
4.2.0 | 205 | 10/11/2023 |
4.1.1 | 1,070 | 4/2/2023 |
4.1.0 | 261 | 3/21/2023 |
4.0.0 | 255 | 3/18/2023 |
3.0.8 | 6,239 | 4/25/2022 |
3.0.7 | 447 | 4/24/2022 |
3.0.6 | 447 | 4/14/2022 |
3.0.5 | 464 | 3/29/2022 |
3.0.3 | 458 | 3/23/2022 |
3.0.2 | 425 | 3/16/2022 |
3.0.1 | 461 | 3/8/2022 |
3.0.0 | 465 | 3/2/2022 |
2.2.5 | 424 | 1/10/2022 |
2.2.4 | 5,736 | 12/9/2021 |
2.2.3 | 358 | 10/11/2021 |
2.2.2 | 315 | 10/3/2021 |
2.2.1 | 656 | 4/13/2021 |
2.2.0 | 367 | 4/9/2021 |
2.1.1 | 397 | 1/15/2021 |
2.1.0 | 372 | 1/3/2021 |
2.0.0 | 421 | 1/2/2021 |
1.2.4 | 528 | 12/5/2020 |
1.2.3 | 446 | 10/18/2020 |
1.2.2 | 451 | 10/5/2020 |
1.2.1 | 474 | 10/4/2020 |
1.2.0 | 419 | 10/2/2020 |
1.1.1 | 420 | 10/1/2020 |
1.1.0 | 443 | 9/30/2020 |
1.0.0 | 428 | 9/28/2020 |