适用于 Windows 开发的 GStreamer 或 DirectShow?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1915184/
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
GStreamer or DirectShow for Windows development?
提问by StackedCrooked
I'm implementing a lecture-capture project for a local university. Multiple video streams will arrive at one PC: the presenter's desktop slides, a video camera image of the presenter himself and optionally a digital whiteboard capture. These incoming streams will be managed by a desktop application that displays, transcodes/mixes and eventually saves them to disk. There will be some configuration options because the material can be distributed in various ways: as a Flash application on a DVD, as an online Flash application or as a video-on-demand stream for Windows Media Player.
我正在为当地大学实施一个讲座捕获项目。多个视频流将到达一台 PC:演示者的桌面幻灯片、演示者本人的摄像机图像以及可选的数字白板捕获。这些传入的流将由桌面应用程序管理,该应用程序显示、转码/混合并最终将它们保存到磁盘。将有一些配置选项,因为材料可以通过多种方式分发:作为 DVD 上的 Flash 应用程序、作为在线 Flash 应用程序或作为 Windows Media Player 的视频点播流。
This application should work on Windows. Optionally it can support other platforms, but it doesn't seem to be high priority.
此应用程序应该可以在 Windows 上运行。可选地,它可以支持其他平台,但它似乎不是高优先级。
Both GStreamer and DirectShow seem capable of providing the underlying technology. I have a little experience with GStreamer on Linux, and I like its design, so I'm inclined to use it for this project. However, I don't know how well it is supported on Windows. I couldn't find any recent docs on how to build GStreamer on Windows. So I'm afraid I'll get stuck somewhere in the process.
GStreamer 和 DirectShow 似乎都能够提供底层技术。我对 Linux 上的 GStreamer 有一点经验,我喜欢它的设计,所以我倾向于在这个项目中使用它。但是,我不知道它在 Windows 上的支持情况如何。我找不到任何关于如何在 Windows 上构建 GStreamer 的最新文档。所以我担心我会在这个过程中陷入困境。
DirectShow seems like a safer option because it is much more widely used and there is much more documentation available for it on the internet.
DirectShow 似乎是一个更安全的选择,因为它的使用范围更广,而且 Internet 上有更多可用的文档。
Does anyone here have experience using GStreamer on Windows? Does it work well? Are there certain issues that I should be aware of?
这里有人有在 Windows 上使用 GStreamer 的经验吗?它运作良好吗?是否有一些我应该注意的问题?
Edit
I discovered the GStreamer OSSBuildswebsite and was able to quickly implement a simple video player (based on the 'playbin' element) with it. So I think I'll pursue the GStreamer path a little further.
编辑
我发现了GStreamer OSSBuilds网站,并能够使用它快速实现一个简单的视频播放器(基于“播放bin”元素)。所以我想我会更进一步地追求 GStreamer 的道路。
采纳答案by StackedCrooked
Ok, I'll answer this question myself. The simple answer is: GStreamer! I've experienced no difficulties thus far. To make it work on Windows you need to use the GStreamer Winbuilds.
好的,我自己来回答这个问题。简单的答案是:GStreamer!到目前为止,我没有遇到任何困难。要使其在 Windows 上运行,您需要使用GStreamer Winbuilds。
Update (6 months later)
更新(6个月后)
Actually I burned myself a little bit on this bet. Later in the project the client specified that the WMV9 codec (VC-1) had to be supported. Since WMV9 encoders are only supported on Microsft platforms this wasn't possible to implement in a GStreamer-based solution. So maybe DirectShow would have been the right choice.
事实上,我在这个赌注上有点烧伤自己。在项目后期,客户指定必须支持 WMV9 编解码器 (VC-1)。由于 WMV9 编码器仅在 Microsft 平台上受支持,因此无法在基于 GStreamer 的解决方案中实现。所以也许 DirectShow 会是正确的选择。
回答by fnieto - Fernando Nieto
Last time I worked with GStreamer in windows was quite tedious.
上次我在 Windows 中使用 GStreamer 时非常乏味。
If you take this way, you should be willing to spend a lot of time dealing with runtimes hell and other compilation issues. First thing you need to evaluate is which compiler/runtime you will use.
如果你采取这种方式,你应该愿意花大量时间处理运行时地狱和其他编译问题。您需要评估的第一件事是您将使用哪个编译器/运行时。
If portability is not a must, I whould take the easy way. DirectShow.
如果便携性不是必须的,我会采取简单的方法。直播。
回答by Konstantin Salavatov
Consider looking at VLC. http://www.videolan.org/I second what fnieto said about compilation hell with GStreamer on Winbdows (done it recently). But if you familiar with unix environment that might be not big trouble with Cygwin ot MSYS. But take in account that you probably will not get readily available and reliable hardware support with GStreamer on Windows as you might get with Media Foundation or DirectShow. Microsoft Media Center iTV framework worth looking at too.
考虑查看 VLC。http://www.videolan.org/我支持 fnieto 所说的关于 Winbdows 上 GStreamer 的编译地狱(最近完成)。但是如果你熟悉 unix 环境,Cygwin ot MSYS 可能不会有什么大问题。但请注意,您可能无法像使用 Media Foundation 或 DirectShow 那样在 Windows 上使用 GStreamer 获得现成可用且可靠的硬件支持。Microsoft Media Center iTV 框架也值得一看。
回答by rogerdpack
avisynth might provide for easy mixing of streams, and can take directshow input.
avisynth 可以提供简单的流混合,并且可以直接显示输入。