![]() |
VOOZH | about |
dotnet add package DoenaSoft.MediaInfoHelper --version 3.3.0
NuGet\Install-Package DoenaSoft.MediaInfoHelper -Version 3.3.0
<PackageReference Include="DoenaSoft.MediaInfoHelper" Version="3.3.0" />
<PackageVersion Include="DoenaSoft.MediaInfoHelper" Version="3.3.0" />Directory.Packages.props
<PackageReference Include="DoenaSoft.MediaInfoHelper" />Project file
paket add DoenaSoft.MediaInfoHelper --version 3.3.0
#r "nuget: DoenaSoft.MediaInfoHelper, 3.3.0"
#:package DoenaSoft.MediaInfoHelper@3.3.0
#addin nuget:?package=DoenaSoft.MediaInfoHelper&version=3.3.0Install as a Cake Addin
#tool nuget:?package=DoenaSoft.MediaInfoHelper&version=3.3.0Install as a Cake Tool
A .NET library to query audio and video files for their metadata information.
DoenaSoft.MediaInfoHelper is a comprehensive library that provides easy access to metadata from various media file formats including video files and audio books. It wraps popular media information libraries and provides a unified interface for extracting technical details and metadata from media files.
Install via NuGet Package Manager:
Install-Package DoenaSoft.MediaInfoHelper
Or via .NET CLI:
dotnet add package DoenaSoft.MediaInfoHelper
using DoenaSoft.MediaInfoHelper.DataObjects;
using DoenaSoft.MediaInfoHelper.Readers;
// Create a media file object
var mediaFile = new MediaFile { FileName = @"C:\path\to\video.mp4" };
// Create a video reader
var videoReader = new VideoReader(mediaFile);
// Determine the length of the video
videoReader.DetermineLength();
// Access the length
uint durationInSeconds = mediaFile.Length;
using DoenaSoft.MediaInfoHelper.Readers;
// Create an audio book reader
var audioBookReader = new AudioBookReader();
// Get total length of audio files in a directory
var directoryInfo = new DirectoryInfo(@"C:\path\to\audiobook");
var totalLength = audioBookReader.GetLength(directoryInfo);
Console.WriteLine($"Hours: {totalLength.Hours}");
Console.WriteLine($"Minutes: {totalLength.Minutes}");
Console.WriteLine($"Seconds: {totalLength.Seconds}");
using DoenaSoft.MediaInfoHelper.Helpers;
// Implement your own language provider
public class CustomLanguageProvider : ILanguageProvider
{
public string StandardizeLanguage(string language)
{
// Your custom language standardization logic
return language?.ToLower();
}
public int GetLanguageWeight(string language)
{
// Your custom language priority (lower = higher priority)
return 100;
}
}
// Configure at application startup
MediaInfoConfiguration.LanguageProvider = new CustomLanguageProvider();
using DoenaSoft.MediaInfoHelper.Helpers;
// Implement your own subtitle extension provider
public class CustomSubtitleProvider : ISubtitleExtensionProvider
{
public IEnumerable<string> GetSubtitleExtensions()
{
// Return the subtitle formats you want to support
return new[] { "srt", "vtt", "ass" };
}
}
// Configure at application startup
MediaInfoConfiguration.SubtitleExtensionProvider = new CustomSubtitleProvider();
The library includes a default language provider that standardizes common language codes:
You can implement ILanguageProvider to define your own language handling logic.
The library includes a default subtitle extension provider that supports:
You can implement ISubtitleExtensionProvider to customize which subtitle formats are detected.
For detailed documentation on customization, see:
The library provides strongly-typed classes for different types of media:
MediaFile - General media file informationVideoMeta - Video-specific metadataAudioBookMeta - Audio book metadata including chapters and rolesFFProbeMeta - Raw FFProbe output dataTimeParts - Time duration broken into hours, minutes, secondsThis project is licensed under the MIT License.
DJ Doena Doena Soft.
https://github.com/DJDoena/MediaInfoHelper
For issues, questions, or contributions, please visit the GitHub repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net472 net472 is compatible. net48 net48 was computed. net481 net481 was computed. |
Showing the top 3 NuGet packages that depend on DoenaSoft.MediaInfoHelper:
| Package | Downloads |
|---|---|
|
DoenaSoft.CopySeries.Xml
XML schemas for handling CopySeries |
|
|
DoenaSoft.WatchHistory.Xml
XML schemas for handling WatchHistory |
|
|
DoenaSoft.CalculateAudioBookRunningTimes
A library for extracting and calculating audiobook metadata including running times, chapters, authors, and narrators. Supports MP3 and MP4 audiobook formats with customizable interaction handling. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.3.0 | 165 | 4/23/2026 |
| 3.2.3 | 142 | 4/17/2026 |
| 3.2.2 | 130 | 4/17/2026 |
| 3.2.1 | 107 | 4/17/2026 |
| 3.2.0 | 128 | 4/17/2026 |
| 3.1.12 | 190 | 3/30/2026 |
| 3.1.11 | 144 | 3/29/2026 |
| 3.1.10 | 151 | 2/14/2026 |
| 3.1.9 | 491 | 12/10/2025 |
| 3.1.8 | 252 | 11/26/2025 |
| 3.1.7 | 341 | 4/20/2025 |
| 3.1.6 | 290 | 9/28/2024 |
| 3.1.5 | 395 | 12/5/2023 |
| 3.1.4 | 235 | 12/5/2023 |
| 3.1.3 | 259 | 12/3/2023 |
| 3.1.2 | 259 | 10/6/2023 |
| 3.1.1 | 366 | 9/12/2023 |
| 3.1.0 | 300 | 8/28/2023 |
| 3.0.6 | 434 | 8/27/2023 |
| 3.0.5 | 373 | 8/25/2023 |