2015年10月5日 星期一

IP cam streaming server 安裝教學 webcallserver

streaming IP cam server 安裝教學  webcallserver

最近有些專案需要在web browser 上面崁入IP cam 的即時影像,想起來好像很簡單,不就是把webcam 所提供的 http brwoser 瀏覽服務的 IP Address 直接崁入到我們的 html 中的 ifram 就好了,不過仔細查了一些文章都有提到走 HTTP 協定的 web cam 是有一些限制及缺點。



例如當使用HTTP streaming 傳送 video streaming (jpeg images or video frames) 到手機裝置或是桌機的 browser 時可能會有5到10秒鐘的時差,因為 http 通訊協定天生就不是那麼適合傳送很即時的 realtime 無時差資訊這時後就需要RTSP 或是RTP協定了。

1.下載 FlashphonerMediaServerWebRTC-
http://flashphoner.com/downloads/builds/WCS/3.0/x8664/wcs3_video_vp8/FlashphonerMediaServerWebRTC-3.0/FlashphonerMediaServerWebRTC-3.0.868.tar.gz

2.解 tar 檔案
meson@meson-VirtualBox:~/webCam/$tar -xzf FlashphonerMediaServerWebRTC-3.0.868.tar.gz


3.安裝 MediaServer WebRTC
meson@meson-VirtualBox:~/webCam/FlashphonerMediaServerWebRTC-3.0.868$ sudo ./install.sh

4.設定對外及對內 IP(下列二個 key 的值)
sudo vi /usr/local/FlashphonerWebCallServer/conf/flashphoner.properties
#Config
# ip                                - External IP-address of server where Flashphoner installed (xxx.xxx.xxx.xxx)
# ip_local                          - Local IP-address of server where Flashphoner installed (xxx.xxx.xxx.xxx)



5.輸入 webcallserver 的 license key (可以透過下列網址註冊後取得30天試用 key)
FlashphonerWebCallServer
http://flashphoner.com/get_trial/


meson@meson-VirtualBox:/usr/local/FlashphonerWebCallServer/bin$ sudo ./activation.sh
[sudo] password for meson:

------------------------------
Flashphoner License Activation
------------------------------

Please, enter your License Number: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
62E3DFCA-9A1E-4538-9185-4FF6D0xxxxxx
Activation failure: The license 62E3DFCA-9A1E-4538-9185-4FF6D0xxxxxx is already activated. Please deactivate license before running new activation.


6.新增一個檔案 flashphoner.license 內容放license 碼
meson@meson-VirtualBox:/usr/local/FlashphonerWebCallServer/bin$ sudo vi /usr/local/FlashphonerWebCallServer/conf/flashphoner.license


7.啟動 webcallserver
/usr/local/FlashphonerWebCallServer/bin/webcallserver start
meson@meson-VirtualBox:/usr/local/FlashphonerWebCallServer/bin$ sudo /usr/local/FlashphonerWebCallServer/bin/webcallserver start
FlashphonerWebCallServer: starting


8.確認 webcallserver 是否正常啟動
meson@meson-VirtualBox:/usr/local/FlashphonerWebCallServer/bin$  sudo /usr/local/FlashphonerWebCallServer/bin/webcallserver status
FlashphonerWebCallServer started

9.下載 httpd (apache server)
meson@meson-VirtualBox:/usr/local/FlashphonerWebCallServer/bin$ sudo apt-get install httpd


10.啟動 Apache2 http service
meson@meson-VirtualBox:/usr/local/FlashphonerWebCallServer/bin$ service apache2 start
 * Starting web server apache2                                                                                                                           *
meson@meson-VirtualBox:/usr/local/FlashphonerWebCallServer/bin$ service apache2 status
 * apache2 is running


11.下載 flashphoner_client-wcs_media_client.zip 並且永到 /var/www/html
https://github.com/flashphoner/flashphoner_client/archive/wcs_media_client.zip

12.在server 端開啟 browser 連線 localhost
http://localhost

13.透過遠端 IP 連線網頁
http://10.57.46.39/






沒有留言:

張貼留言