Table of Contents
- Project: ZLMediaKit
- End-point: 获取服务器api列表(getApiList)
- End-point: 获取网络线程负载(getThreadsLoad)
- End-point: 获取主要对象个数(getStatistic)
- End-point: 获取后台线程负载(getWorkThreadsLoad)
- End-point: 获取服务器配置(getServerConfig)
- End-point: 设置服务器配置(setServerConfig)
- End-point: 重启服务器(restartServer)
- End-point: 获取流列表(getMediaList)
- End-point: 关断单个流(close_stream)
- End-point: 批量关断流(close_streams)
- End-point: 获取Session列表(getAllSession)
- End-point: 断开tcp连接(kick_session)
- End-point: 批量断开tcp连接(kick_sessions)
- End-point: 添加rtsp/rtmp/hls拉流代理(addStreamProxy)
- End-point: 关闭拉流代理(delStreamProxy)
- End-point: 添加rtsp/rtmp推流(addStreamPusherProxy)
- End-point: 关闭推流(delStreamPusherProxy)
- End-point: 添加FFmpeg拉流代理(addFFmpegSource)
- End-point: 关闭FFmpeg拉流代理(delFFmpegSource)
- End-point: 流是否在线(isMediaOnline)
- End-point: 获取媒体流播放器列表(getMediaPlayerList)
- End-point: 广播webrtc datachannel消息(broadcastMessage)
- End-point: 获取流信息(getMediaInfo)
- End-point: 获取流信息(getMp4RecordFile)
- End-point: 删除录像文件夹(deleteRecordDirectory)
- End-point: 开始录制(startRecord)
- End-point: 设置录像速度(setRecordSpeed)
- End-point: 设置录像流播放位置(seekRecordStamp)
- End-point: 停止录制(stopRecord)
- End-point: 是否正在录制(isRecording)
- End-point: 获取截图(getSnap)
- End-point: 获取rtp推流信息(getRtpInfo)
- End-point: 创建RTP服务器(openRtpServer)
- End-point: 创建多路复用RTP服务器(openRtpServerMultiplex)
- End-point: 连接RTP服务器(connectRtpServer)
- End-point: 关闭RTP服务器(closeRtpServer)
- End-point: 更新RTP服务器过滤SSRC(updateRtpServerSSRC)
- End-point: 暂停RTP超时检查(pauseRtpCheck)
- End-point: 恢复RTP超时检查(resumeRtpCheck)
- End-point: 获取RTP服务器列表(listRtpServer)
- End-point: 开始发送rtp(startSendRtp)
- End-point: 开始tcp passive被动发送rtp(startSendRtpPassive)
- End-point: 停止 发送rtp(stopSendRtp)
- End-point: 获取版本信息(version)
- End-point: 获取拉流代理信息(getProxyInfo)
- End-point: 获取推流代理信息(getProxyPusherInfo)
- End-point: 点播mp4文件(loadMP4File)
- End-point: 下载文件(downloadFile)
Project: ZLMediaKit
媒体服务器
End-point: 获取服务器api列表(getApiList)
Method: GET
http://zlmediakit.com:8880/index/api/getApiList?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取网络线程负载(getThreadsLoad)
Method: GET
http://zlmediakit.com:8880/index/api/getThreadsLoad?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取主要对象个数(getStatistic)
Method: GET
http://zlmediakit.com:8880/index/api/getStatistic?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取后台线程负载(getWorkThreadsLoad)
Method: GET
http://zlmediakit.com:8880/index/api/getWorkThreadsLoad?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取服务器配置(getServerConfig)
Method: GET
http://zlmediakit.com:8880/index/api/getServerConfig?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 设置服务器配置(setServerConfig)
Method: GET
http://zlmediakit.com:8880/index/api/setServerConfig?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&api.apiDebug=0
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| api.apiDebug | 0 | 配置键与配置项值 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 重启服务器(restartServer)
Method: GET
http://zlmediakit.com:8880/index/api/restartServer?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取流列表(getMediaList)
Method: GET
http://zlmediakit.com:8880/index/api/getMediaList?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| schema | rtmp | 筛选协议,例如 rtsp或rtmp |
| vhost | defaultVhost | 筛选虚拟主机,例如__defaultVhost__ |
| app | null | 筛选应用名,例如 live |
| stream | null | 筛选流id,例如 test |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 关断单个流(close_stream)
Method: GET
http://zlmediakit.com:8880/index/api/close_stream?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&schema=rtsp&vhost=__defaultVhost__&app=live&stream=test
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| schema | rtsp | 协议,例如 rtsp或rtmp |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | live | 应用名,例如 live |
| stream | test | 流id,例如 test |
| force | 1 | 是否强制关闭(有人在观看是否还关闭) |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 批量关断流(close_streams)
Method: GET
http://zlmediakit.com:8880/index/api/close_streams?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&schema=rtsp&vhost=__defaultVhost__&app=live&stream=test
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| schema | rtsp | 协议,例如 rtsp或rtmp |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | live | 应用名,例如 live |
| stream | test | 流id,例如 test |
| force | 1 | 是否强制关闭(有人在观看是否还关闭) |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取Session列表(getAllSession)
Method: GET
http://zlmediakit.com:8880/index/api/getAllSession?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| local_port | 筛选本机端口,例如筛选rtsp链接:554 | |
| peer_ip | null | 筛选客户端ip |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 断开tcp连接(kick_session)
Method: GET
http://zlmediakit.com:8880/index/api/kick_session?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&id=123456
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| id | 123456 | 客户端唯一id,可以通过getAllSession接口获取 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 批量断开tcp连接(kick_sessions)
Method: GET
http://zlmediakit.com:8880/index/api/kick_sessions?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| local_port | 筛选本机端口,例如筛选rtsp链接:554 | |
| peer_ip | null | 筛选客户端ip |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 添加rtsp/rtmp/hls拉流代理(addStreamProxy)
Method: GET
http://zlmediakit.com:8880/index/api/addStreamProxy?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&vhost=__defaultVhost__&app=live&stream=test&url=rtmp://live.hkstv.hk.lxdns.com/live/hks2
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| vhost | defaultVhost | 添加的流的虚拟主机,例如__defaultVhost__ |
| app | live | 添加的流的应用名,例如live |
| stream | test | 添加的流的id名,例如test |
| url | rtmp://live.hkstv.hk.lxdns.com/live/hks2 | 拉流地址,例如rtmp://live.hkstv.hk.lxdns.com/live/hks2 |
| rtp_type | null | rtsp拉流时,拉流方式,0:tcp,1:udp,2:组播 |
| timeout_sec | 10 | 拉流超时时间,单位秒,float类型 |
| retry_count | 拉流重试次数,不传此参数或传值<=0时,则无限重试 | |
| enable_hls | null | 是否转hls-ts |
| enable_hls_fmp4 | null | 是否转hls-fmp4 |
| enable_mp4 | null | 是否mp4录制 |
| enable_rtsp | 1 | 是否转协议为rtsp/webrtc |
| enable_rtmp | 1 | 是否转协议为rtmp/flv |
| enable_ts | 1 | 是否转协议为http-ts/ws-ts |
| enable_fmp4 | 1 | 是否转协议为http-fmp4/ws-fmp4 |
| enable_audio | 1 | 转协议是否开启音频 |
| add_mute_audio | 1 | 转协议无音频时,是否添加静音aac音频 |
| mp4_save_path | null | mp4录制保存根目录,置空使用默认目录 |
| mp4_max_second | 1800 | mp4录制切片大小,单位秒 |
| hls_save_path | null | hls保存根目录,置空使用默认目录 |
| modify_stamp | null | 是否修改原始时间戳,默认值2;取值范围:0.采用源视频流绝对时间戳,不做任何改变;1.采用zlmediakit接收数据时的系统时间戳(有平滑处理);2.采用源视频流时间戳相对时间戳(增长量),有做时间戳跳跃和回退矫正 |
| auto_close | null | 无人观看时,是否直接关闭(而不是通过on_none_reader hook返回close) |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 关闭拉流代理(delStreamProxy)
Method: GET
http://zlmediakit.com:8880/index/api/delStreamProxy?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&key=__defaultVhost__/live/1
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| key | defaultVhost/live/1 | addStreamProxy接口返回的key |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 添加rtsp/rtmp推流(addStreamPusherProxy)
Method: GET
http://zlmediakit.com:8880/index/api/addStreamPusherProxy?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&schema=rtmp&vhost=__defaultVhost__&app=live&stream=test&dst_url=rtmp://192.168.1.104/live/push
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| schema | rtmp | 推流协议,支持rtsp、rtmp,大小写敏感 |
| vhost | defaultVhost | 已注册流的虚拟主机,一般为__defaultVhost__ |
| app | live | 已注册流的应用名,例如live |
| stream | test | 已注册流的id名,例如test |
| dst_url | rtmp://192.168.1.104/live/push | 推流地址,需要与schema字段协议一致 |
| rtp_type | 0 | rtsp推流时,推流方式,0:tcp,1:udp |
| timeout_sec | 10 | 推流超时时间,单位秒,float类型 |
| retry_count | null | 推流重试次数,不传此参数或传值<=0时,则无限重试 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 关闭推流(delStreamPusherProxy)
Method: GET
http://zlmediakit.com:8880/index/api/delStreamPusherProxy?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&key=rtmp/__defaultVhost__/live/test/f40a8ab006cac16ecc0858409e890491
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| key | rtmp/defaultVhost/live/test/f40a8ab006cac16ecc0858409e890491 | addStreamPusherProxy接口返回的key |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 添加FFmpeg拉流代理(addFFmpegSource)
Method: GET
http://zlmediakit.com:8880/index/api/addFFmpegSource?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&src_url=http://hefeng.live.tempsource.cjyun.org/videotmp/s10100-hftv.m3u8&dst_url=rtmp://127.0.0.1/live/hks2&timeout_ms=10000&enable_hls=0&enable_mp4=0
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| src_url | http://hefeng.live.tempsource.cjyun.org/videotmp/s10100-hftv.m3u8 | FFmpeg拉流地址,支持任意协议或格式(只要FFmpeg支持即可) |
| dst_url | rtmp://127.0.0.1/live/hks2 | FFmpeg rtmp推流地址,一般都是推给自己,例如rtmp://127.0.0.1/live/stream_form_ffmpeg |
| timeout_ms | 10000 | FFmpeg推流成功超时时间,单位毫秒 |
| enable_hls | 0 | 是否开启hls录制 |
| enable_mp4 | 0 | 是否开启mp4录制 |
| ffmpeg_cmd_key | ffmpeg.cmd_hd | FFmpeg命名参数模板,置空则采用配置项:ffmpeg.cmd |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 关闭FFmpeg拉流代理(delFFmpegSource)
Method: GET
http://zlmediakit.com:8880/index/api/delFFmpegSource?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&key=5f748d2ef9712e4b2f6f970c1d44d93a
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| key | 5f748d2ef9712e4b2f6f970c1d44d93a | undefined |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 流是否在线(isMediaOnline)
Method: GET
http://zlmediakit.com:8880/index/api/isMediaOnline?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&schema=rtsp&vhost=__defaultVhost__&app=proxy&stream=1
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| schema | rtsp | 协议,例如 rtsp或rtmp |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | proxy | 应用名,例如 live |
| stream | 1 | 流id,例如 test |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取媒体流播放器列表(getMediaPlayerList)
Method: GET
http://zlmediakit.com:8880/index/api/getMediaPlayerList?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&schema=rtsp&vhost=__defaultVhost__&app=proxy&stream=1
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| schema | rtsp | 协议,例如 rtsp或rtmp |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | proxy | 应用名,例如 live |
| stream | 1 | 流id,例如 test |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 广播webrtc datachannel消息(broadcastMessage)
Method: GET
http://zlmediakit.com:8880/index/api/broadcastMessage?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&schema=rtsp&vhost=__defaultVhost__&app=live&stream=test&msg=Hello ZLMediakit
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| schema | rtsp | 协议,例如 rtsp或rtmp,目前仅支持rtsp协议 |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | live | 应用名,例如 live |
| stream | test | 流id,例如 test |
| msg | Hello ZLMediakit | undefined |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取流信息(getMediaInfo)
Method: GET
http://zlmediakit.com:8880/index/api/getMediaInfo?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&schema=rtsp&vhost=__defaultVhost__&app=live&stream=mym9
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| schema | rtsp | 协议,例如 rtsp或rtmp |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | live | 应用名,例如 live |
| stream | mym9 | 流id,例如 test |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取流信息(getMp4RecordFile)
Method: GET
http://zlmediakit.com:8880/index/api/getMp4RecordFile?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&vhost=__defaultVhost__&app=proxy&stream=2&customized_path=/www&period=2020-05-26
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | proxy | 应用名,例如 live |
| stream | 2 | 流id,例如 test |
| customized_path | /www | 录像文件保存自定义根目录,为空则采用配置文件设置 |
| period | 2020-05-26 | 流的录像日期,格式为2020-02-01,如果不是完整的日期,那么是搜索录像文件夹列表,否则搜索对应日期下的mp4文件列表 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 删除录像文件夹(deleteRecordDirectory)
Method: GET
http://zlmediakit.com:8880/index/api/deleteRecordDirectory?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&vhost=__defaultVhost__&app=proxy&stream=2&period=2020-01-01
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | proxy | 应用名,例如 live |
| stream | 2 | 流id,例如 test |
| period | 2020-01-01 | 流的录像日期,格式为2020-01-01,如果不是完整的日期,那么会删除失败 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 开始录制(startRecord)
Method: GET
http://zlmediakit.com:8880/index/api/startRecord?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&type=1&vhost=__defaultVhost__&app=live&stream=obs
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| type | 1 | 0为hls,1为mp4 |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | live | 应用名,例如 live |
| stream | obs | 流id,例如 obs |
| customized_path | null | 录像文件保存自定义根目录,为空则采用配置文件设置 |
| max_second | 1000 | MP4录制的切片时间大小,单位秒 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 设置录像速度(setRecordSpeed)
Method: GET
http://zlmediakit.com:8880/index/api/setRecordSpeed?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&vhost=__defaultVhost__&app=live&stream=obs&speed=2.0
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | live | 应用名,例如 live |
| stream | obs | 流id,例如 obs |
| speed | 2.0 | 要设置的录像倍速 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 设置录像流播放位置(seekRecordStamp)
Method: GET
http://zlmediakit.com:8880/index/api/seekRecordStamp?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&vhost=__defaultVhost__&app=live&stream=obs&stamp=1000
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | live | 应用名,例如 live |
| stream | obs | 流id,例如 obs |
| stamp | 1000 | 要设置的录像播放位置 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 停止录制(stopRecord)
Method: GET
http://zlmediakit.com:8880/index/api/stopRecord?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&type=1&vhost=__defaultVhost__&app=live&stream=obs
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| type | 1 | 0为hls,1为mp4 |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | live | 应用名,例如 live |
| stream | obs | 流id,例如 obs |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 是否正在录制(isRecording)
Method: GET
http://zlmediakit.com:8880/index/api/isRecording?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&type=1&vhost=__defaultVhost__&app=live&stream=obs
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| type | 1 | 0为hls,1为mp4 |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | live | 应用名,例如 live |
| stream | obs | 流id,例如 obs |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取截图(getSnap)
Method: GET
http://zlmediakit.com:8880/index/api/getSnap?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&url=rtsp://www.mym9.com/101065?from=2019-06-28/01:12:13&timeout_sec=10&expire_sec=1
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| url | rtsp://www.mym9.com/101065?from=2019-06-28/01:12:13 | 需要截图的url,可以是本机的,也可以是远程主机的 |
| timeout_sec | 10 | 截图失败超时时间,防止FFmpeg一直等待截图 |
| expire_sec | 1 | 截图的过期时间,该时间内产生的截图都会作为缓存返回 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取rtp推流信息(getRtpInfo)
Method: GET
http://zlmediakit.com:8880/index/api/getRtpInfo?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&stream_id=test
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| stream_id | test | 流id |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 创建RTP服务器(openRtpServer)
Method: GET
http://zlmediakit.com:8880/index/api/openRtpServer?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&port=0&tcp_mode=1&stream_id=test
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| port | 0 | 绑定的端口,0时为随机端口 |
| tcp_mode | 1 | tcp模式,0时为不启用tcp监听,1时为启用tcp监听,2时为tcp主动连接模式 |
| stream_id | test | 该端口绑定的流id |
| re_use_port | 0 | 是否重用端口,默认为0,非必选参数 |
| ssrc | 0 | 是否指定收流的rtp ssrc, 十进制数字,不指定或指定0时则不过滤rtp,非必选参数 |
| only_track | 1 | 是否为单音频/单视频track,0:不设置,1:单音频,2:单视频 |
| local_ip | :: | 指定创建RTP的本地ip,ipv4可填”0.0.0.0“,ipv6可填”::“,一般保持默认 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 创建多路复用RTP服务器(openRtpServerMultiplex)
Method: GET
http://zlmediakit.com:8880/index/api/openRtpServerMultiplex?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&port=0&tcp_mode=1&stream_id=test
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| port | 0 | 绑定的端口,0时为随机端口 |
| tcp_mode | 1 | tcp模式,0时为不启用tcp监听,1时为启用tcp监听 |
| stream_id | test | 该端口绑定的流id |
| only_track | 0 | 是否为单音频/单视频track,0:不设置,1:单音频,2:单视频 |
| local_ip | :: | 指定创建RTP的本地ip,ipv4可填”0.0.0.0“,ipv6可填”::“,一般保持默认 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 连接RTP服务器(connectRtpServer)
Method: GET
http://zlmediakit.com:8880/index/api/connectRtpServer?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&dst_url=0&dst_port=1&stream_id=test
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| dst_url | 0 | tcp主动模式时服务端地址 |
| dst_port | 1 | tcp主动模式时服务端端口 |
| stream_id | test | OpenRtpServer时绑定的流id |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 关闭RTP服务器(closeRtpServer)
Method: GET
http://zlmediakit.com:8880/index/api/closeRtpServer?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&stream_id=test
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| stream_id | test | 该端口绑定的流id |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 更新RTP服务器过滤SSRC(updateRtpServerSSRC)
Method: GET
http://zlmediakit.com:8880/index/api/updateRtpServerSSRC?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&stream_id=test&ssrc=123456
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| stream_id | test | 该端口绑定的流id |
| ssrc | 123456 | 十进制ssrc |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 暂停RTP超时检查(pauseRtpCheck)
Method: GET
http://zlmediakit.com:8880/index/api/pauseRtpCheck?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&stream_id=test
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| stream_id | test | 该端口绑定的流id |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 恢复RTP超时检查(resumeRtpCheck)
Method: GET
http://zlmediakit.com:8880/index/api/resumeRtpCheck?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&stream_id=test
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| stream_id | test | 该端口绑定的流id |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取RTP服务器列表(listRtpServer)
Method: GET
http://zlmediakit.com:8880/index/api/listRtpServer?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 开始发送rtp(startSendRtp)
Method: GET
http://zlmediakit.com:8880/index/api/startSendRtp?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&vhost=__defaultVhost__&app=live&stream=obs&ssrc=1&dst_url=127.0.0.1&dst_port=10000&is_udp=0
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | live | 应用名,例如 live |
| stream | obs | 流id,例如 obs |
| ssrc_multi_send | 0 | 是否支持同ssrc推流到多个上级服务器,该参数非必选参数 默认false |
| ssrc | 1 | rtp推流的ssrc |
| dst_url | 127.0.0.1 | 目标ip或域名 |
| dst_port | 10000 | 目标端口 |
| is_udp | 0 | 是否为udp模式,否则为tcp模式 |
| src_port | 0 | 指定tcp/udp客户端使用的本地端口,0时为随机端口,该参数非必选参数,不传时为随机端口。 |
| from_mp4 | 0 | 是否推送本地MP4录像,该参数非必选参数 |
| use_ps | 1 | rtp打包采用ps还是es模式,默认采用ps模式,该参数非必选参数 |
| pt | 96 | rtp payload type,默认96,该参数非必选参数 |
| only_audio | 1 | rtp es方式打包时,是否只打包音频,该参数非必选参数 |
| udp_rtcp_timeout | 0 | udp方式推流时,是否开启rtcp发送和rtcp接收超时判断,开启后(默认关闭),如果接收rr rtcp超时,将导致主动停止rtp发送 |
| recv_stream_id | 发送rtp同时接收,一般用于双向语言对讲, 如果不为空,说明开启接收,值为接收流的id |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 开始tcp passive被动发送rtp(startSendRtpPassive)
Method: GET
http://zlmediakit.com:8880/index/api/startSendRtpPassive?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&vhost=__defaultVhost__&app=live&stream=test&ssrc=1
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | live | 应用名,例如 live |
| stream | test | 流id,例如 obs |
| ssrc | 1 | rtp推流的ssrc,ssrc不同时,可以推流到多个上级服务器 |
| src_port | 0 | 指定tcp/udp客户端使用的本地端口,0时为随机端口,该参数非必选参数,不传时为随机端口。 |
| from_mp4 | 0 | 是否推送本地MP4录像,该参数非必选参数 |
| use_ps | 1 | rtp打包采用ps还是es模式,默认采用ps模式,该参数非必选参数 |
| pt | 96 | rtp payload type,默认96,该参数非必选参数 |
| only_audio | 1 | rtp es方式打包时,是否只打包音频,该参数非必选参数 |
| recv_stream_id | 发送rtp同时接收,一般用于双向语言对讲, 如果不为空,说明开启接收,值为接收流的id | |
| close_delay_ms | 5000 | 等待tcp连接超时时间,单位毫秒,默认5000毫秒 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 停止 发送rtp(stopSendRtp)
Method: GET
http://zlmediakit.com:8880/index/api/stopSendRtp?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&vhost=__defaultVhost__&app=live&stream=obs
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| vhost | defaultVhost | 虚拟主机,例如__defaultVhost__ |
| app | live | 应用名,例如 live |
| stream | obs | 流id,例如 obs |
| ssrc | 根据ssrc关停某路rtp推流,不传时关闭所有推流 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取版本信息(version)
Method: GET
http://zlmediakit.com:8880/index/api/version?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | undefined |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取拉流代理信息(getProxyInfo)
Method: GET
http://zlmediakit.com:8880/index/api/getProxyInfo?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&key=__defaultVhost__/live/test
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | undefined |
| key | defaultVhost/live/test | undefined |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 获取推流代理信息(getProxyPusherInfo)
Method: GET
http://zlmediakit.com:8880/index/api/getProxyPusherInfo?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&key=rtmp/__defaultVhost__/live/test/f40a8ab006cac16ecc0858409e890491
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | undefined |
| key | rtmp/defaultVhost/live/test/f40a8ab006cac16ecc0858409e890491 | undefined |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 点播mp4文件(loadMP4File)
Method: GET
http://zlmediakit.com:8880/index/api/loadMP4File?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&vhost=__defaultVhost__&app=live&stream=test&file_path=/path/to/mp4/file.mp4
Query Params
| Param | value | description |
|---|---|---|
| secret | 035c73f7-bb6b-4889-a715-d9eb2d1925cc | api操作密钥(配置文件配置) |
| vhost | defaultVhost | 添加的流的虚拟主机,例如__defaultVhost__ |
| app | live | 添加的流的应用名,例如live |
| stream | test | 添加的流的id名,例如test |
| file_path | /path/to/mp4/file.mp4 | mp4文件绝对路径 |
| file_repeat | 1 | 是否循环点播mp4文件,如果配置文件已经开启循环点播,此参数无效 |
| enable_hls | 是否转hls-ts | |
| enable_hls_fmp4 | 是否转hls-fmp4 | |
| enable_mp4 | 是否mp4录制,默认不开启(覆盖配置文件) | |
| enable_rtsp | 1 | 是否转协议为rtsp/webrtc |
| enable_rtmp | 1 | 是否转协议为rtmp/flv |
| enable_ts | 1 | 是否转协议为http-ts/ws-ts |
| enable_fmp4 | 1 | 是否转协议为http-fmp4/ws-fmp4 |
| enable_audio | 1 | 转协议是否开启音频 |
| add_mute_audio | 1 | 转协议无音频时,是否添加静音aac音频 |
| mp4_save_path | mp4录制保存根目录,置空使用默认目录 | |
| mp4_max_second | 1800 | mp4录制切片大小,单位秒 |
| hls_save_path | hls保存根目录,置空使用默认目录 | |
| modify_stamp | 是否修改原始时间戳,默认值2;取值范围:0.采用源视频流绝对时间戳,不做任何改变;1.采用zlmediakit接收数据时的系统时间戳(有平滑处理);2.采用源视频流时间戳相对时间戳(增长量),有做时间戳跳跃和回退矫正 | |
| auto_close | 无人观看时,是否直接关闭(而不是通过on_none_reader hook返回close);强制开启,此参数不生效 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
End-point: 下载文件(downloadFile)
Method: GET
http://zlmediakit.com:8880/index/api/downloadFile?file_path=/path/to/file.ext
Query Params
| Param | value | description |
|---|---|---|
| file_path | /path/to/file.ext | 文件绝对路径,根据文件名生成Content-Type;该接口将触发on_http_access hook |
| save_name | test | 浏览器下载文件后保存文件名;可选参数 |
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Powered By: postman-to-markdown
测试文档
使用教程
- 代码依赖与版权声明
- 快速开始
- vcpkg安装zlmediakit
- 服务器的启动与关闭
- GB28181教程
- 推流播放测试
- RESTful 接口
- RESTful 接口 postman自动生成
- Web Hook 接口
- Python混合编程
- 配置文件详解
- 播放URL规则
- 按需拉流
- 按需推流
- 播放鉴权
- 推流鉴权
- 怎样创建直播流
- webrtc编译与使用
- webrtc信令交互格式
- webrtc重磅更新
- 怎么开启https相关功能
相关文档和资源
- zlmediakit独家特性
- zlmediakit的hls高性能之旅
- 高并发实现原理
- RTSP推流流程
- 流媒体相关技术介绍
- 直播延时的本质
- rtmp对H265/opus的支持
- ssl自签名证书测试
- 视频会议相关资源