如何编写一个客户端 - 服务器的视频流 [英] How to write an client-server video streaming

查看:246
本文介绍了如何编写一个客户端 - 服务器的视频流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的项目,将工作实时:我必须写一个视频流媒体客户端 - 服务器应用,该服务器将到AVI / MPEG等发送到Web应用程序。我有一些问题:

I'm working on project that will work real time: I have to write a video streaming client-server app, this server will to send the AVI/MPEG etc to an web application. I have some questions:

  1. 什么是协议建议要做到这一点,HTTP? RTP?还是其他?

  1. What is the protocol recommend to do this, http? rtp? or other?

在Web应用程序中,我怎么把它展示给用户?使用Flash播放器,Java小程序(我不保证是否有可能与它)或HTML5,目前​​什么是做到这一点的最好方法是什么?

In the web application, how do I to show it to user? using an flash player,java applet(I don't ensure if it's possible with it) or HTML5, what is the best way to do this currently?

我希望这是干净的你。任何帮助是非常AP preciadted。提前致谢。 :)

I hope this is clean for you. Any help is very appreciadted. Thanks in advance. :)

推荐答案

有实现这一几种不同的方式(一些需要编程和其他人不这样做)。你选择哪一个取决于您的要求。

There are several different ways to implement this (some that require programming and others that don't). Which one you choose depends on your requirements.

的Red5 是一个显而易见的解决方案,它可以让你只需要专注于网络侧,只要您所选择的球员是闪光灯。

Red5 is an obvious solution which will allow you to only have to focus on the web side as long as your player of choice is flash.

FlourineFx 以.NET多一点的努力提供了一个类似的环境。

FlourineFx provides a similar environment for .NET with a little more effort.

我也做到了这一点与IIS和一个自定义服务器中使用的HttpListener 取得很大的成功,如果你是一个纯粹的Windows / C#的解决方案集。需要说明的我想在这里补充的是,它并不总是简单的。在有限的吞吐量的环境中,你将有问题,因为HTTP没有时间改正的RTP / RTMP / RTSP有,但在一个像样的网络它工作3月9日的时候(我只用一个单一的球员,虽然测试)。

I've also done this with IIS and a custom server using HttpListener with much success if you're set on a pure Windows/C# solution. The caveat I'd add here is that it isn't always simple. In an environment with limited throughput, you will have problems since HTTP doesn't have the time corrections that RTP/RTMP/RTSP have but in a decent network it works 3 9's of the time (I've only tested with a single player though).

更新

如果你在谈论的生活的使用。NET我会建议寻找到的DirectShow(或相关的DirectX)API的流。有一个可用的包装,它为.NET创建名为 DirectShow.NET

If you're talking about live streaming with .NET I'd suggest looking into the DirectShow (or related DirectX) API's. There is a wrapper for it for .NET available called DirectShow.NET.

这篇关于如何编写一个客户端 - 服务器的视频流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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