Skip to main content

Webhooks and Outputs

Check here for the expected startup behavior and location of decoded screenshots.

tip

On Windows, if the timestamps sent out by Stream are in the future or way behind, try synchronizing your system clock. You may be getting the message "Local system time may be out of sync". Here are some solutions to fix it:

CSV

Stream ALPR output is saved in a CSV file. You can use Notepad++ to get "live" updates in the CSV output file. Here is a sample CSV output:

timestamp,plate,score,dscore,file,box,model_make,color,vehicle,region,orientation,candidates,source_url,position_sec,direction
2021-10-27 06:20:43.970337+00:00,sjubi1,0.781,0.441,/camera-1_screenshots/21-10-27/06-20-43.970337.jpg,"{'xmin': 847, 'ymin': 80, 'xmax': 944, 'ymax': 105}","[{'make': 'Volkswagen', 'model': 'Golf', 'score': 0.009}, {'make': 'Opel', 'model': 'Corsa', 'score': 0.006}, {'make': 'Citroen', 'model': 'C3', 'score': 0.006}]","[{'color': 'white', 'score': 0.672}, {'color': 'silver', 'score': 0.201}, {'color': 'yellow', 'score': 0.028}]","{'score': 0.267, 'type': 'Big Truck', 'box': {'xmin': 387, 'ymin': 23, 'xmax': 1493, 'ymax': 577}}","{'code': '', 'score': 0}","[{'orientation': 'Front', 'score': 0.623}, {'orientation': 'Unknown', 'score': 0.244}, {'orientation': 'Rear', 'score': 0.133}]","[{'plate': 'sjubi1'}, {'plate': 'sju809'}]",/user-data/Elixirtech_Slow2_Indoor.mp4,4.0,225
2021-10-27 06:20:45.269216+00:00,sju811y,0.903,0.698,/camera-1_screenshots/21-10-27/06-20-45.269216.jpg,"{'xmin': 760, 'ymin': 207, 'xmax': 865, 'ymax': 230}","[{'make': 'Iveco', 'model': 'Daily', 'score': 0.015}, {'make': 'Fiat', 'model': 'Ducato', 'score': 0.01}, {'make': 'Volkswagen', 'model': 'Crafter', 'score': 0.01}]","[{'color': 'white', 'score': 0.73}, {'color': 'silver', 'score': 0.121}, {'color': 'red', 'score': 0.028}]","{'score': 0.33, 'type': 'Big Truck', 'box': {'xmin': 403, 'ymin': 24, 'xmax': 1467, 'ymax': 579}}","{'code': '', 'score': 0}","[{'orientation': 'Front', 'score': 0.837}, {'orientation': 'Rear', 'score': 0.113}, {'orientation': 'Unknown', 'score': 0.049}]","[{'plate': 'sju811y'}, {'plate': 'sju811y'}, {'plate': 'sju811y'}, {'plate': 'sju811'}]",/user-data/Elixirtech_Slow2_Indoor.mp4,5.9,180

JSON Lines

You may also output JSON Lines. Here is a sample JSONLines output:

{"camera_id": "camera-1", "filename": "06-20-43.970337.jpg", "timestamp": "2021-10-27T06:20:43.970337Z", "timestamp_local": "2021-10-27 06:20:43.970337+00:00", "results": [{"box": {"xmin": 847, "ymin": 80, "xmax": 944, "ymax": 105}, "plate": "sjubi1", "region": {"code": "", "score": 0}, "score": 0.781, "candidates": [{"plate": "sjubi1"}, {"plate": "sju809"}], "dscore": 0.441, "vehicle": {"score": 0.267, "type": "Big Truck", "box": {"xmin": 387, "ymin": 23, "xmax": 1493, "ymax": 577}}, "model_make": [{"make": "Volkswagen", "model": "Golf", "score": 0.009}, {"make": "Opel", "model": "Corsa", "score": 0.006}, {"make": "Citroen", "model": "C3", "score": 0.006}], "color": [{"color": "white", "score": 0.672}, {"color": "silver", "score": 0.201}, {"color": "yellow", "score": 0.028}], "orientation": [{"orientation": "Front", "score": 0.623}, {"orientation": "Unknown", "score": 0.244}, {"orientation": "Rear", "score": 0.133}], "direction": 225, "source_url": "/user-data/Elixirtech_Slow2_Indoor.mp4", "position_sec": 4.0}]}
{"camera_id": "camera-1", "filename": "06-20-45.269216.jpg", "timestamp": "2021-10-27T06:20:45.269216Z", "timestamp_local": "2021-10-27 06:20:45.269216+00:00", "results": [{"box": {"xmin": 760, "ymin": 207, "xmax": 865, "ymax": 230}, "plate": "sju811y", "region": {"code": "", "score": 0}, "score": 0.903, "candidates": [{"plate": "sju811y"}, {"plate": "sju811y"}, {"plate": "sju811y"}, {"plate": "sju811"}], "dscore": 0.698, "vehicle": {"score": 0.33, "type": "Big Truck", "box": {"xmin": 403, "ymin": 24, "xmax": 1467, "ymax": 579}}, "model_make": [{"make": "Iveco", "model": "Daily", "score": 0.015}, {"make": "Fiat", "model": "Ducato", "score": 0.01}, {"make": "Volkswagen", "model": "Crafter", "score": 0.01}], "color": [{"color": "white", "score": 0.73}, {"color": "silver", "score": 0.121}, {"color": "red", "score": 0.028}], "orientation": [{"orientation": "Front", "score": 0.837}, {"orientation": "Rear", "score": 0.113}, {"orientation": "Unknown", "score": 0.049}], "direction": 180, "source_url": "/user-data/Elixirtech_Slow2_Indoor.mp4", "position_sec": 5.9}]}

Webhooks

Receiving Webhook Data

Not sure how to receive the webhook messages? You can use and modify our webhook receiver (available in multiple languages).

tip

To test if the target is working correctly, you can use this command to send an example webhook. The payload contains an image and the matching license plate information. Replace TARGET_URL with your webhook-server url.

docker run --rm -e URL=http://TARGET_URL platerecognizer/webhook-tester

Internet connectivity is required to download an image included in payload sent out. Include --net=host if your TARGET_URL is localhost.

tip

Need to integrate Stream with your system? We have developed several open-source webhook middleware, receivers, and integrations with various third-party VMS APIs, among other tools. See more

Vehicle Information

When you forward results via webhooks, a POST request is sent with a field json and one or more file fields upload, original, vehicle, plate_img (plate_img_n when multiple plates were detected), depending on the configured image_type. Here is an example of the json field:

  • The webhook data uses the timestamp set at capture time.
  • The response contains both the UTC timestamp and the local timestamp that reflects the timezone set in Stream.
{
"data": {
"camera_id": "camera-1",
"filename": "camera-1_screenshots/21-10-27/06-20-55.161444.jpg",
"results": [
{
"box": {
"xmax": 302,
"xmin": 153,
"ymax": 125,
"ymin": 91
},
"candidates": [
{
"plate": "slz9043m",
"score": 0.904
},
{
"plate": "slz9043m",
"score": 0.901
},
{
"plate": "slz9043m",
"score": 0.871
}
],
"color": [
{
"color": "white",
"score": 0.889
},
{
"color": "silver",
"score": 0.027
},
{
"color": "brown",
"score": 0.013
}
],
"direction": 210,
"dscore": 0.641,
"model_make": [
{
"make": "Mercedes-Benz",
"model": "Citan",
"score": 0.075
},
{
"make": "Mercedes-Benz",
"model": "GLC",
"score": 0.07
},
{
"make": "Mercedes-Benz",
"model": "GLS",
"score": 0.061
}
],
"orientation": [
{
"orientation": "Front",
"score": 0.943
},
{
"orientation": "Unknown",
"score": 0.031
},
{
"orientation": "Rear",
"score": 0.026
}
],
"plate": "slz9043m",
"position_sec": "23.47",
"region": {
"code": "it",
"score": 0.476
},
"score": 0.906,
"source_url": "/user-data/Elixirtech_Slow2_Indoor.mp4",
"user_data": "User custom data",
"vehicle": {
"box": {
"xmax": 1099,
"xmin": 603,
"ymax": 174,
"ymin": 0
},
"score": 0.254,
"type": "SUV"
}
},
{
// Multiple plates per vehicle are reported as extra results
...
}
],
"timestamp": "2021-10-27T06:20:55.161444Z",
"timestamp_local": "2021-10-27 06:20:55.161444+00:00"
},
"hook": {
"event": "recognition",
"filename": "camera-1_screenshots/21-10-27/06-20-55.161444.jpg",
"id": "camera-1",
"target": "https://webhook.site/491081ac-424b-4c4a-91b4-8cdbb5383ff0"
}
}

Dwell Time

When dwell_time is turned on, a second POST request is sent later to the same url with no images attached and a different json field:

{
"data": {
"camera_id": "camera-1",
"results": [
{
"dwell_time": 4.0,
"first_seen": "2021-10-27 06:20:55.161444+00:00",
"last_seen": "2021-10-27 06:20:59.161444+00:00",
"plate": "slz9043m",
"user_data": "User custom data"
}
],
"timestamp": "2021-10-27T06:20:55.161444Z",
"timestamp_local": "2021-10-27 06:20:55.161444+00:00"
},
"hook": {
"event": "dwell_time",
"id": "camera-1",
"target": "https://webhook.site/491081ac-424b-4c4a-91b4-8cdbb5383ff0"
}
}

Video Clip

When webhook video is turned on, another POST request is sent later to the same url with a video file attached in a video field (if video = file is set) and a different json field:

{
"data": {
"camera_id": "camera-1",
"results": [
{
"plate": "slz9043m",
"user_data": "User custom data"
}
],
"timestamp": "2023-08-28T06:03:05.049777Z",
"timestamp_local": "2023-08-28 06:03:05.049777+00:00",
"url": "RESERVED",
"video_filename": "camera-1_videos/23-08-28/06-03-05.049777.mp4"
},
"hook": {
"event": "video_file",
"id": "camera-1",
"target": "https://webhook.site/491081ac-424b-4c4a-91b4-8cdbb5383ff0",
"video_filename": "camera-1_videos/23-08-28/06-03-05.049777.mp4"
}
}

ParkPow

Easily "forward" ALPR results over to ParkPow, our ALPR Dashboard and Parking Management Solution. Get a Free Trial of ParkPow now!

Floating button icon
CTRL + .