Add details for debug info

This commit is contained in:
Blake Blackshear 2020-08-09 13:06:33 -05:00
parent 194baaeb56
commit 73a5e11b9b

View File

@ -144,7 +144,7 @@ The best snapshot for any object type. It is a full resolution image by default.
The most recent frame that frigate has finished processing. It is a full resolution image by default. You can change the size of the image by appending `h=height-in-pixels` to the endpoint.
### `/debug/stats`
Contains some granular debug info that can be used for sensors in HomeAssistant.
Contains some granular debug info that can be used for sensors in HomeAssistant. See details below.
## MQTT Messages
These are the MQTT messages generated by Frigate. The default topic_prefix is `frigate`, but can be changed in the config file.
@ -249,6 +249,86 @@ During testing, `draw_zones` can be set in the config to tell frigate to draw th
![Zone Example](docs/zone_example.jpg)
## Debug Info
```jsonc
{
/* Per Camera Stats */
"back": {
/***************
* Frames per second being consumed from your camera. If this is higher
* than it is supposed to be, you should set -r FPS in your input_args.
***************/
"camera_fps": 5.0,
/***************
* Number of times detection is run per second. This will often be higher than
* your camera FPS because frigate often looks at the same frame multiple times
* or in multiple locations
***************/
"detection_fps": 1.5,
/***************
* PID for the ffmpeg process that consumes this camera
***************/
"ffmpeg_pid": 27,
/***************
* Timestamps of frames in various parts of processing
***************/
"frame_info": {
/***************
* Timestamp of the frame frigate is running object detection on was read from ffmpeg.
***************/
"detect": 1596994991.91426,
/***************
* Timestamp of the frame frigate is processing detected objects on was read from ffmpeg.
* This is where MQTT messages are sent, zones are checked, etc.
***************/
"process": 1596994991.91426,
/***************
* Timestamp of the frame frigate last read from ffmpeg.
***************/
"read": 1596994991.91426
},
/***************
* PID for the process that runs detection for this camera
***************/
"pid": 34,
/***************
* Frames per second being processed by frigate.
***************/
"process_fps": 5.1,
/***************
* Timestamp when the detection process started looking for a frame. If this value stays constant
* for a long time, that means there aren't any frames in the frame queue.
***************/
"read_start": 1596994991.943814,
/***************
* Frames per second skip for processing by frigate.
***************/
"skipped_fps": 0.0
},
/* Coral Stats */
"coral": {
/***************
* Timestamp when object detection started. If this value stays constant
* for a long time, that means the detection process is stuck.
***************/
"detection_start": 0.0,
/***************
* Frames per second of the Coral. This should be the sum of all detection_fps values from cameras.
***************/
"fps": 6.9,
/***************
* Time spent running object detection in milliseconds.
***************/
"inference_speed": 10.48,
/***************
* PID for the shared process that runs object detection on the Coral.
***************/
"pid": 25321
},
"plasma_store_rc": null // Return code for the plasma store. This should be null normally.
}
```
## Tips
- Lower the framerate of the video feed on the camera to reduce the CPU usage for capturing the feed. Not as effective, but you can also modify the `take_frame` [configuration](config/config.example.yml) for each camera to only analyze every other frame, or every third frame, etc.
- Hard code the resolution of each camera in your config if you are having difficulty starting frigate or if the initial ffprobe for camerea resolution fails or returns incorrect info. Example: