Month: November 2021
Nimble Streamer Server Status
Introduction
Nimble Streamer accepts HTTP calls to control its behavior and to get some stats and other data.
Each call is a GET, POST or DELETE request via HTTP.
As a response you get JSON structure with required data or raw data in case of MP4 archive.
Setup
In the /etc/nimble/nimble.conf
file, add the following lines to enable the service:
1 2 3 4 5 6 7 8 9 10 11 12 |
# network interface(s) to listen # all interfaces management_listen_interfaces = * # specified interfaces management_listen_interfaces = 127.0.0.1, 192.168.0.1 # network port; 8082 is assumed management_port = 8086 # (optional) password management_token = mypassword |
Information Retrieval
Server Status
Request URL: /manage/server_status
1 2 3 4 5 |
# Example curl -vvv http://127.0.0.1:8082/manage/server_status # return value {"Connections": 10, "OutRate": 5120000, "SysInfo": {"ap":2,"scl":0,"tpms":2098434048,"fpms":775127040,"tsss":2145382400,"fsss":1707151360}} |
Return Values:
Connections | number of active connections |
OutRate | current transmission speed, bits per seconds |
ap | Available processors |
scl | System CPU load |
tpms | Total physical memory size |
fpms | Free physical memory size |
tsss | Total swap space size |
fsss | Free swap space size |
RamCacheSize | RAM cache size |
FileCacheSize | File cache size |
MaxRamCacheSize | Maximum RAM cache size |
MaxFileCacheSize | Maximum file cache size |
Status of Outgoing Streams
This method allows getting current status of outgoing streams for all supported protocols.
Request URL: /manage/rtmp_status
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# Example curl -vvv http://127.0.0.1:8082/manage/rtmp_status # Return Value [ { "app" : "live", "streams" : [ { "acodec" : "mp4a.40.2", "vcodec" : "avc1.42c01f", "publish_time" : "1524060893", "bandwidth" : "1697348", "protocol" : "RTSP", "resolution" : "1280x720", "strm" : "stream_rtsp" }, { "vcodec" : "avc1.42c01f", "publish_time" : "1524060893", "acodec" : "mp4a.40.2", "strm" : "stream_rtmp", "bandwidth" : "1698536", "protocol" : "RTMP", "resolution" : "1280x720" }, { "vcodec" : "avc1.64001e", "publish_time" : "1524060893", "bandwidth" : "286200", "resolution" : "640x360", "protocol" : "ENCODER", "strm" : "stream_360p" } ] } ] |