Cross Platform C # Media API

I am trying to define a VideoFile in a mono / .net object so that I can call

var file = new VideoFile(filepath); file.VideoDuration 

Is there a library (os or commercial) that will work through mono / .net platforms that can provide information such as VideoDuration. The only thing I had at the moment was to wrap the ffmpeg.exe file and read the console out-stream.

+4
source share
1 answer

GStreamer is a good option; it is a multimedia infrastructure with a cross-platform. And there are bindings that would suit your needs: access to the information you need (video length) through the .NET API: GStreamerSharp .

Indeed, we actually use it in the Banshee Project , a media player written in C # (which is the default music player bundled with Ubuntu),

BTW, GStreamer is archived in such a way that codecs are plugins, so you have an abstraction between internal elements (e.g. ffmpeg) that other plugins can execute depending on your licensing / format needs.

+6
source

Source: https://habr.com/ru/post/1382344/


All Articles