Free.NET Library for Manipulating Video File Formats

Convert & Process Video files via .NET API.

MediaToolkit is an open source API to manipulate video files programmatically. The API allows the .NET Developer to effortlessly convert, slice and get metadata of video files. MediaTookit API is a wrapper for FFmpeg. It is a free multimedia framework containing multiple video codecs.

Using the API, you can resolve video metadata and transcode video into other formats using parameters including Bit rate, Frame rate, Resolution, Aspect ratio, Seek position, Duration, Sample rate and Media Format.

Previous Next

Getting Started with MediaToolkit

The best way to install MediaToolkit is via NuGet you can run the following command and install MediaToolkit in you application.

Install MediaToolkit from NuGet

 Install-Package MediaToolkit

Free C# API to Retrieve Video Metadata

The API allows the developers to retrieve metadata of video file formats. The developers can extract audio metadata inside their own application. In order to get metadata of audio file format the API provides the GetMetadata() method. By using the following lines of code, you can easily get metadata of audio file format.

Retrieve Audio Metadata

  1. Import MediaFile
  2. Initialize MediaToolkit's Engine and Get audio metadata using Engine.GetMetadata(inputFile) method and pass MediaFile as parameter
  3. Print Metadata

Resize Image via Free GO API

var inputFile = new MediaFile {Filename = @"C:\Path\Audio.mp3"};
using (var engine = new Engine())
{
 engine.GetMetadata(inputFile);
}
Console.WriteLine(inputFile.Metadata.Duration);