Video Information for .NET C# FFProbe wrapper


features

  • Based on FFProbe tool: supports almost all known video and audio formats (mp4,mp3,wav,avi,flv,mov,mkv and many others)
  • Generic format information: video duration, format name, bitrate, custom tags
  • Media streams information:
    • codec name
    • video frame size (width and height)
    • video frame rate
    • video pixel format
    • stream tags (video orientation, creation time, language etc)
  • Simple information access with MediaInfo properties; other values can be accessed with XPath selectors
  • Easy to use .NET library for getting media information: all you need is one assembly (FFProbe is embedded)
  • Usage examples (C#):
    • Get video format, frame size, codec info, tags
  • Looking for video files converter? Try NReco VideoConverter (ffmpeg wrapper)

download and pricing

quick purchase process

  • 1 Choose a package
  • 2 Pay online Online payment methods
  • 3 Download the package
NReco VideoInfo is a .NET wrapper for FFProbe tool: it analyses media stream and returns detailed information about video format, frame size, duration.

how to use

  1. Add reference to NReco.VideoInfo nuget package
    (NReco.VideoInfo.LT in case of .NET Core)
  2. var ffProbe = new NReco.VideoInfo.FFProbe();
    var videoInfo = ffProbe.GetMediaInfo(pathToVideoFile);
    Console.WriteLine(videoInfo.FormatName);
    Console.WriteLine(videoInfo.Duration);
  3. That's all! See also:
Have a question? Feel free to ask.

try it online

Note: video upload may take some time (up to minute).
Get Video Information

frequently asked questions

VideoInfo can be used for FREE in non-SaaS .NET apps that have only one single-server production deployment.

Commercial license (included into enterprise pack) is required for:
  • Applications for external redistribution (ISV), multiple deployments
  • SaaS deployments
NReco.VideoInfo internally uses FFProbe tool which is based on FFMpeg library; FFMpeg supports almost all known video and audio formats.
Every GetMediaInfo call executes FFProbe in the separate process; this means that component will not work in environments where starting processes with System.Diagnostics.Process is prohibited: partial-trust shared ASP.NET hostings, Azure Apps with 'free' or 'shared' plan.

Component works fine with Azure VM, Azure WebJobs, Azure Service Fabric, Azure Apps (VM-based plans: 'basic' or higher).

Linux/MacOS
Non-Windows deployments are supported with LT version (NReco.VideoInfo.LT nuget): this is a wrapper version without ffprobe.exe, it expects that ffprobe is deployed separately and suitable for Linux/Docker or MacOS, or if you want to use a specific ffprobe version/build.

.NET Core / NET6+
Starting from version 1.2.0 you can use NReco.VideoInfo nuget in modern .NET apps and get leverages of simplified deployment (no need to deploy ffmpeg.exe separately). This nuget can be used only for Windows deployments.

what's new

2023 Jan 18 Version 1.2.0 changes:
  • dropped legacy targets: now only netstandard2.0 and net45 builds are supported
  • ffprobe.exe updated to the latest stable release 5.1.2 (x64 "essentials" build from https://www.gyan.dev/ffmpeg/builds/)
  • now relative path of input file is resolved in respect to the current working directory, not to ffprobe location (ToolPath)
  • fixed an issue that may occur when ExecutionTimeout is set (incomplete XML read from ffprobe stdout)
2018 Jun 12 Version 1.1.1 changes:
  • ffprobe updated to 4.0
2018 Jan 19 Version 1.1.0 changes:
  • ffprobe updated to 3.4.1
  • in ASP.NET apps ffprobe is extracted to 'App_Data' instead of 'bin' folder to prevent app restart
2017 Mar 09 Added LT version (without embedded ffprobe binaries) that can be used with .NET Core and non-Windows environment.
2015 Aug 08 Initial VideoInfo component release v.1.0.0

more components

  • VideoConverter

    .NET wrapper for FFMpeg utility for converting media files (video, audio). Can be used for video thumbnail extraction, live media stream transcoding etc.

  • Image Generator

    .NET wrapper WkHtmlToImage utility that generate pretty-looking images by HTML layout.