C# 视频转换器库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2325279/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
C# Video Converter library
提问by Rune
I am looking for a C# library(not commandline), commerical or free, that has the power similar to FFempeg. Video encoding is most important.
我正在寻找一个 C# 库(不是命令行),无论是商业的还是免费的,它的功能类似于 FFempeg。视频编码是最重要的。
Any suggestions?
有什么建议?
Best Regards, Rune
最好的问候,符文
采纳答案by Laserson
You can try Mencoder GUI. It is no library (winforms application) but you can download sources and make anything you need: http://sourceforge.net/projects/mewig/files/(you'll need mencoder.exe - www.mplayerhq.hu)
你可以试试 Mencoder GUI。它不是库(winforms 应用程序),但您可以下载源代码并制作您需要的任何内容:http: //sourceforge.net/projects/mewig/files/(您需要 mencoder.exe - www.mplayerhq.hu)
回答by Macros
回答by vkantchev
AVBlocks SDKprovides a .NET API that can be used from C# and VB.NET. AVBlocks supports most major audio and video codecs.
AVBlocks SDK提供了一个可以从 C# 和 VB.NET 使用的 .NET API。AVBlocks 支持大多数主要的音频和视频编解码器。
回答by Vitaliy Fedorchenko
Try out NReco.VideoConverter- free all-in-one-DLL .NET FFMpeg wrapper. It executes ffmpeg as separate process (not linked with ffmpeg DLL) so all GPL codecs are available.
试用NReco.VideoConverter- 免费的多合一 DLL .NET FFMpeg 包装器。它将 ffmpeg 作为单独的进程执行(不与 ffmpeg DLL 链接),因此所有 GPL 编解码器都可用。
回答by Tomasz ?muda
You can use this nuget package:
你可以使用这个 nuget 包:
I haven't seen any project fullfilling my expectaction so i decided to make my own. You can easily queue conversions and run it parallel, methods to convert media to different formats, send your own arguments to ffmpeg and parse output from ffmpeg + event listener with current progress.
我还没有看到任何项目能满足我的期望,所以我决定自己做。您可以轻松地将转换排队并并行运行,将媒体转换为不同格式的方法,将您自己的参数发送到 ffmpeg 并使用当前进度解析来自 ffmpeg + 事件侦听器的输出。
Install-Package Xabe.FFmpeg
Install-Package Xabe.FFmpeg
I'm trying to make easy to use, cross-platform FFmpeg wrapper.
我正在尝试制作易于使用的跨平台 FFmpeg 包装器。
You can find more information about this at Xabe.FFmpeg
您可以在Xabe.FFmpeg 上找到有关此的更多信息
More info here: Xabe.FFmpeg Documentation
更多信息:Xabe.FFmpeg 文档
Conversion is simple:
转换很简单:
IConversionResult result = await Conversion.ToMp4(Resources.MkvWithAudio, output).Start();
If you want progress:
如果你想进步:
IConversion conversion = Conversion.ToMp4(Resources.MkvWithAudio, output);
conversion.OnProgress += (duration, length) => { currentProgress = duration; }
await conversion.Start();