SRS--停止客户端推流

方法:查询到用户编号,即cid,然后调用delete。
查询所有流
curl -v -X GET http://10.1.0.222:1985/api/v1/streams/
{"code":0,"server":24418,"streams":[{"id":24420,"name":"123","vhost":24419,"app":"live","live_ms":1532057139810,"clients":2,"send_bytes":173045854,"recv_bytes":343569813,"kbps":{"recv_30s":1008,"send_30s":1013},"publish":{"active":true,"cid":112},"video":{"codec":"H264","profile":"High","level":"4"},"audio":{"codec":"AAC","sample_rate":44100,"channel":2,"profile":"LC"}}]}
查询流信息
curl -v -X GET http://10.1.0.222:1985/api/v1/streams/24420
{"code":0,"server":24418,"stream":{"id":24420,"name":"123","vhost":24419,"app":"live","live_ms":1532057167816,"clients":2,"send_bytes":174677218,"recv_bytes":347025604,"kbps":{"recv_30s":1014,"send_30s":504},"publish":{"active":true,"cid":112},"video":{"codec":"H264","profile":"High","level":"4"},"audio":{"codec":"AAC","sample_rate":44100,"channel":2,"profile":"LC"}}}
停止推流
curl -v -X DELETE http://10.1.0.222:1985/api/v1/clients/112 && echo ""

猜你喜欢

转载自blog.csdn.net/evsqiezi/article/details/81131281