简体   繁体   English

DirectShow.Net使用C#从http响应播放MP4视频流

[英]DirectShow.Net play MP4 video stream from http responce using C#

DirectShow.Net contains really nice player example such DxPlay-2008. DirectShow.Net包含非常不错的播放器示例,例如DxPlay-2008。 I used this example to make couple of video playbacks within a single application. 我使用此示例在单个应用程序中进行了两次视频播放。 But Unfortunately I can't find how to render video from network stream like following: http://www.sampledomain.com:2057/?stream=video&path=media/backbunny.mp4 但是不幸的是我找不到如何从网络流中渲染视频,如下所示: http : //www.sampledomain.com : 2057/? stream=video&path=media/ backbunny.mp4

How to tell FilterGraph to use a network stream instead of a file? 如何告诉FilterGraph使用网络流而不是文件? Thanks. 谢谢。

PS may be somebody could advise what C# player could play network video stream? PS可能有人会建议什么C#播放器可以播放网络视频流? I tried VLC in C#. 我在C#中尝试了VLC。 it is almost perfect apart of the issue with libvlc_media_player_stop() function, if I create couple of players and put them on the same form, this function hangs sometimes. 对于libvlc_media_player_stop()函数来说,这几乎是完美的选择,如果我创建了几个播放器并将它们放在相同的形式上,则该函数有时会挂起。 I used is nVlc wrapper. 我用的是nVlc包装器。

You need to install a Network Source Filter, for example this , It will allow you to set a network stream as source. 您需要安装一个网络源过滤器,例如this ,它将允许您将网络流设置为源。 The downside is that you have to paid for it. 缺点是您必须为此付费。 There are other filters options, I've tried some of them and the have their issues. 还有其他过滤器选项,我尝试了其中的一些选项,并遇到了问题。 Datastead is the most stable I've found. Datastead是我找到的最稳定的。

Once you have installed you can use it from Directshow.net using the filter's GUID in the usual way. 安装完成后,您可以按照通常的方式使用过滤器的GUID从Directshow.net使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM