A utility module for parsing incoming KMP tracks.
Used by: nginx-live-module, nginx-kmp-cc-module, nginx-kmp-rtmp-module.
Dependencies: nginx-common.
-
Invoke callbacks on connection events (connect / disconnect)
-
Invoke callbacks on KMP packets (media info / frame / end-of-stream)
-
Interface for sending back acks
-
Debugging features - log frame metadata / dump input to file
-
Generation of status JSON with statistics about the input connection
connection
- integer, the nginx connection identifier, unique per nginx worker processremote_addr
- string, the ip + port of the remote peerchannel_id
- string, the channel idtrack_id
- string, the track iduptime
- integer, the time that passed since the connection was established, in secondsreceived_bytes
- integer, the total number of bytes received from the remote peerreceived_data_bytes
- integer, the sum of the data size of all the received framesreceived_frames
- integer, the total number of frames that were receivedreceived_key_frames
- integer, the total number of keyframes that were receivedlast_created
- integer, the KMPcreated
value of the last frame that was receivedskipped_frames
- object, contains the statistics about frames that were received and discarded, contains the following fields:duplicate
- integer, frames that were already received before the connection dropped and was re-establishedempty
- integer, frames with zero data sizeno_media_info
- integer, frames received before any media info packetno_key
- integer, video frames received before the first keyframe
latency
- object, the latency of the incoming frames. The latency is defined as the difference between the KMPcreated
value of the frame and the server clock. When running in multi-server environments, the measurement may be inaccurate due to clock differences. The object contains the following fields:min
- integer, the minimum latency, in timescale unitsmax
- integer, the maximum latency, in timescale unitsavg
- integer, the average latency, in timescale units