跨平台的C#媒体API [英] Cross Platform C# Media API

查看:127
本文介绍了跨平台的C#媒体API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图定义一个单声道VideoFile / .NET对象,这样我可以叫

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

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

有一个库(OS或商业),这将跨平台的单声道/ .NET,可以提供诸如VideoDuration工作。唯一的,虽然我已经对这个目前是包装ffmpeg.exe并宣读了控制台输出流。

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.

推荐答案

的GStreamer 是不错的选择,它是一个跨平台的多媒体框架。而且有绑定,将满足您的需求:通过.NET API访问您所需要的信息(视频文件的长度)的 GStreamerSharp

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.

事实上,我们实际使用它在女妖项目,媒体播放器写在C#(这是默认的音乐播放器捆绑在Ubuntu) 。

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

顺便说一句,GStreamer是架构的方式,codeCS的插件,所以你让他们(即ffmpeg)来哪些其他插件可能会根据您的许可/格式需要履行的内部之间的一个抽象。

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.

这篇关于跨平台的C#媒体API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆