CommonNetFuncs.Media.Ffmpeg 3.7.1

dotnet add package CommonNetFuncs.Media.Ffmpeg --version 3.7.1
                    
NuGet\Install-Package CommonNetFuncs.Media.Ffmpeg -Version 3.7.1
                    
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="CommonNetFuncs.Media.Ffmpeg" Version="3.7.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommonNetFuncs.Media.Ffmpeg" Version="3.7.1" />
                    
Directory.Packages.props
<PackageReference Include="CommonNetFuncs.Media.Ffmpeg" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CommonNetFuncs.Media.Ffmpeg --version 3.7.1
                    
#r "nuget: CommonNetFuncs.Media.Ffmpeg, 3.7.1"
                    
#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.
#:package CommonNetFuncs.Media.Ffmpeg@3.7.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CommonNetFuncs.Media.Ffmpeg&version=3.7.1
                    
Install as a Cake Addin
#tool nuget:?package=CommonNetFuncs.Media.Ffmpeg&version=3.7.1
                    
Install as a Cake Tool

CommonNetFuncs.Media.Ffmpeg

nuget

This project contains helper methods using Xabe.FFMpeg including file conversion and video metadata extraction.

Contents


ConversionTask

[Description here]

ConversionTask Usage Examples

<details> <summary><h3>Usage Examples</h3></summary>

FfmpegConversionTask

Run a task using FFmpeg CLI commands or built-in Xabe.FFmpeg configurations. Outputs standardized information emitted by FFmpeg during conversion.

bool success = await ConversionTask.FfmpegConversionTask(
  @"C:\path\to\source\file.mp4", // File to convert
  "ConvertedFile.mp4", // Output file name
  "-c:v libsvtav1 -c:a copy -row-mt true -crf 29 -preset 4 -g 290 -cpu-used 0 -movflags faststart -fpsmax 30 -svtav1-params tune=0:scd=1:scm=0:fast-decode=1 -pix_fmt yuv420p10le -y"; // FFMpeg command line arguments
); // Outputs progress and returns true if successful. "ConvertedFile.mp4" will be emitted

Helpers

Helper methods to make using FFMpeg easier, including getting attributes using FFMpeg as well as parsing FFMpeg output.

Helpers Usage Examples

<details> <summary><h3>Usage Examples</h3></summary>

GetTotalFps

Gets the total frames per second (FPS) conversion rate of all videos being converted and sharing the same fpsDict (ConcurrentDictionary<int, decimal> where the key is the ID of the conversion task and the value is the conversion rate in FPS for that task).

decimal totalFps = Helpers.GetTotalFps(fpsDict); // Sum of all FPS values in fpsDict
ParseFfmpegLogFps

Extracts the FPS value from a given FFMpeg log line.

decimal fps = ffmpegLogLine.ParseFfmpegLogFps(); // Gets the FPS value as a decimal
GetTotalFileDif

Gets the total difference in file size between all source and destination files that have been processed and had their output recorded with RecordResults in a ConcurrentBag<string> object.

string totalDifference = Helpers.GetTotalFileDif(conversionOutputs); // -543.21 MB <-- all outputs are 543.21 MB smaller than all of their source files
RecordResults

Records the results of a conversion task, including file name, success status, original file size, and converted file size, into a ConcurrentBag<string> for later retrieval and optionally to a text file as well.

Helpers.RecordResults(
  "FileToConvert.mp4", // Name of the file being converted
  true, // Success status
  conversionOutputs,// ConcurrentBag<string> to store results
  "ConversionResults.txt", // Optional file path to save results to
  1234567890, // Original file size in bytes
  987654321 // Converted file size in bytes
);

// Recorded output will be in the format:
// "FileName=FileToConvert.mp4,Success=true,OriginalSize=1.15 GB,EndSize=941.9 MB,SizeRatio=80%,SizeDif=-246,913,569"
GetVideoMetadata

Gets the specified metadata from a video file using FFMpeg. Valid metadata options are indicated using the EVideoMetadata enum.

@"C:\path\to\video.mp4".GetVideoMetadata(EVideoMetadata.Codec_Name); // Returns the codec name used to encode video.mp4
GetFrameRate

Gets the frame rate of the spcified video file using FFMpeg.

@"C:\path\to\video.mp4".GetFrameRate(); // Returns the frame rate of video.mp4 as a decimal ie 29.97
GetKeyFrameSpacing

Gets the key frame spacing of the specified video file using FFMpeg. Optionally specify

@"C:\path\to\video.mp4".GetKeyFrameSpacing(20, 30); // Returns the key frame spacing using the average of 20 samples that are 30 seconds long of video.mp4 as a decimal ie 30.0

</details>

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.7.1 51 8/22/2025
3.7.0 88 8/18/2025
3.6.27 85 8/18/2025
3.6.26 97 8/14/2025
3.6.25 93 8/13/2025
3.6.24 113 8/12/2025
3.6.19 97 7/28/2025
3.6.18 323 7/25/2025
3.6.6 442 7/21/2025
3.6.1 136 7/14/2025
3.6.0 158 7/14/2025
3.5.3 137 7/10/2025
3.5.0 148 7/7/2025
3.4.23 142 6/26/2025
3.4.21 134 6/26/2025
3.4.20 142 6/25/2025
3.4.18 140 6/23/2025
3.4.14 141 6/17/2025
3.4.8 284 6/11/2025
3.4.2 146 6/2/2025
3.4.1 93 5/30/2025
3.4.0 95 5/30/2025
3.3.12 152 5/19/2025
3.3.11 150 5/19/2025
3.3.10 235 5/13/2025
3.3.0 156 4/29/2025
3.2.22 243 3/12/2025
3.2.14 122 2/20/2025
3.2.13 130 2/13/2025
3.2.9 122 2/4/2025
3.2.0 119 12/19/2024
3.1.0 138 12/6/2024
3.0.0 127 12/3/2024
2.1.3 118 12/3/2024
2.1.0 120 12/2/2024