Minimal MediaInfo .NET APIs wrapped from MediaArea.net.
Support for Windows Vista, 7, 8, 10, 11 with x86, x64.
- Provide the Media Inform.
using MediaInfoLib;
using MediaInfo lib = new();
lib.Open(@"C:\media.mp4");
Console.WriteLine(lib.Inform());
Useful options.
using MediaInfoLib;
using MediaInfo lib = new();
lib.Open(@"C:\media.mp4");
lib.Option("Complete", "1"); // Set complete output.
lib.Option("Inform", Inform_Format.HTML.ToString()); // Set format to HTML.
lib.Option("Language", Language_ISO639.ChineseSimplified.ToIso639()); // Set language to Chinese.
Console.WriteLine(lib.Inform());
- Check audio track exists.
using MediaInfoLib;
using MediaInfo lib = new();
bool hasAudio = lib.WithOpen(fileName).Count_Get(StreamKind.Audio) > 0;
Console.WriteLine(hasAudio);
- Get audio track parameter.
using MediaInfoLib;
using MediaInfo lib = new();
lib.Open(fileName);
_ = double.TryParse(lib.Get(StreamKind.Audio, 0, "BitRate"), out double bitRate);
Console.WriteLine(bitRate);
-
ConsoleDemo for Console Application.
-
WinFormsDemo for WinForms Application.
-
LyricStudio for Avalonia Application.
https://github.com/MediaArea/MediaInfoLib/blob/master/Source/MediaInfo/MediaInfo_Config.h
https://github.com/MediaArea/MediaInfoLib/blob/master/Source/MediaInfo/File__Analyse_Automatic.h
https://github.com/MediaArea/MediaInfo/tree/master/Source/Resource/Plugin/Language
https://github.com/MediaArea/MediaInfo/blob/master/Source/Resource/Language.csv
MediaInfoLib - https://github.com/MediaArea/MediaInfoLib
Copyright (c) MediaArea.net SARL. All Rights Reserved.
This program is freeware under BSD-2-Clause license conditions.
See License.html for more information