Cross Platform C# Media API

2019-06-23 17:34发布

I'm trying to define a VideoFile in mono/.net object such that I can call

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

Is there a library (os or commercial) which will work across platforms mono/.net which can provide information such as VideoDuration. The only though I have had on this currently is to wrap ffmpeg.exe and read the console out-stream.

1条回答
淡お忘
2楼-- · 2019-06-23 18:32

GStreamer is good option, it's a cross platform multimedia framework. And there are bindings that would meet your needs: access the information you require (length of a video file) via a .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 in Ubuntu).

BTW, GStreamer is architected in a way that codecs are plugins, so you have an abstraction between the internals of them (i.e. ffmpeg) which other plugins could fulfill depending on your licensing/format needs.

查看更多
登录 后发表回答