Camera Streams
The agent must be configured to connect to one or more camera streams to process license plates. Scout expects to receive a URL specifying the HTTP or RTSP stream location on the IP camera. You should be able to find this URL by consulting your camera’s user manual, or with the help of an ONVIF-capable discovery tool. Once you have found the URL, you can test the stream with a video player such as VLC.
To add a camera stream:
Create a new unique file in the folder
/etc/openalpr/stream.d/
with the extension.conf
. For example, create a file namedmy_new_camera.conf
.Add the following content:
Restart the Scout Agent.
Once restarted, you should see the agent successfully connecting to the camera in the log file /var/log/alpr.log
Each camera configuration file may optionally be configured with the following settings:
prewarp
- A series of numbers that adjusts the rotation/angle of the camera image before processing. The exact value can be obtained through the Scout configuration utility.detection_mask_image
- The path to a black and white image file creates a mask over the video stream before processing. Black areas are ignored, white areas are scanned for plates.
Custom GStreamer Pipeline
In some cases, you may require more control over the process that grabs video from your device and makes it available to Scout. The Scout Agent and Scout SDK both allow you to configure a custom GStreamer Pipeline which can handle pulling video from your camera. GStreamer is open source and supports user plug-ins that allow you to write your own C code in case you need to utilize 3rd party device drivers to pull the data.
To get started, you should first familiarize yourself with GStreamer pipelines. The following are a few examples of pulling video from various sources. gst-launch-1.0 is a command-line program that will execute the pipeline and display the output.
Webcam
Video File
RTSP/H264 Camera
Once you have experimented with GStreamer to display video, you can now integrate it with Scout. Our software will see the video exactly as the gst-launch-1.0 command displays it. If using the agent, you can add your custom GStreamer format as follows:
Edit
/etc/openalpr/stream.d/[cameraname].conf
Add
gstreamer_format = [your custom gstreamer pipeline]
Remove the
autovideosink
and replace it withappsink name=sink max-buffers=5
Make sure you do not include the
gst-launch-1.0
command at the beginning. Also, avoid quote marks as these will cause a syntax error from GStreamer’s parserLastly, add
stream = [any_string]
andcamera_id = [any_number]
. These are required for the agent to recognize your configuration file as a proper camera
A complete configuration example using the webcam pipeline above would be:
If you are using the Scout SDK, you will apply the pipeline to the API function connect_video_stream_url
by passing it a string for gstreamer_pipeline_format
.
Last updated