一位师姐做过类似的调研后说,当初她的公司提出的要求是,在终端必须使用flash播放,这样的话,只支持rtmp协议,就得采用red5。另一点,开发的下一阶段要支持移动终端,这样RTSP协议就比较好,支持RTSP的开源代码主要就是live555了。
live555
使用live555 Streaming media建立RTSP串流服务器
http://www.wl-chuang.com/blog/2011/06/12/building-up-a-rtsp-slash-rtp-server-using-live555/#disqus_threadLive555 Streaming Media是一套优秀的开放程序代码函示库,拥有完整的RTSP/RTP实作,除了支持RTP over UDP外,尚支持RTP over RTSP以及RTP/RTSP over HTTP,可用于传输多种主流的影音压缩格式如:H.264、MPEG4、MP3….等。知名的播放软件VLC的串流功能就是基于此函式库开发。 利用它我们只要短短几行程序代码即可建立自己的串流服务器。
范例程序代码如下:
#include <liveMedia.hh>
#include <BasicUsageEnvironment.hh>static void announceStream(RTSPServer* rtspServer, ServerMediaSession* sms,
char const* streamName, char const* inputFileName);
int main(int argc, char** argv)
{
UsageEnvironment* env;
TaskScheduler* scheduler = BasicTaskScheduler::createNew();
env = BasicUsageEnvironment::createNew(*scheduler);
// 1. Create the RTSP server:
RTSPServer* rtspServer = RTSPServer::createNew(*env, 8554, NULL);
if (rtspServer == NULL) {
*env << "Failed to create RTSP server: " << env->getResultMsg() << "\n";
exit(1);
}
// 2. Add a H.264 video elementary stream to RTSP server
{
char const* streamName = "h264";
char const* inputFileName = "test.h264";
ServerMediaSession* sms = ServerMediaSession::createNew(*env,
streamName,
streamName,
"H.264 video");
sms->addSubsession(H264VideoFileServerMediaSubsession::createNew(*env,
inputFileName,
False));
rtspServer->addServerMediaSession(sms);
announceStream(rtspServer, sms, streamName, inputFileName);
}
// 3. Kick-off the server
env->taskScheduler().doEventLoop(); /* Never return */
/* Unreachable */
return 0;
}
static void announceStream(RTSPServer* rtspServer, ServerMediaSession* sms,
char const* streamName, char const* inputFileName)
{
char* url = rtspServer->rtspURL(sms);
UsageEnvironment& env = rtspServer->envir();
env << "\n\"" << streamName << "\" stream, from the file \""
<< inputFileName << "\"\n";
env << "Play this stream using the URL \"" << url << "\"\n";
delete[] url;
}
流讯博客
http://www.liuxun.org/archives/category/live555视频编解码介绍、流媒体协议简介、RTSP录像的几种方式、live555-OpenRTSP分析、
LIVE555官方网站
基于标准RTP/RTCP/RTSP/SIP 协议的流媒体源码库。适合做嵌入式和低开销的流媒体应用。参考如下内容:• "openRTSPTM" – 命令行形式的 RTSP 客户端
• "playSIPTM" – 命令行形式的 SIP 会话 recorder
• "wis-streamer" – Linux WIS GO7007 Encoder Driver 上的开源流媒体服务器
• "MPlayer" media player 上的 RTSP/RTP 流媒体服务
• "vobStreamerTM" – 网络 DVD player (在LAN上将 DVD 内容化为流媒体)
LIVE555 Streaming Media
译文博客
Source code
The project source code is available - as a ".tar.gz" file - here. See below for instructions on how to build it.Mailing list
There is a developers' mailing list: "live-devel@lists.live555.com". Users (or prospective users) of the libraries are encouraged to join this (low-volume) mailing list, and/or to review the mailing list's archives. (You can also search these archives using Google, by adding "site:lists.live555.com" to your search query.) Before posting to the mailing list for the first time, please read the FAQ, to check if your question has already been answered.Support
The primary means of support for these libraries is the "live-devel@lists.live555.com" mailing list described above. (Note that you must first subscribe to the mailing list before you can post to it.)Are you planning to implement RTP (and/or RTSP or SIP)? Instead of writing your own implementation from scratch, consider using these libraries. They have already been used in many real-world RTP-based applications, and are well-suited for use within embedded systems. The code includes an implementation of RTCP, and can easily be extended (via subclassing) to support new RTP payload types.
- Description (including test programs)
- How to configure and build the code on Unix (including Linux, Mac OS X, QNX, and other Posix-compliant systems)
- How to configure and build the code on Windows
- Frequently Asked Questions (FAQ). (Please read this before posting questions to the mailing list.)
- Source code license
- To do...
- Some third-party applications
![-----](https://i-blog.csdnimg.cn/blog_migrate/a263d7d911ed1d947627dcf5b06f3362.gif)
live555 在VS2010 下live555编译、使用及测试
在windows使用vs2008编译live555
http://www.360doc.com/content/10/1206/17/4914074_75551056.shtml
我做了一下,按这个文档做也可以顺利完成编译。
GStreamer官方网站
http://gstreamer.freedesktop.org/GStreamer 是一个 基于流水线的多媒体框架,基于GObject,以C语言写成。
凭借GStreamer,程序员可以很容易地创建各种多媒体功能组件,包括简单的音频回放,音频和视频播放,录音,流媒体和音频编辑。基于流水线设计,可以创建诸如视频编辑器、流媒体广播和媒体播放器等等的很多多媒体应用。
RTSP with python
Playing RTSP with python-gstreamer
http://stackoverflow.com/questions/4192871/playing-rtsp-with-python-gstreamerI use gstreamer for playing RTSP stream from IP cameras (like Axis.)。。。
I want to control it with a gui in pygtk so I use the gstreamer python bindings.。。。
Python-RTSP
Implementation of the RTSP protocol on top of the Twisted Python library. —Read morehttp://odie5533.com/
https://github.com/odie5533/Python-RTSP
http://www.flumotion.net/doc/flumotion/reference/trunk/flumotion.twisted.rtsp-module.html
实现RTP协议的H.264视频传输系统
http://blog.csdn.net/gavinr/article/details/7035966有源码,初看了一下,比较全。
由于是一个公司做的,所以有些地方要注册。权限是否有要求尚且不明。