ubuntu安装nimble
简介:一款好用的rtmp、rtsp、cmaf流服务器
ubuntu安装步骤参考文档:
https://wmspanel.com/nimble/install#os_ubuntu
修改API的端口参考文档:
https://wmspanel.com/nimble/param#management_port
步骤一:
添加下面nimble安装源到/etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu bionic universe
deb http://archive.ubuntu.com/ubuntu bionic-updates universe
deb http://nimblestreamer.com/ubuntu bionic/
步骤二:
#安装nimble
wget -q -O - http://nimblestreamer.com/gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install nimble
sudo apt-get install nimble-srt
#添加API功能
echo 'management_listen_interfaces = 127.0.0.1' >> /etc/nimble/nimble.conf
#更改API端口
echo 'management_port = 8086' >> /etc/nimble/nimble.conf
#以下是wmspanel管理页面
sudo /usr/bin/nimble_regutil --server-name display_name
sudo cp /etc/nimble/run_as_root /etc/nimble/run_as_root.bak
sudo /usr/bin/nimble_regutil -u test@yourcompany.com -p mypassword
sudo /usr/bin/nimble_regutil -u test@yourcompany.com -p mypassword --apply-rules-conf
sudo service nimble restart
步骤三:
修改流服务器配置文件,文件地址/etc/nimble/rules.conf
{
"SyncResponse":{
"status":"success",
"StreamCheckerMode":false,
"UniqueVisitors":false,
"RoutesHash":"",
"Routes":[
],
"IpRanges":[
],
"ServerAuthorizationProperties":{
"ServerAuthPropertiesHash":""
},
"CamerasHash":"0",
"Cameras":[
],
"StreamsHash":"0",
"Streams":[
],
"RtmpSettings":{ #下面RTSP设置与RTMP类似
"hash":"1586509503636",
"interfaces":[
{
"ip":"*", #可修改,设置转RTMP的IP
"port":8855, #可修改,设置转RTMP的端口
"ssl":false
}
],
"duration":6,
"chunk_count":4,
"dash_template":"TIME",
"protocols":[
"HLS",
"RTMP",
"MPEG2TS",
],
"apps":[
{
"app":"live", #可修改,设置转RTMP输出的频道
"duration":10, #可修改,设置转RTMP输出的duration
"chunk_count":4, #可修改,设置转RTMP输出的chunk_count
"dash_template":"TIME",
"protocols":[ #可修改,设置RTMP输入输出的格式
"HLS",
"RTMP",
"DASH",
"MPEG2TS",
"HLS_FMP4",
"RTSP"
]
}
],
"abr":[
]
},
"RtspSettings":{
"hash":"0",
"interfaces":[]
},
"IcecastSettings":{
"hash":"0",
"interfaces":[
]
},
"LivePullSettings":{
"hash":"0",
"streams":[
]
},
"RtmpPublishSettings":{
"hash":"0",
"settings":[
]
},
"RtspPublishSettings":{
"hash":"0",
"settings":[
]
},
"ManagedTasks":{
"hash":"0",
"tasks":[
]
},
"HlsDRMSettings":{
"hash":"0",
"url":"",
"key":"",
"KeyServerSettings":{
}
},
"HttpOriginApps":{
"hash":"0",
"apps":[
]
},
"Aliases":{
"hash":"0",
"settings":[
]
},
"DataSlicesInfo":{
"hash":"1",
"data_slices":[
{
"id":"52179",
"tz":0
}
]
},
"UDPSenderSettings":{
"hash":"1586511548554",
"settings":[
{
"id":"5e903ebc45475e242ce79cd1",
"ip":"127.0.0.1", #可修改,设置UDP输出的IP
"protocol":"udp",
"port":20001, #可修改,设置UDP输出的端口
"ttl":1,
"src":[
{
"app":"live", #可修改,设置转UDP输入的频道名称
"stream":"stream", #可修改,设置转UDP输入的流名称
"pmt_pid":7166,
"v_pid":256,
"a_pid":257
}
]
}
]
},
"PayPerPublishSettings":{
"hash":"0",
"url":"",
"auth_group_interval":500,
"apps":[
]
},
"DvrSettings":{
"hash":"0",
"settings":[
]
},
"UserAgentGroupSettings":{
"hash":"0",
"settings":[
]
},
"RefererGroupSettings":{
"hash":"0",
"settings":[
]
},
"VideoEncodersInfo":{
"hash":"0",
"encoders":[
]
},
"AudioEncodersInfo":{
"hash":"0",
"encoders":[
]
},
"StreamOverrideSettings":{
"hash":"0",
"settings":[
]
},
"IcecastStreamSettings":{
"hash":"0",
"settings":[
]
},
"AuthHandlerSettings":{
"hash":"8"
},
"ServerSettings":{
"MaxCacheSize":64,
"MaxFileCacheSize":4096,
"LogMode":"info"
}
}
}