C# 简单的 rtsp 广播示例源
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1124223/
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
simple rtsp broadcast example source
提问by Toad
I want to broadcast the screen (not a static screen) of my program using rtsp/rtp since this way a mobile phone (at least the more recent ones) can view the stream.
我想使用 rtsp/rtp 广播我的程序的屏幕(不是静态屏幕),因为这样手机(至少是最近的手机)可以查看流。
I'm looking for a simple example program which takes the frames I offer, encodes it with a codec and then sends this (using rtsp) to any clients attached.
我正在寻找一个简单的示例程序,它采用我提供的帧,使用编解码器对其进行编码,然后将其(使用 rtsp)发送到任何连接的客户端。
I've looked on the net and all I can find so far are full fledged opensource media servers (like darwin) which are just too complex to use as an example
我在网上查看过,到目前为止我能找到的都是成熟的开源媒体服务器(如达尔文),它们太复杂了,无法用作示例
any help appreciated!
任何帮助表示赞赏!
R
电阻
p.s. sending jpegs to the mobile phone is really not an option since this is non standard and would require a mobile app to be installed to interpret the 'stream'.
ps 将 jpegs 发送到手机确实不是一种选择,因为这是非标准的,并且需要安装移动应用程序来解释“流”。
p.s.2 C, C++ or C# would be fine.
ps2 C、C++ 或 C# 都可以。
采纳答案by Toad
this seems to be pretty much what I was looking for: live555.com
这似乎正是我要找的:live555.com
Useful libraries and code examples of how to stream stuff from your own app
有关如何从您自己的应用程序流式传输内容的有用库和代码示例
R
电阻
回答by beggs
This seems like a bad idea... RTSP is complex, so running a stripped down version sounds like an open invitation to problems... but... If you want to dive in and rip the relevant code out of some other project here is a good listto start with, It' lists a few C/C++ open source rtsp servers.. Good luck.
这似乎是个坏主意...... RTSP 很复杂,所以运行精简版本听起来像是对问题的公开邀请......但是......如果你想深入研究并从这里的其他项目中提取相关代码是一个很好的开始列表,它列出了一些 C/C++ 开源 rtsp 服务器......祝你好运。
回答by User1
I agree that many OpenSource streaming servers are too heavy. However, setting up VLCis very easy:
我同意许多开源流媒体服务器太重了。但是,设置VLC非常简单:
- File|Open File...
- Customize: screen://
- Check Stream/Save
- Click Settings...
- Setup your preferred stream options (Be sure to change the resolution to something small to make it stream fast on your cell phone).
- Click Ok
- Click Ok
- Done!
- 文件|打开文件...
- 自定义:屏幕://
- 检查流/保存
- 单击设置...
- 设置您的首选流选项(确保将分辨率更改为较小的值以使其在手机上快速传输)。
- 单击确定
- 单击确定
- 完毕!
Be sure to keep an eye on View|Messages... There may be some interesting warnings or errors in the log. I hope this helps!
一定要留意查看|消息...日志中可能有一些有趣的警告或错误。我希望这有帮助!
回答by User1
If you really want it source code, I recommend http://ffmpeg.org/. It is not as easy VLC but you have a lot more control. The project includes some examples to get you started.
如果你真的想要它的源代码,我推荐http://ffmpeg.org/。它不像 VLC 那样简单,但您有更多的控制权。该项目包括一些帮助您入门的示例。
回答by Jay
My library does this completely in managed code!
我的库完全在托管代码中做到了这一点!
You can find the library @ http://net7mma.codeplex.com/
你可以找到图书馆@ http://net7mma.codeplex.com/
There is also a CodeProject article @ http://www.codeproject.com/Articles/507218/Managed-Media-Aggregation-using-Rtsp-and-Rtp
还有一篇 CodeProject 文章@http ://www.codeproject.com/Articles/507218/Managed-Media-Aggregation-using-Rtsp-and-Rtp
If you need anything else let me know!
如果您还需要什么,请告诉我!