Red5 installation guide (RTMP & RTMPT)
来源:互联网 发布:日本女生皮肤好 知乎 编辑:程序博客网 时间:2024/06/15 23:50
Introduction:
Red5 is an Open Source Flash Server written in Java that supports:
- Streaming Video (FLV, F4V, MP4, 3GP)
- Streaming Audio (MP3, F4A, M4A, AAC)
- Recording Client Streams (FLV and AVC+AAC in FLV container)
- Shared Objects
- Live Stream Publishing
- Remoting
- Protocols: RTMP, RTMPT, RTMPS, and RTMPE
Media server setup steps:
1. Download red5 from: http://code.google.com/p/red5/
2. Download JDK from: http://www.oracle.com/technetwork/java/javase/downloads/index.html
3. Install JDK and deploy the “JAVA_HOME” environment variable.
Add
=====================================================================
CLASSPATH:
.;%%JAVA_HOME%\bin;JAVA_HOME%\bin\dt.jar;%JAVA_HOME%\bin\tools.jar
JAVA_HOME:
C:\Program Files (x86)\Java\jdk1.6.0_10-Your JAVA installation path.
======================================================================
Edit
PATH:
Add “%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;” at the beginning.
======================================================================
4. Install Red5 and set ports for HTTP,RTMP and RTMPT
5. Start red5
6. Testing
Copy one testing file to “webapps\oflaDemo\streams”, Open testing page: http://localhost:5080/.
7. Click [HERE]in testing page, and select [oflaDemo]
test the media file you added just now, make sure the file can be played normally.
8. Copy your media files to oflaDemo\streams folder. And you can access these media files by: rtmp://localhost/oflaDemo/XXX.flv.
9. How to support RTMPT prococal:
RTMP is default protocol in red5,it’s opened by default, but rtmp has limited in some network environment.
Connect Method: nc.connect( "rtmp://x.x.x.x:port/myapp");
RTMPT protocol is wrap the RTMP HTTP protocol,Can penetrate the firewall.
Connect Method : nc.connect( "rtmpt://x.x.x.x:port/myapp");
RTMPS agreement using HTTPS security connection
Connect Method : nc.connect( "rtmps://x.x.x.x:port/myapp");
Below is the way to open rtmpt:
In “conf/red5-core.xml”,delete comments of bean on the description of rtmpt.server.
Before Update:
<!-- RTMPT -->
<!--
<bean id="rtmpt.server" class="org.red5.server.tomcat.rtmpt.RTMPTLoader" init-method="init" lazy-init="true">
<property name="webappFolder" value="${red5.root}/webapps" />
<property name="connector">
<bean class="org.apache.catalina.connector.Connector">
<constructor-arg type="java.lang.String" value="org.apache.coyote.http11.Http11NioProtocol" />
<property name="port"><value>${rtmpt.port}</value></property>
<property name="enableLookups"><value>false</value></property>
</bean>
</property>
<property name="connectionProperties">
<map>
<entry key="maxKeepAliveRequests" value="${rtmpt.max_keep_alive_requests}"/>
<entry key="useExecutor" value="true"/>
<entry key="maxThreads" value="${rtmpt.max_threads}"/>
<entry key="acceptorThreadCount" value="${rtmpt.acceptor_thread_count}"/>
<entry key="processorCache" value="${rtmpt.processor_cache}"/>
</map>
</property>
<property name="host">
<bean class="org.apache.catalina.core.StandardHost">
<property name="name" value="${rtmpt.host}" />
<property name="unpackWARs" value="false" />
<property name="autoDeploy" value="false" />
<property name="xmlValidation" value="false" />
<property name="xmlNamespaceAware" value="false" />
</bean>
</property>
</bean>
-->
After Update:
<!-- RTMPT -->
<bean id="rtmpt.server" class="org.red5.server.tomcat.rtmpt.RTMPTLoader" init-method="init" lazy-init="true">
<property name="webappFolder" value="${red5.root}/webapps" />
<property name="connector">
<bean class="org.apache.catalina.connector.Connector">
<constructor-arg type="java.lang.String" value="org.apache.coyote.http11.Http11NioProtocol" />
<property name="port"><value>${rtmpt.port}</value></property>
<property name="enableLookups"><value>false</value></property>
</bean>
</property>
<property name="connectionProperties">
<map>
<entry key="maxKeepAliveRequests" value="${rtmpt.max_keep_alive_requests}"/>
<entry key="useExecutor" value="true"/>
<entry key="maxThreads" value="${rtmpt.max_threads}"/>
<entry key="acceptorThreadCount" value="${rtmpt.acceptor_thread_count}"/>
<entry key="processorCache" value="${rtmpt.processor_cache}"/>
</map>
</property>
<property name="host">
<bean class="org.apache.catalina.core.StandardHost">
<property name="name" value="${rtmpt.host}" />
<property name="unpackWARs" value="false" />
<property name="autoDeploy" value="false" />
<property name="xmlValidation" value="false" />
<property name="xmlNamespaceAware" value="false" />
</bean>
</property>
</bean>
So you can access the media files by RTMPT protocol:
rtmpt://Localhost:8088/oflaDemo/XXX.flv
- Red5 installation guide (RTMP & RTMPT)
- [FMS]red5项目使用rtmp协议,且开启rtmpt,rtmps协议
- [FMS]red5项目使用rtmp协议,且开启rtmpt,rtmps协议
- AMF,RTMP,RTMPT,RTMPS 简介
- RTMP协议与Red5
- red5+rtmp 篇1
- red5 + rtmp篇2
- RTMPT
- 关于 RTMP RTMPT RTMPS RTMPE RTMPTE RTMFP 简介
- 关于RTMP,RTMPT,RTMPS,RTMPE,RTMPTE协议的介绍
- 关于 RTMP RTMPT RTMPS RTMPE RTMPTE RTMFP AMF 简介
- RTMP,RTMPT,RTMPS,RTMPE,RTMPTE协议的简单介绍
- RTMP流媒体播放之red5
- xVM installation guide
- Ubuntu & Mint Installation Guide
- Installation Guide For PF_RING
- Boost installation guide
- 【翻译】(2)Installation Guide
- Zendframework登陆注册实例教程
- 堆排序(Heap Sort)算法学习
- 心得13--网络编程4-TCP协议案例分析
- scrollview 中用listview的方法
- 全面理解javascript的caller,callee,call,apply概念
- Red5 installation guide (RTMP & RTMPT)
- Android客户端与服务器端通过DES加密认证 .
- 心得12--网络编程3-Socket服务
- 【svm学习笔记】svm_理论学习图谱_上
- Linux强制结束进程
- 原始套接字编程示例
- 【ios】 iphone开发之横屏与竖屏在不同视图之间的切换
- c#中的委托与事件
- 学习OpenCV——Kmean(C++)