Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Support]: Does Best Snapshot via HTTP API work in RC1? #3667

Closed
tubalainen opened this issue Aug 18, 2022 · 2 comments
Closed

[Support]: Does Best Snapshot via HTTP API work in RC1? #3667

tubalainen opened this issue Aug 18, 2022 · 2 comments

Comments

@tubalainen
Copy link
Contributor

tubalainen commented Aug 18, 2022

Describe the problem you are having

The Best Snapshots configuration is not honoured when accessing the HTTP API.

When accessing the HTTP API endpoint http://192.168.xx.xx:5000/api/cam1_framsidan/person/best.jpg?h=1920 it presents a picture in 175x175 pixels resolution.

Using the HTTP API snapshot URL works and it presents an image according to the configuration, but I am no able to append the different params like &h=1920 - http://192.168.xx.xx:5000/api/cam1_framsidan/person/snapshot.jpg?h=1920 Frigate presents a picture according to the configuration height setting.

Personally I use the "best.jpg" to present to an external screen and it always shows (in the example) the best and latest person - no false positives. If I use snapshot.jpg on the label (in this example - person) it will show the last detection (in my case, with cluttered lawns with toys etc) often false positives, its impossible to "tweak configuration" for all the different scenarios of toy placements. Thats why I really enjoyed and use best.jpg.

Question 1: To what HTTP functions does the configuration snapshots: configuration corresponds to?
Question 2: Has the HTTP API Best Snapshot feature been removed in the Version 11 - RC1? I cannot find it in the documentation (any more). RC1 docs
Question 3: And, is there a reason why I cannot append the params to snapshot.jpg or best.jpg?

Pledge: Please bring back a fully featured best.jpg to the API and please let us use the params on both best.jpg and snapshot.jpg via the HTTP API. Thanks :)

image

snapshots:
  enabled: True
  timestamp: False
  bounding_box: False
  crop: False
  height: 1920
  retain:
    default: 10
    objects:
      person: 15

Version

0.11.0-37325C7

Frigate config file

{
  "birdseye": {
    "enabled": true,
    "height": 1080,
    "mode": "objects",
    "quality": 8,
    "width": 1920
  },
  "cameras": {
    "cam10_baksidan": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": true,
        "mode": "objects"
      },
      "detect": {
        "enabled": true,
        "fps": 8,
        "height": 1440,
        "max_disappeared": 100,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 80
        },
        "width": 2560
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [
          "-hwaccel",
          "vaapi",
          "-hwaccel_device",
          "/dev/dri/renderD128",
          "-hwaccel_output_format",
          "yuv420p"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://docker:8554/cam10_ch1",
            "roles": [
              "record",
              "rtmp",
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://docker:8554/cam10_ch1 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/cam10_baksidan-%Y%m%d%H%M%S.mp4 -r 8 -s 2560x1440 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "record",
            "rtmp",
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": [
          "1537,0,1239,179,1397,318,906,386,663,56,0,75,0,0",
          "2560,0,2213,0,2233,90,2348,192,2359,355,2560,338"
        ],
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": false,
        "crop": true,
        "enabled": true,
        "height": 1920,
        "quality": 70,
        "required_zones": [],
        "timestamp": false
      },
      "name": "cam10_baksidan",
      "objects": {
        "filters": {
          "cat": {
            "mask": null,
            "max_area": 80000,
            "max_ratio": 24000000,
            "min_area": 20000,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.8
          },
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 300000,
            "max_ratio": 24000000,
            "min_area": 20000,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.8
          }
        },
        "mask": "",
        "track": [
          "person",
          "cat",
          "dog"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": null,
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 14,
            "mode": "active_objects",
            "objects": {}
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 5,
          "mode": "motion"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": false
      },
      "snapshots": {
        "bounding_box": false,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": 1920,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "mode": "motion",
          "objects": {
            "person": 15
          }
        },
        "timestamp": false
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {
        "cam10_baksidan_grasmattan": {
          "coordinates": "556,1440,2560,1440,2560,885,1969,623,2373,196,2109,117,1539,34,1352,142,1387,410,932,612,1420,893,562,1440",
          "filters": {},
          "objects": []
        },
        "cam10_baksidan_odlingsladorna": {
          "coordinates": "2560,934,2560,477,2150,355,1875,630",
          "filters": {},
          "objects": []
        },
        "cam10_baksidan_trallen": {
          "coordinates": "716,1361,1415,907,813,542,1103,403,588,217,297,299,372,613,106,720,202,1440",
          "filters": {},
          "objects": []
        }
      }
    },
    "cam1_framsidan": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": true,
        "mode": "objects"
      },
      "detect": {
        "enabled": true,
        "fps": 8,
        "height": 1520,
        "max_disappeared": 100,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 80
        },
        "width": 2688
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [
          "-hwaccel",
          "vaapi",
          "-hwaccel_device",
          "/dev/dri/renderD128",
          "-hwaccel_output_format",
          "yuv420p"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://docker:8554/cam1_ch1",
            "roles": [
              "record",
              "rtmp",
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://docker:8554/cam1_ch1 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/cam1_framsidan-%Y%m%d%H%M%S.mp4 -r 8 -s 2688x1520 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "record",
            "rtmp",
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": "0,831,0,2,2687,0,2687,798,2257,770,2274,444,2098,511,1894,651,930,620",
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": false,
        "crop": true,
        "enabled": true,
        "height": 1920,
        "quality": 70,
        "required_zones": [],
        "timestamp": false
      },
      "name": "cam1_framsidan",
      "objects": {
        "filters": {
          "bear": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "cat": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "cow": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "horse": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 300000,
            "max_ratio": 24000000,
            "min_area": 20000,
            "min_ratio": 0,
            "min_score": 0.4,
            "threshold": 0.7
          },
          "sheep": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person",
          "cat",
          "dog",
          "horse",
          "sheep",
          "cow",
          "bear"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": null,
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 14,
            "mode": "active_objects",
            "objects": {}
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 5,
          "mode": "motion"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": false
      },
      "snapshots": {
        "bounding_box": false,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": 1920,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "mode": "motion",
          "objects": {
            "person": 15
          }
        },
        "timestamp": false
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {
        "cam1_framsidan_grasmattan": {
          "coordinates": "1689,1520,1961,1242,1624,1198,2133,746,2368,762,2410,667,926,594,0,814,0,1267,411,1520",
          "filters": {},
          "objects": []
        },
        "cam1_framsidan_stenlaggning": {
          "coordinates": "2688,1520,2688,1156,1996,1110,1712,1520",
          "filters": {},
          "objects": []
        },
        "cam1_framsidan_trallen": {
          "coordinates": "2688,1167,2688,782,2140,738,1730,1089",
          "filters": {},
          "objects": []
        }
      }
    },
    "cam2_baksidan": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": true,
        "mode": "objects"
      },
      "detect": {
        "enabled": true,
        "fps": 8,
        "height": 1520,
        "max_disappeared": 100,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 80
        },
        "width": 2688
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [
          "-hwaccel",
          "vaapi",
          "-hwaccel_device",
          "/dev/dri/renderD128",
          "-hwaccel_output_format",
          "yuv420p"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://docker:8554/cam2_ch1",
            "roles": [
              "record",
              "rtmp",
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://docker:8554/cam2_ch1 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/cam2_baksidan-%Y%m%d%H%M%S.mp4 -r 8 -s 2688x1520 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "record",
            "rtmp",
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": "0,228,1,0,2686,0,2686,477,2147,273,974,228",
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": false,
        "crop": true,
        "enabled": true,
        "height": 1920,
        "quality": 70,
        "required_zones": [],
        "timestamp": false
      },
      "name": "cam2_baksidan",
      "objects": {
        "filters": {
          "person": {
            "mask": null,
            "max_area": 300000,
            "max_ratio": 24000000,
            "min_area": 20000,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.8
          }
        },
        "mask": "",
        "track": [
          "person"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": null,
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 14,
            "mode": "active_objects",
            "objects": {}
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 5,
          "mode": "motion"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": false
      },
      "snapshots": {
        "bounding_box": false,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": 1920,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "mode": "motion",
          "objects": {
            "person": 15
          }
        },
        "timestamp": false
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {
        "cam2_baksidan_buskarna": {
          "coordinates": "0,228,1,0,2686,0,2686,477,2147,273,974,228",
          "filters": {},
          "objects": []
        }
      }
    },
    "cam3_framsidan": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": true,
        "mode": "objects"
      },
      "detect": {
        "enabled": true,
        "fps": 8,
        "height": 1520,
        "max_disappeared": 100,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 80
        },
        "width": 2688
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [
          "-hwaccel",
          "vaapi",
          "-hwaccel_device",
          "/dev/dri/renderD128",
          "-hwaccel_output_format",
          "yuv420p"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://docker:8554/cam3_ch1",
            "roles": [
              "record",
              "rtmp",
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://docker:8554/cam3_ch1 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/cam3_framsidan-%Y%m%d%H%M%S.mp4 -r 8 -s 2688x1520 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "record",
            "rtmp",
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": "0,1518,0,0,2687,0,2687,644,2305,542,2290,463,2115,406,1889,401,1922,119,1794,17,1393,43,1381,468,1174,523,889,485,804,337,835,216,502,221,512,539,414,615,433,1518",
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": false,
        "crop": true,
        "enabled": true,
        "height": 1920,
        "quality": 70,
        "required_zones": [],
        "timestamp": false
      },
      "name": "cam3_framsidan",
      "objects": {
        "filters": {
          "bear": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "cat": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "cow": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "horse": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 350000,
            "max_ratio": 24000000,
            "min_area": 10000,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.8
          },
          "sheep": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person",
          "cat",
          "dog",
          "horse",
          "sheep",
          "cow",
          "bear"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": null,
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 14,
            "mode": "active_objects",
            "objects": {}
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 5,
          "mode": "motion"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": false
      },
      "snapshots": {
        "bounding_box": false,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": 1920,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "mode": "motion",
          "objects": {
            "person": 15
          }
        },
        "timestamp": false
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {
        "cam3_framsidan_grasmattan": {
          "coordinates": "1496,1046,2118,1520,2688,1520,2688,624,2325,482,2120,416,1949,411,1966,519,1750,522,1613,530,1609,607,1307,624,1193,537,967,474,802,568,753,687,1085,1098",
          "filters": {},
          "objects": []
        },
        "cam3_framsidan_stenladdningen": {
          "coordinates": "1050,1110,762,620,940,495,926,399,618,414,615,509,386,632,395,842,207,851,238,1170",
          "filters": {},
          "objects": []
        },
        "cam3_framsidan_trallen": {
          "coordinates": "2114,1520,1501,1045,237,1162,282,1520",
          "filters": {},
          "objects": []
        },
        "cam3_framsidan_uppfarten": {
          "coordinates": "521,423,896,405,892,232,514,248",
          "filters": {},
          "objects": []
        }
      }
    },
    "cam6_baksidan": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": true,
        "mode": "objects"
      },
      "detect": {
        "enabled": true,
        "fps": 12,
        "height": 1440,
        "max_disappeared": 100,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 120
        },
        "width": 2560
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [
          "-hwaccel",
          "vaapi",
          "-hwaccel_device",
          "/dev/dri/renderD128",
          "-hwaccel_output_format",
          "yuv420p"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "nobuffer",
          "-flags",
          "low_delay",
          "-strict",
          "experimental",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rw_timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtmp://192.168.xx.xx:1935/bcs/channel0_main.bcs?channel=0&stream=0&user=admin&password=meh",
            "roles": [
              "record",
              "rtmp",
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -rw_timeout 5000000 -use_wallclock_as_timestamps 1 -i rtmp://192.168.21.35:1935/bcs/channel0_main.bcs?channel=0&stream=0&user=admin&password=meh -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/cam6_baksidan-%Y%m%d%H%M%S.mp4 -r 12 -s 2560x1440 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "record",
            "rtmp",
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": [
          "0,455,542,422,651,371,1419,350,1425,231,1701,254,1693,441,2256,479,2560,612,2560,0,0,0",
          "201,1440,0,1268,0,1440,136,1440,1146,1440,1531,1320,1901,1440,1320,1440"
        ],
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": false,
        "crop": true,
        "enabled": true,
        "height": 1920,
        "quality": 70,
        "required_zones": [],
        "timestamp": false
      },
      "name": "cam6_baksidan",
      "objects": {
        "filters": {
          "bear": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "cat": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "cow": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "horse": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 30000,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.8
          },
          "sheep": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person",
          "cat",
          "dog",
          "horse",
          "sheep",
          "cow",
          "bear"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": null,
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 14,
            "mode": "active_objects",
            "objects": {}
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 5,
          "mode": "motion"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": false
      },
      "snapshots": {
        "bounding_box": false,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": 1920,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "mode": "motion",
          "objects": {
            "person": 15
          }
        },
        "timestamp": false
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {}
    },
    "cam9_uppfart": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": true,
        "mode": "objects"
      },
      "detect": {
        "enabled": true,
        "fps": 8,
        "height": 2160,
        "max_disappeared": 100,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 80
        },
        "width": 3840
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [
          "-hwaccel",
          "vaapi",
          "-hwaccel_device",
          "/dev/dri/renderD128",
          "-hwaccel_output_format",
          "yuv420p"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://docker:8554/cam9_ch1",
            "roles": [
              "record",
              "rtmp",
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://docker:8554/cam9_ch1 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/cam9_uppfart-%Y%m%d%H%M%S.mp4 -r 8 -s 3840x2160 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "record",
            "rtmp",
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": "787,417,783,0,3838,0,3838,665,3519,492,3519,424,2526,71,2570,326,2919,244,3180,326,3245,444,3285,556,3204,719,3000,929,2648,949,1962,882,1422,676",
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": false,
        "crop": true,
        "enabled": true,
        "height": 1920,
        "quality": 70,
        "required_zones": [],
        "timestamp": false
      },
      "name": "cam9_uppfart",
      "objects": {
        "filters": {
          "cat": {
            "mask": null,
            "max_area": 23000,
            "max_ratio": 24000000,
            "min_area": 2000,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 1000000,
            "max_ratio": 24000000,
            "min_area": 20000,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.8
          }
        },
        "mask": "",
        "track": [
          "person",
          "cat"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": null,
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 14,
            "mode": "active_objects",
            "objects": {}
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 5,
          "mode": "motion"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": false
      },
      "snapshots": {
        "bounding_box": false,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": 1920,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "mode": "motion",
          "objects": {
            "person": 15
          }
        },
        "timestamp": false
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {
        "cam9_uppfart_grasmattan": {
          "coordinates": "1917,0,1917,370,2926,349,3203,361,3309,780,3554,739,3450,383,2784,116,2689,129",
          "filters": {},
          "objects": []
        },
        "cam9_uppfart_juni": {
          "coordinates": "805,150,521,0,0,92,0,398",
          "filters": {},
          "objects": []
        },
        "cam9_uppfart_uppfarten": {
          "coordinates": "3840,2160,3840,250,3586,198,3535,714,2449,916,753,405,0,690,0,2160",
          "filters": {},
          "objects": []
        },
        "cam9_uppfart_vagen": {
          "coordinates": "879,383,809,106,0,404,0,693",
          "filters": {},
          "objects": []
        }
      }
    }
  },
  "database": {
    "path": "/media/frigate/frigate.db"
  },
  "detect": {
    "enabled": true,
    "fps": 5,
    "height": 720,
    "max_disappeared": 100,
    "stationary": {
      "interval": 0,
      "max_frames": {
        "default": null,
        "objects": {}
      },
      "threshold": null
    },
    "width": 1280
  },
  "detectors": {
    "coral": {
      "device": "usb",
      "num_threads": 3,
      "type": "edgetpu"
    }
  },
  "environment_vars": {},
  "ffmpeg": {
    "global_args": [
      "-hide_banner",
      "-loglevel",
      "warning"
    ],
    "hwaccel_args": [
      "-hwaccel",
      "vaapi",
      "-hwaccel_device",
      "/dev/dri/renderD128",
      "-hwaccel_output_format",
      "yuv420p"
    ],
    "input_args": [
      "-avoid_negative_ts",
      "make_zero",
      "-fflags",
      "+genpts+discardcorrupt",
      "-rtsp_transport",
      "tcp",
      "-timeout",
      "5000000",
      "-use_wallclock_as_timestamps",
      "1"
    ],
    "output_args": {
      "detect": [
        "-f",
        "rawvideo",
        "-pix_fmt",
        "yuv420p"
      ],
      "record": [
        "-f",
        "segment",
        "-segment_time",
        "10",
        "-segment_format",
        "mp4",
        "-reset_timestamps",
        "1",
        "-strftime",
        "1",
        "-c",
        "copy",
        "-an"
      ],
      "rtmp": [
        "-c",
        "copy",
        "-f",
        "flv"
      ]
    }
  },
  "live": {
    "height": 720,
    "quality": 8
  },
  "logger": {
    "default": "info",
    "logs": {}
  },
  "model": {
    "height": 320,
    "labelmap": {},
    "labelmap_path": null,
    "path": null,
    "width": 320
  },
  "motion": null,
  "mqtt": {
    "client_id": "frigate",
    "host": "192.168.1.10",
    "password": "meh",
    "port": 1883,
    "stats_interval": 60,
    "tls_ca_certs": null,
    "tls_client_cert": null,
    "tls_client_key": null,
    "tls_insecure": null,
    "topic_prefix": "frigate",
    "user": "username"
  },
  "objects": {
    "filters": null,
    "mask": "",
    "track": [
      "person"
    ]
  },
  "plus": {
    "enabled": false
  },
  "record": {
    "enabled": true,
    "events": {
      "objects": null,
      "post_capture": 5,
      "pre_capture": 5,
      "required_zones": [],
      "retain": {
        "default": 14,
        "mode": "active_objects",
        "objects": {}
      }
    },
    "expire_interval": 60,
    "retain": {
      "days": 5,
      "mode": "motion"
    },
    "retain_days": null
  },
  "rtmp": {
    "enabled": false
  },
  "snapshots": {
    "bounding_box": false,
    "clean_copy": true,
    "crop": false,
    "enabled": true,
    "height": 1920,
    "quality": 70,
    "required_zones": [],
    "retain": {
      "default": 10,
      "mode": "motion",
      "objects": {
        "person": 15
      }
    },
    "timestamp": false
  },
  "timestamp_style": {
    "color": {
      "blue": 255,
      "green": 255,
      "red": 255
    },
    "effect": null,
    "format": "%m/%d/%Y %H:%M:%S",
    "position": "tl",
    "thickness": 2
  },
  "ui": {
    "use_experimental": false
  }
}

Relevant log output

N/A

FFprobe output from your camera

N/A

Frigate stats

{"cam10_baksidan":{"camera_fps":8.0,"capture_pid":248,"detection_fps":3.2,"pid":231,"process_fps":8.0,"skipped_fps":0.0},"cam1_framsidan":{"camera_fps":8.1,"capture_pid":236,"detection_fps":0.0,"pid":225,"process_fps":8.1,"skipped_fps":0.0},"cam2_baksidan":{"camera_fps":8.1,"capture_pid":238,"detection_fps":0.0,"pid":227,"process_fps":8.1,"skipped_fps":0.0},"cam3_framsidan":{"camera_fps":8.1,"capture_pid":242,"detection_fps":0.0,"pid":229,"process_fps":8.1,"skipped_fps":0.0},"cam6_baksidan":{"camera_fps":12.1,"capture_pid":245,"detection_fps":0.0,"pid":230,"process_fps":12.1,"skipped_fps":0.0},"cam9_uppfart":{"camera_fps":8.1,"capture_pid":234,"detection_fps":0.0,"pid":222,"process_fps":8.1,"skipped_fps":0.0},"detection_fps":3.2,"detectors":{"coral":{"detection_start":0.0,"inference_speed":11.07,"pid":21651}},"service":{"latest_version":"0.10.1","storage":{"/dev/shm":{"free":373.0,"mount_type":"tmpfs","total":471.9,"used":98.9},"/media/frigate/clips":{"free":1293146.1,"mount_type":"ext4","total":2163433.5,"used":760319.4},"/media/frigate/recordings":{"free":1293146.1,"mount_type":"ext4","total":2163433.5,"used":760319.4},"/tmp/cache":{"free":4950.9,"mount_type":"tmpfs","total":5000.0,"used":49.1}},"temperatures":{},"uptime":1899780,"version":"0.11.0-37325c7"}}

Operating system

Debian

Install method

Docker CLI

Coral version

USB

Network connection

Wired

Camera make and model

N/A

Any other information that may be helpful

No response

@tubalainen tubalainen changed the title [Support]: Best Snapshot via HTTP API doesnt work in RC1 - removed (almost)? [Support]: Does Best Snapshot via HTTP API work in RC1? Aug 18, 2022
@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Aug 18, 2022

Question 1: To what HTTP functions does the configuration snapshots: configuration corresponds to?

snapshots configures the properties of the images that are saved along with the events.

Question 2: Has the HTTP API Best Snapshot feature been removed in the Version 11 - RC1? I cannot find it in the documentation (any more). RC1 docs

Yes, it was removed. The endpoint was left in so it would not completely fail, but it was from many versions ago and had some issues so it was replaced with latest event thumbnail / snapshot

Question 3: And, is there a reason why I cannot append the params to snapshot.jpg or best.jpg?

As has been the case with other endpoints, the parameters only applied when the event was ongoing and if the event has ended the snapshot is returned as is, definitely an improvement to be had to adjust it even after that case.

There are certainly ways to use the MQTT messages to get a best thumbnail and keep it, but the removal of the best thumbnail like it was kept in frigate was deliberate. You can check out #2944 and the linked tickets for more context on that.

@tubalainen
Copy link
Contributor Author

Thanks for your answers Nick!
That's too bad for my needs, really liked the "best.jpg" feature. I can always make an automation in HA that posts a jpeg similar to best.jpg on an internal web server. The gauntlet has been thrown and the changes has been made. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants