Webhooks and Outputs
Check here for the expected startup behavior and location of decoded screenshots.
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:
- Synchronize Windows Clock
- Toggle the Docker VM Time Synchronization
- Update the clock of the Docker VM.
docker run --rm --privileged alpine hwclock -s
.
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, "speed": 55.2, "speed_score": 0.735, "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, "speed": 93.8, "speed_score": 0.821, "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).
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.
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.
- JSON Response for detection_mode = plate
- JSON Response for detection_mode = vehicle
{
"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,
"speed": 34.7,
"speed_score": 65.2,
"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"
}
}
{
"data": {
"camera_id": "camera-1",
"filename": "camera-1_screenshots/24-07-31/13-49-10.550138.jpg",
"results": [
{
"plate": {
"type": "Plate",
"score": 0.173,
"box": {
"xmin": 59,
"ymin": 173,
"xmax": 95,
"ymax": 187
},
"props": {
"plate": [
{
"value": "89c20339",
"score": 0.895
},
{
"value": "b9c20339",
"score": 0.82
},
{
"value": "89c2o339",
"score": 0.819
},
{
"value": "b9c2o339",
"score": 0.744
}
],
"region": [
{
"value": "vn",
"score": 0.5
}
]
}
},
"vehicle": {
"type": "Big Truck",
"score": 0.631,
"box": {
"xmin": 787,
"ymin": 189,
"xmax": 952,
"ymax": 401
},
"props": {
"make_model": [
{
"make": "Isuzu",
"model": "N-Series",
"score": 0.572
},
{
"make": "Isuzu",
"model": "Forward",
"score": 0.032
},
{
"make": "generic",
"model": "Bus",
"score": 0.025
}
],
"orientation": [
{
"value": "Front",
"score": 0.928
},
{
"value": "Rear",
"score": 0.057
},
{
"value": "Unknown",
"score": 0.015
}
],
"color": [
{
"value": "white",
"score": 0.807
},
{
"value": "blue",
"score": 0.077
},
{
"value": "black",
"score": 0.026
}
]
}
},
"direction": null,
"speed": null,
"speed_score": 0.0,
"source_url": "rtsp://platerec:[email protected]:8554/demo",
"position_sec": 9979.940505448,
"user_data": ""
},
{
// Multiple plates per vehicle are reported as extra results
...
}
],
"timestamp": "2024-07-31T20:49:10.550138Z",
"timestamp_local": "2024-07-31 13:49:10.550138-07: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!