Chase.FFmpeg
0.0.7
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Chase.FFmpeg --version 0.0.7
NuGet\Install-Package Chase.FFmpeg -Version 0.0.7
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="Chase.FFmpeg" Version="0.0.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Chase.FFmpeg --version 0.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Chase.FFmpeg, 0.0.7"
#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 Chase.FFmpeg as a Cake Addin #addin nuget:?package=Chase.FFmpeg&version=0.0.7 // Install Chase.FFmpeg as a Cake Tool #tool nuget:?package=Chase.FFmpeg&version=0.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Chase.FFmpeg
Using Statements
using Chase.FFmpeg.Converters;
using Chase.FFmpeg.Info;
using Chase.FFmpeg.Events;
using Chase.FFmpeg;
Create media info object
FFMediaInfo info = new FFMediaInfo("/path/to/media.mkv");
Create Muxed converter
FFMuxedConverter converter = FFMuxedConverter.SetMedia(info)
Muxed converter options
Changes the video codec
.ChangeVideoCodec("h264_nvenc")
Changes the video bitrate
.ChangeVideoBitrate("2M")
Changes the audio codec
.ChangeAudioCodec("aac")
Changes the audio bitrate
.ChangeAudioBitrate("200K")
Changes the hardware acceleration method
.ChangeHardwareAccelerationMethod()
Changes the pixel format of the video
.ChangePixelFormat("y2k")
Changes the width and height of the video stream
.ChangeResolution(800, 600)
Changes the width of the video while maintaining aspect ratio
.ChangeWidth(800)
Changes the height of the video while maintaining aspect ratio
.ChangeHeight(600)
The position that the video starts at
.ChangeStartPosition("00:00:00")
Changes the duration of the video
.ChangeVideoDuration("00:15:00")
Overwrites output file if one exists
.OverwriteOriginal();
Events
/// The console output of ffmpeg
DataReceivedEventHandler? data_handler = (object s, DataReceivedEventArgs e) => { };
/// Runs when ffmpeg exists
EventHandler exited = (object sender, EventArgs e) => { };
/// Returns ffmpeg update values
EventHandler<FFProcessUpdateEventArgs> updated = (object sender, FFProcessUpdateEventArgs e) =>
{
/// The bitrate that the video is being processed at
float bitrate = e.AverageBitrate;
/// The number of frames already processed
uint frames = e.FramesProcessed;
/// The percentage of the video has been processed
float percentage = e.Percentage;
/// The speed that the video is processing at
float speed = e.Speed;
};
Converts the current Muxed Converter
.Convert("/path/to/output.mkv", data_handler, exited, updated);
Builds a ffmpeg argument string
.Build("/path/to/output.mkv")
Example
string argument = FFMuxedConverter
.SetMedia(info)
.ChangeVideoCodec("h264_nvenc")
.ChangeVideoBitrate("2M")
.ChangeHardwareAccelerationMethod()
.ChangeResolution(800, 600)
.OverwriteOriginal()
.Build("/path/to/output.mkv");
FFProcessHandler.ExecuteFFmpeg(argument, data_handler, exited, updated);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Chase.FFmpeg.Downloader (>= 0.0.4)
- CLMath (>= 0.1.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Chase.FFmpeg:
Package | Downloads |
---|---|
Chase.FFmpeg.Extra
Adds extra functionality to Chase.FFmpeg |
GitHub repositories
This package is not used by any popular GitHub repositories.
Convert method will now return the Process