windows 版

1.安裝jdk-7u45-windows-i586.exe

2.到官網安裝新版red5程式setup-Red5-1.0.2.exe 設定檔路徑在C:\Program Files\Red5\conf

3.到程式集裡開啟Start Red5

red5-1

4.使用Adobe Flash Media Live Encoder 3.2 送flash視訊

FMS URL 來源設定 rtmp://192.168.1.49/live

Stream設定123

5.使用flash播放器抓取服務器ip和stream即可看到送出的視訊

red5-3

===============================================================

How to install red5 @ centos 6.5
1. yum install java­1.7.0­openjdk 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
  1. 解開 ~/ 下面.
  2. cd ~/red5­server­1.0; sh red5.sh
    How to send live stream to centos on windows with obs?
  3. 開一個 dos windows
  4. telnet cenos’ ip 1935, 應該可以連接上.
  5. 如果不行, 應該是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
  1. 打開 obs, 點下主視窗上的 ‘設定’, 點選 ‘廣播’,
  2. ‘伺服器’ 填入 “rtmp://centos’ ip/live/”
  3. ‘播放路徑/串流碼’ 填入任意名稱, 這會是之後 client 播放時的路徑. 7. ‘確定’, 然後就可以 ‘開始串流’

obs
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.s[email protected]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: [email protected]
[INFO] [main] org.springframework.remoting.rmi.RmiRegistryFactoryBean - Unexporting RMI registry
[INFO] [main] org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in org.s[email protected]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

 

 

點閱: 107

By tony

自由軟體愛好者~喜歡不斷的思考各種問題,有新的事物都會想去學習嘗試 做實驗並熱衷研究 沒有所謂頂天的技術 只有謙虛及不斷的學習 精進專業,本站主要以分享系統及網路相關知識、資源而建立。 Github http://stnet253.github.io

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料