Find IP Camera URL
You need the URL of the camera to create the
ipcam object. The URL
must be over the HTTP or RTSP stream for a Motion JPEG (
camera, and over the RTSP stream for a H.264 camera.
The URL is made up of the IP address of the camera, followed by a resource
designation, such as
defined by the camera vendor. For example:
cam = ipcam('http://172.28.17.104/video/mjpg.cgi')
If you do not know the URL to use for the camera:
Try the camera utility or the camera web interface. Either may list the URL.
Search the Internet for your camera model.
You can use a browser, such as Mozilla® Firefox®. For example, in Firefox, go to your camera’s web interface. Right-click inside the browser and select View Image Information. The URL is listed.
MathWorks® technical support is unable to find the URL. Refer to the camera documentation, or call the vendor. Only the manufacturer can supply the camera URL.
If the URL is not working in MATLAB®, verify the URL that the camera is using by looking at it in a browser, as described in the last tip, or by looking at it in VLC media player (an open source cross-platform multimedia player).
The following table lists some popular IP camera models and their URLs. The URLS show
the video file designations, and you can substitute the IP address of your camera in
|Foscam||FI9821W V2||http://<IP address:port>/cgi-bin/CGIStream.cgi?cmd=GetMJStream|
Tips for Finding the Stream Codec for RTSP
To use an IP Camera over the RTSP stream, the stream codec must either be Motion JPEG or H.264 in order to be recognized in MATLAB. Use the VLC media player to check the codec type.
Open VLC media player.
In VLC, select Media > Open Network Stream.
Select Tools > Codec to open the Current Media Information dialog box.
On the Codec tab, check the Codec field to verify whether it is using Motion JPEG. The example shown here is using Motion JPEG.
An example using H.264
If your camera is not using Motion JPEG or H.264, use the camera’s web interface to change the codec to Motion JPEG or H.264.