2010年1月2日 星期六

Adobe Flash Media Server 3.5 安裝與測試

§Adobe Flash Media Server 3.5安裝與測試
§以下使用Windows系統架設FMS
可由此進入Adobe官方網站
Adobe 官方網站http://www.adobe.com/tw/
Adobe 官方下載頁 http://www.adobe.com/tw/downloads/。
Step 1.進入下載頁面後可看見如下圖的下拉選單,選擇Flash Media Server之後點擊前往。

點擊之後會出現如下畫面,若你有申請過帳號就直接輸入帳號密碼沒有的話就申請一組。



Step 2.登入後會出現FMS 3.5下載頁面,下載頁中下拉選單內容有Linux以及Windows兩種版本選擇,本編文章所下載的是Windwos版本。



  • FMS 3.5試用的話,與正式版本唯一的差別是,試用FMS 3.5最多只支援10人連線。


Step 3.將下載完的檔案解壓縮 ,點擊FlashMediaServer3.5這個檔案開始安裝,依安裝指導會遇到如下圖畫面,由於是試用所以不用輸入直接點擊Next即可。



Step 4. 選擇FMS3.5安裝所在路徑,若不想選使用系統預設直接點擊Next即可。



Step 5.選擇安裝內容,如果你已經有安裝過apache就不用勾選apache2.2選項,如果你沒安裝過可以勾選一併安裝。



Step 6.設定在開始選項中所想要的資料夾名稱,不想改的話使用預設值即可。
 


Step 7.輸入管理者姓名與密碼,這個要記起來,登入管理介面要用到。


Step 8.設定FMS 3.5 Server所使用之Port Number,可參考技術文件說明。

  • 若你有其他服務在80Port上可將80Port拿掉,只使用1935或加入443埠。



其中官方技術文件中提到Flash Media Server 3.5 proxies HTTP requests from port 80 to port 8134。
官方文件也提到RTMP協定的敘述如下:
FMS 串流使用的通訊協定RTMP(Real-Time Messaging Protocol)有五種類型。
There are five types of RTMP connections supported by Flash Media Server 3:

RTMP This is the standard, unencrypted Real-Time Messaging Protocol. The default port is 1935; if a port is not specified, the client attempts to connect to ports in the following order: 1935, 443, 80 (RTMP), 80 (RTMPT).

RTMP: 這是標準未加密的,預設使用1935Port,如果沒有指定Port,用戶端連線會依照1935、443、80(RTMP)、80(RTMPT)這個順序。

RTMPT This protocol is RTMP tunneled over HTTP; the RTMP data is encapsulated as valid HTTP. The default port is 80.

RTMPS This protocol is RTMP over SSL. SSL is a protocol for enabling secure communications over TCP/IP. (Flash Media Server provides native support for both incoming and outgoing SSL connections.) The default port is 443.

RTMPE This protocol is an encrypted version of RTMP. RTMPE is faster than SSL, does not require certificate management, and is enabled in the server’s Adaptor.xml file. If you specify RTMPE without explicitly specifying a port, the Flash Player scans ports just like it does with RTMP, in the following order: 1935 (RTMPE), 443 (RTMPE), 80 (RTMPE), and 80 (RTMPTE).

RTMPTE This protocol is RTMPE with an encrypted tunneling connection. The default port is 80.
 
官方技術文件請參考。
官方安裝指南請參考。
關於RTMP與其Port相關描述請點擊連結至Adobe官方查詢。
以上敘述皆來自於Adobe FMS 3.5官方文件。
 
Step 9.我們使用Flex mxml方式來測試FMS 3.5是否運作成功,於flex中建立mxml標籤如下。
 
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
     <mx:VBox>
          <mx:VideoDisplay id="myVid" height="258" width="311" source="rtmp://127.0.0.1/vod/sample" autoPlay="false"/>
         <mx:HBox>
             <mx:Button label="Play" click="myVid.play();"/>
             <mx:Button label="Pause" click="myVid.pause();"/>
             <mx:Button label="Stop" click="myVid.stop();" />
         </mx:HBox>
    </mx:VBox>
</mx:Application>

注意:
  • VideoDisplay 的source是設定FMS理的素材路徑,若你是本機端使用可以輸入rtmp://127.0.0.1/vod/sample,其中sample是安裝好FMS 3.5就有的範例FLV檔。
  • FMS 3.5預設的安裝路徑C:\Program Files\Adobe\Flash Media Server 3.5。
  • C:\Program Files\Adobe\Flash Media Server 3.5\applications是FMS 3.5的串流工作資料夾。
  • C:\Program Files\Adobe\Flash Media Server 3.5\applications\vod\media是放至素材的資料路徑,對應於該路徑設定就是rtmp://127.0.0.1/vod。
執行Run後並於瀏覽器頁面中按下Play可看見如下圖


下次我們來試試看FMS Server 的Live播放與Dynamic streaming的功能。
注意:
  • 若你將FMS 3.5架設在VM裡面,請記得將VM的Network Adapter設成Bridged,並記得更改VM裡作業系統的防火牆設定,將相關於RTMP的Port Number打開(1935、80、443)以及管理介面的1111Port,若你是自設定port號請記得打開你設定的port Number。
  • 而且記得在你的VM理windows系統中打開命令模式,鍵入ipconfig看你的IP位址,而原先的rtmp://127.0.0.1/vod/sample 就要改成你VM主機的IP位址,假設你的VM IP位址為192.168.0.2 你就將路徑改成rtmp://192.168.0.2/vod/sample。
以下是官方技術文件提到的FMS 3.5的新功能

  • DVR functionality for live streaming


  • Dynamic streaming


  • Integrated HTTP Server


  • Use the File plug-in to retrieve external SWF files for verification


  • Get client statistics with the Authorization plug-in


  • Dynamically assign applications to core processes with the Access plug-in


  • XMP metadata


  • MP4/F4V recording


  • Speex codec support


  • Start Screen and sample video player


  • Support for additional operating system versions



沒有留言:

張貼留言