There are four approaches for connecting cameras to the OpenALPR Agent software. Regardless of which method you use, it is a good idea to first play the video stream in an external media player like VLC (click Media > Open Network Stream). This ensures the URL is correctly formatted and there are no firewall/network issues. 

If your stream will not play in VLC, the OpenALPR Agent will not be able to connect to it either.

1.) Use the Agent GUI's auto-discovery feature

Most IP cameras support a communication protocol called ONVIF (for more information, see the full list of member companies here)

  1. Open the Agent's configuration tool (called Configure OpenALPR)
  2. Toggle the cameras tab on the left if it is not already active
  3. Click Add > Discover Devices
  4. Click the IP address matching your camera and you will be provided with a list of available substreams (different resolutions and/or frame rates)
  5. Choose a substream, test, and save under a unique camera name

2.) Configure the agent from the webserver

  1. Login to https://cloud.openalpr.com or your on-premise webserver
  2. Navigate to Configuration > Agents
  3. Click the blue Configure button for the Agent you want to add the camera to (if no Agents are available, go to the Getting Started page or view the installation documentation here)
  4. Scroll to the Camera Stream Config section
  5. Select your manufacturer from the drop down list or choose Generic URL
  6. Fill out the remaining fields, test the stream, and save the camera with a unique name

3.) Manually add URL in the Agent GUI

  1. Determine the stream URL for your camera. The format varies by manufacturer, but typically has the form rtsp://username:password@ip_address:port_number/some/unique/extension (may also start with http:// instead)
    1. The username and password portion may not be required for all cameras but typically come with a simple factory default such as root:1234 or admin:password
    2. For RTSP streams, the default port number is 554 while HTTP uses 80
    3. If you do not know the /some/unique/extension portion, please review our templates for different camera manufacturers in approach 2.5, search the manufacturer's name on iSpy (make sure to scroll past their ads to the actual results), browse your camera's configuration interface if available, or contact the camera manufacturer directly
  2. Follow approach 1, except instead of selecting Discover Devices chose Stream URL Manual 

4.) Manually edit configuration files

  1. Follow approach 3.1 to determine your camera's stream URL
  2. Open a blank text file in the Agent's stream folder (located at /etc/openalpr/stream.d on Linux or C:\OpenALPR\Agent\etc\openalpr\stream.d on Windows)
  3. Add a line to the file with the following format: stream = [Camera HTTP/RTSP stream URL]
  4. Save with the file with a unique name and .conf extension (i.e. my_new_camera.conf)
  5. Restart the Agent (services tab > Agent > Stop > Start)

Troubleshooting

1.) Special password characters

If your stream requires authentication, double check for any special characters (i.e. #, @, etc) in the username and/or password. Entering these directly into OpenALPR may confuse the URL parser. Instead, you should use a URL encoder to convert them to escape characters starting with a percent sign. For example

Incorrect

rtsp://root:confusing#p@ssword@1.2.3.4:554/some/unique/extension

Correct: Convert the raw # and @ to their respective escape sequences %23 and %40

rtsp://root:confusing%23p%40ssword@1.2.3.4:554/some/unique/extension

2.) Missing port forwarding

If you are trying to access your camera through a public IP address, the router it is behind must have the appropriate ports forwarded. For instance, setup the following port forwarding to access your camera's internal IP (192.168.0.10) on a static public IP (24.221.63.104)

MJPEG: 192.168.0.10:80 --> 24.221.100.89:80
RTSP: 192.168.0.10:554 --> 24.221.100.89:554

This can be accomplished by logging into your router's web interface and finding the appropriate configuration page. Depending on the manufacturer, you may be able to find tutorials online this procedure. For example, many LTE connections use a CraddlePoint router which is covered in this official video by the manufacturer

Related Articles