windows 版
1.安裝jdk-7u45-windows-i586.exe
2.到官網安裝新版red5程式setup-Red5-1.0.2.exe 設定檔路徑在C:\Program Files\Red5\conf
3.到程式集裡開啟Start Red5
4.使用Adobe Flash Media Live Encoder 3.2 送flash視訊
FMS URL 來源設定 rtmp://192.168.1.49/live
Stream設定123
5.使用flash播放器抓取服務器ip和stream即可看到送出的視訊
===============================================================
How to install red5 @ centos 6.5
1. yum install java1.7.0openjdk java-1.7.0-openjdk-devel
2. 從 http://www.red5.org/downloads/red5/1_0_1/ 下載 red5, 目前是版本 1.0.1
wget http://www.red5.org/downloads/red5/1_0_1/red5-1.0.1.tar.gz
- 解開 ~/ 下面.
- cd ~/red5server1.0; sh red5.sh
How to send live stream to centos on windows with obs? - 開一個 dos windows
- telnet cenos’ ip 1935, 應該可以連接上.
- 如果不行, 應該是centos 機器上的 firewall 擋住, 試著把 1935/tcp, 1935/udp 都打開.
-A RH-Firewall-1-INPUT -p udp -m state --state NEW -m udp --dport 1935 -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 1935 -j ACCEPT
- 打開 obs, 點下主視窗上的 ‘設定’, 點選 ‘廣播’,
- ‘伺服器’ 填入 “rtmp://centos’ ip/live/”
- ‘播放路徑/串流碼’ 填入任意名稱, 這會是之後 client 播放時的路徑. 7. ‘確定’, 然後就可以 ‘開始串流’
How to send live stream to centos on windows with adobe flash encoder?
1. 與 obs 1~3 相同步驟
2. 打開 adobe flash media live encoder
3. 將右邊的 ‘Stream to Flash Media Server’ 的選項打勾
4. 將 ‘FMS URL’ 填入 “rtmp://centos’ ip/live/”
5. 將 ‘Stream’ 填入任意名稱, 同 obs 的 6.
6. ‘Start’, 就可以開始 encode and live.
==================補充======================================
linux版遇到底下執行問題,通常是host的問題
Caused by: java.net.UnknownHostException: nguyendung-centos: nguyendung-centos at java.net.InetAddress.getLocalHost(InetAddress.java:1454) ~[na:1.6.0_24] at org.quartz.simpl.SimpleInstanceIdGenerator.generateInstanceId(SimpleInstanceIdGenerator.java:34) ~[quartz-1.8.5.jar:na] ... 53 common frames omitted [INFO] [main] org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@74b957ea: defining beans [placeholderConfig,red5.server,rmiRegistry,mbeanServer,org.springframework.jmx.support.ConnectorServerFactoryBean#0,mbeanExporter,serializer,deserializer,minaEncoder,minaDecoder,statusObjectService,rtmpCodecFactory,rtmptCodecFactory,remotingCodecFactory,streamableFileFactory,filePersistenceThread,sharedObjectService,streamService,providerService,consumerService,schedulingService,warDeployService,remotingClient,object.cache,keyframe.cache,flv.impl,flvreader.impl,mp4reader.impl,mp3reader.impl,org.springframework.beans.factory.config.MethodInvokingFactoryBean#0,org.springframework.beans.factory.config.MethodInvokingFactoryBean#1,streamExecutor,fileConsumer,playlistSubscriberStream,clientBroadcastStream]; root of factory hierarchy [INFO] [main] org.springframework.jmx.support.ConnectorServerFactoryBean - Stopping JMX connector server: javax.management.remote.rmi.RMIConnectorServer@30d647d8 [INFO] [main] org.springframework.remoting.rmi.RmiRegistryFactoryBean - Unexporting RMI registry [INFO] [main] org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@53d439fe: defining beans [placeholderConfig,red5.common,red5.core,context.loader,pluginLauncher,tomcat.server]; root of factory hierarchy Exception org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'red5.common' defined in class path resource [red5.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.FileSystemXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mbeanExporter': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulingService' defined in class path resource [red5-common.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot run without an instance id.
解決方法
vi /root/red5-server-1.0/conf/red5.propertie
jmx.rmi.host=your hostname
========================================
red5 relay 參考 StreamingProxy 範例
http://stackoverflow.com/questions/10082927/restreaming-with-red5
http://red5.googlecode.com/svn/doc/tags/1_0/api-client/index.html