GithubHelp home page GithubHelp logo

alturosdestinations / alturos.videoinfo Goto Github PK

View Code? Open in Web Editor NEW
16.0 1.0 7.0 53 KB

C# Video Metadata reader (ffprobe wrapper)

License: MIT License

C# 100.00%
ffprobe dotnet mp4 video wrapper csharp dotnet-core videoinfo video-metadata video-duration

alturos.videoinfo's Introduction

Alturos.VideoInfo

Alturos.VideoInfo

With this project you can access the metadata of a video (e.g. its duration, bitrate, codec, etc.).

This project uses a wrapper for ffprobe in order to achieve this. ffprobe is a part of FFmpeg and extracts information from multimedia streams in a way the output is readable by humans and machines alike. It's required for this project to work.

The project comes with a class that automatically downloads the tool for you.

Installation via NuGet

Quickly install Alturos.VideoInfo via NuGet by pasting this into the Package Manager Console:

PM> Install-Package Alturos.VideoInfo

Usage Example

var videoFilePath = "myVideo.mp4";
var ffprobePath = @"ffmpeg\ffprobe.exe";

var videoAnalyer = new VideoAnalyzer(ffprobePath);
var analyzeResult = await videoAnalyer.GetVideoInfoAsync(videoFilePath);
var videoInfo = analyzeResult.VideoInfo;

//videoInfo.Format.Filename = "TestVideos\\video1.mp4"
//videoInfo.Format.NbStreams = 1
//videoInfo.Format.NbPrograms = 0
//videoInfo.Format.FormatName = "mov,mp4,m4a,3gp,3g2,mj2"
//videoInfo.Format.FormatLongName = "QuickTime / MOV"
//videoInfo.Format.StartTime = 0
//videoInfo.Format.Duration = 120 //seconds
//videoInfo.Format.Size = 2088470 //bytes
//videoInfo.Format.BitRate = 139231
//videoInfo.Format.ProbeScore = 100
//videoInfo.Format.Tags["encoder"] = Lavf57.76.100
//videoInfo.Streams[0].CodecType = "video" //Video, Audio
//videoInfo.Streams[0]...

Downloading ffprobe via code

Currently Windows and MacOS are supported

var fileDownloader = new FileDownloader();
var result = await fileDownloader.DownloadAsync("ffmpeg");

//if (result.Successful)
//{
//	var ffprobePath = result.FfprobePath;
//}

alturos.videoinfo's People

Contributors

bernhardpetautschnig avatar lkneringer avatar tinohager avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

alturos.videoinfo's Issues

The pipe has been ended

Hi, when i try to get video info by byte array i am getting
System.IO.IOException: The pipe has been ended.
2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.