FMS的安装、基本配置及基本测试
来源:互联网 发布:拓扑图算法 编辑:程序博客网 时间:2024/05/21 11:02
下载及安装
下载地址:
http://www.adobe.com/support/flashmediaserver/downloads_updaters.html
最新已经到了5.0.10版了,全部默认安装即可
序列号:1652-5826-9939-6068-8981-7289(源于网络)
激活后为extented版
配置
1、修改rootinstall/conf/fms.ini, 将其中的
ADAPTOR.HOSTPORT = :1935,80一行,改为
ADAPTOR.HOSTPORT =:1935;
同时,将其中
HTTPPROXY.HOST = :8134一行,改为:
HTTPPROXY.HOST =
2、FMS中自带的apache默认端口为8134,可以与自己安装的apache共存,只要监听不同的端口就行
3、HTTP Origin Module 不用配置,FMS自带安装的Apache都已经配置好了这些支持Http Dynamic Streaming的模块,主要用于点播 和直播时下发流媒体数据到观看端
4、配置FMS server在直播时使用绝对时间,打开rootinstall/applications/livepkgr/Application.xml,修改 /Application/StreamManager/Live/AssumeAbsoluteTime节点为true.
<Application> <StreamManager> <Live> <AssumeAbsoluteTime>true</AssumeAbsoluteTime> </Live> </StreamManager></Application>
5、修改rootinstall/conf/Server.xml,将MaxFlushTime的值改为1
<Root> <Server> <ResourceLimits> <RecBuffer> <MaxFlushTime> 1 <MaxFlushTime> </RecBuffer> </ResourceLimits> </Server></Root>
自定义application及event
以下说明将自定义一个application:xlive,及一个event:lives
1、在rootinstall\application下新建目录xlive
2、将rootinstall\samples\applications\livepkgr下的所有文件拷贝到xlive目录下
3、在rootinstall\applications\xlive\events_definst_下新建目录lives
4、将rootinstall\applications\xlive\events_definst_\liveevent下的所有文件拷贝到3新建的目录下
5、修改rootinstall\applications\xlive\events_definst_\lives\event.xml,主要是修改eventid,其他参数视实际情况定:
<Event> <EventID>lives</EventID> <Recording> <FragmentDuration>2000</FragmentDuration> <SegmentDuration>4000</SegmentDuration> <DiskManagementDuration>0.02</DiskManagementDuration> </Recording></Event>
基本测试
测试需要直播源,可以使用网络上公用的直播源:
rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov
rtmp://live.hkstv.hk.lxdns.com/live/hks
http://live.hkstv.hk.lxdns.com/live/hks/playlist.m3u8
或者安装Flash Media Live Encoder捕获电脑的摄像头和麦克风制作直播源:
下载地址:
http://www.adobe.com/products/flash-media-encoder.html
安装后将其conf/config.xml的/flashmedialiveencoder_config /mbrconfig/streamsynchronization/enable节点值为true.
(使用绝对时间)
<mbrconfig> <streamsynchronization> <enable>true</enable> </streamsynchronization></mbrconfig>
Flash Media Live Encoder的音视频编码配置详见下图:
这里设置里3个bitrate(用于实际使用中pc和mobile使用不同的视频质量),并且在右边stream栏里有%i用于匹配这3个bitrate:
xstream_%i?adbe-live-event=lives
WEB显示测试(PC及移动)
pc及安卓使用flash播放rtmp,ios使用h5的video播放hls(m3u8)。
经过测试,最后选用ckplayer,它在pc、安卓、ios及对rtmp的支持最好(只是我测试的,如果有其他的或者自己写的flash播放器也可以)。
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no"></head><body><div id="a1"></div><script type="text/javascript" src="ckplayer/ckplayer.js" charset="utf-8"></script><script type="text/javascript"> CKobject.embed('ckplayer/ckplayer.swf','a1','ckplayer_a1','480','300',false,{f:'rtmp://192.168.1.128/xlive/xstream_1',c:0,b:1},['http://192.168.1.128:8134/hls-live/xlive/_definst_/lives/xstream_1.m3u8']);</script></body></html>
结果:
- FMS的安装、基本配置及基本测试
- FMS的安装、基本配置及基本测试
- Hive安装、配置及基本测试
- mongoDB的安装测试及基本用法
- monDB的安装测试及基本用法
- JAVA 的基本安装 配置 测试!
- Apache的基本安装及简单配置
- Cacti中文版的基本安装及配置
- Zookeeper的安装配置及基本开发
- Zookeeper的安装配置及基本开发
- svn的基本配置及安装
- opensips 安装及基本配置
- opensips 安装及基本配置
- nginx的安装及基本配置,及多个域名服务
- mysql 基准测试 sysbench的安装及基本使用方法
- CVS2.5.03版本的安装与配置及基本用法
- Svn1.4.6版本的安装与配置及基本用法
- win7+ vs2010+opencv2.4.7的安装及基本配置
- HDU 3829 二分最大独立集
- 【kill】终止进程
- c++中的续行符 \和宏定义的结合使用
- nil、Nil、NULL、NSNull的区别
- 解决jQuery元素绑定toggle事件后元素变成隐藏的问题
- FMS的安装、基本配置及基本测试
- CSDN博客精选
- 【自定义标签开发】06-标签案例-开发防盗链标签
- 学习推荐书籍--C语言
- Lintcode 删除链表中倒数第k个结点
- 计算函数运行时间
- 反编译操作及反编译工具<二>
- iOS Core Animation系列之CADisplayLink
- lua 和 C 语言进行交互 —— 如何传递table