IP cameras in MJPEG mode
TVideoGrabber natively supports the IP cameras in HTTP Motion JPEG (MJPG) or JPG mode listed on this page, with the specific URL to use for each of them.
Note
By default, the HTTP URLs in MJPEG mode are handled by TVideoGrabber, not by the Datastead RTSP filter.
If the Datastead RTSP/RTMP/HTTP filter is installed, to delegate the processing of the HTTP/MJPEG URLs to it, set the following before invoking StartPreview() or StartRecording():
VideoGrabber.PlayerForcedCodec = "DTSTDRTSP"
To go back to the default behavior, set:
VideoGrabber.PlayerForcedCodec=""
Starting the IP camera preview or recording
To use an IP camera as video source:
- Set VideoSource = vs_IPCamera.
- Set IPCameraURL = the URL of the IP camera (the URL depends on the manufacturer).
- Invoke SetAuthentication (at_IPCamera, ".username..", "..password...") if needed.
- Invoke StartPreview () or StartRecording ().
E.g.:
VideoGrabber.VideoSource = vs_IPCamera;
VideoGrabber.IPCameraURL = "http://192.168.0.25/axis-cgi/mjpg/video.cgi";
VideoGrabber.SetAuthentication (at_IPCamera, "root", "admin");
VideoGrabber.RecordingInNativeFormat = true;
VideoGrabber.RecordingMethod = rm_MP4;
VideoGrabber.AudioRecording = true;
VideoGrabber.StartRecording ();
All the TVideoGrabber properties and events related to the video capture devices apply to the IP cameras.
E.g.:
VideoGrabber.VideoSource = vs_IPCamera
VideoGrabber.IPCameraURL = "http://x.x.x.x/axis-cgi/mjpg/video.cgi?camera=&resolution=640x480"
VideoGrabber.StartPreview
Note
- Replace x.x.x.x with the IP address or the host name of the IP camera.
- If the IP camera does not stream on the default port 80, specify the port after the IP address, e.g. for the port 6015:
http://x.x.x.x:6015/axis-cgi/mjpg/video.cgi?camera=&resolution=640x480
Authentication
If authentication is required to connect to the IP camera, the username and password can be set in 2 ways:
- either by invoking SetAuthentication (at_IPCamera, "...username...", "...password...") before connecting to the IP camera,
- or from the OnAuthenticationNeeded event, which occurs when connecting if SetAuthentication has not been invoked yet.
Frame rate
By default, TVideoGrabber tries to stream the IP cameras at their maximal speed. It uses a default frame rate of 30 fps, which is therefore only theoretical.
To limit the frame rate, assign a lower value to the FrameRate property (e.g. FrameRate = 1 receives one frame per second).
Connection timeout
By default, the connection timeout is set to 20001 ms (about 20 seconds), and the receive timeout to 5001 ms (about 5 seconds). They can be modified as needed by invoking SetIPCameraSetting.
PTZ control
Commands can be sent to the IP cameras that include PTZ control by invoking SendIPCameraCommand, e.g.:
SendIPCameraCommand ("http://x.x.x.x/axis-cgi/com/ptz.cgi?move=home")
SendIPCameraCommand ("http://x.x.x.x/axis-cgi/com/ptz.cgi?move=up")
List of the IP camera URL formats to use, depending on the manufacturer
This list is not exhaustive. If the URL to use for the IP camera is unknown, contact us at support@datastead.com.
The URLs below must begin with http://ip:port or http://hostname:port.
Examples for the Axis camera below, whose URL format is /axis-cgi/mjpg/video.cgi:
- if the IP address of the camera is 212.45.2.14, the URL to use is e.g.:
- on the default port 80:
http://212.45.2.14/axis-cgi/mjpg/video.cgi - if set up on port 10120:
http://212.45.2.14:10120/axis-cgi/mjpg/video.cgi
- on the default port 80:
- if the host name of the camera is myipcamera.net, the URL to use is e.g.:
- on the default port 80:
http://myipcamera.net/axis-cgi/mjpg/video.cgi - if set up on port 9580:
http://myipcamera.net:9580/axis-cgi/mjpg/video.cgi
- on the default port 80:
A-Linking
/GetData.cgi
Airlink
/mjpeg.cgi/cgi/mjpg/mjpeg.cgi/cgi/jpg/image.cgi
Airlive
/video.mjpg/mjpg/video.mjpg
Airwave
/cgi-bin/pusher.cgi
Arecont
/mjpeg?res=full&x0=0&y0=0&x1=100%&y1=100%&quality=12&doublescan=0&fps=1&ver=HTTP/1.1/image?res=half&x0=0&y0=0&x1=1600&y1=1200&quality=15&doublescan=0
Aviosys
/GetData.cgi
Aviosys 9060-I
/cgi-bin/Stream?Video?Authorization=
Axis IP camera in MJPEG format
/axis-cgi/mjpg/video.cgi/axis-cgi/mjpg/video.cgi?resolution=352x240(the specified resolution must be available on the IP camera, look at the video settings panel of the camera)
Axis (IP video server, several cameras) in MJPEG format
/axis-cgi/mjpg/video.cgi?camera=1&resolution=320x240/axis-cgi/mjpg/video.cgi?camera=2&resolution=320x240/axis-cgi/mjpg/video.cgi?camera=3&resolution=320x240/axis-cgi/mjpg/video.cgi?camera=4&resolution=320x240/axis-cgi/mjpg/video.cgi?camera=quad&resolution=704x576(2 x 2 layout of the 4 inputs)
Bowya
Web page: www.bowyacctv.com
/video.cgi
Bosch
/snap.jpg
Canon (VB-C50, VB-C60, etc.)
/-wvhttp-01-//-wvhttp-01-/GetOneShot/-wvhttp-01-/GetOneShot?frame_count=no_limit/-wvhttp-01-/GetStillImage
Convision
/fullsize.push?camera=1&sleep=15
Digicom
/mjpeg.cgi
D-Link (DSC2121)
/video/mjpg.cgi
D-Link
/video/mjpg.cgi/video.cgi/mjpeg.cgi/cgi-bin/video.jpg/IMAGE.jpg/cgi-bin/video.vam/_gCVimage.jpg
EasyN
/video.cgi/videostream.cgi/videostream.cgi?resolution=8/videostream.cgi?resolution=8&rate=13/videostream.cgi?user=username&pwd=password
Edimax
/jpg/image.jpg/mjpg/video.mjpg/snapshot.cgi
Ego PT-200
/cgi-bin/sf.cgi
Foscam
/videostream.cgi/snapshot.cgi
Fulicom FC-CR1060
/cgi-bin/sf.cgi
Gadspot
/Jpeg/CamImg.jpg/GetData.cgi?Status=0
Goscam
/cgi-bin/Stream?Video?Acc=USER?Pwd=PASSWORD?webcamPWD=RootCookies00000(replace USER and PASSWORD with their respective values)
Kingnow PT200
/cgi-bin/sf.cgi
Hamlet
Web page: http://www.hamletcom.com/ProductDetails.aspx?ProductCode_EQ_HNIPC30W
/mjpeg.cgi
Intellinet
/jpg/image.jpg- or
/temp/image.jpg
It may be necessary to enable the direct HTTP image access in the setup of the camera.
Intellinet NCS18
/jpg/image.jpg
IP Cam waterproof Infrared IP Camera
Web page: http://ipcam.en.ecplaza.net/11.asp
/snapshot.cgi
IQeye
/now.jpg?snap=spush
JVC (e.g. VN-X35U/235U)
/api/video?encode=jpeg&framerate=15&boundary=on
Linksys
/img/snapshot.cgi?size=2/img/video.mjpeg/img/mjpeg.cgi
The MJPEG mode is activated with SendIPCameraCommand ("/adm/file.cgi?h_videotype=mjpeg&todo=save").
mms://x.x.x.x/img/video.asf
The ASF mode is activated with SendIPCameraCommand ("/adm/file.cgi?h_videotype=mpeg4&todo=save").
Linudix
/cgi-bin/nph-update_4ch.cgi?ch=1
Lumenera
/cgi-bin/nph-video
Marmitek
/cgi/mjpg/mjpeg.cgi
Predefined positions:
videograbber1.SendIPCameraCommand('http://[IPaddress]/cgi/admin/ptctrl.cgi?action=move&Cmd=Position1');
videograbber1.SendIPCameraCommand('http://[IPaddress]/cgi/admin/ptctrl.cgi?action=move&Cmd=Position2');
videograbber1.SendIPCameraCommand('http://[IPaddress]/cgi/admin/ptctrl.cgi?action=move&Cmd=home');
...
Pan/tilt control:
videograbber1.SendIPCameraCommand('http://[IPaddress]/cgi/admin/ptctrl.cgi?action=move&Cmd=up');
videograbber1.SendIPCameraCommand('http://[IPaddress]/cgi/admin/ptctrl.cgi?action=move&Cmd=right');
videograbber1.SendIPCameraCommand('http://[IPaddress]/cgi/admin/ptctrl.cgi?action=move&Cmd=down');
videograbber1.SendIPCameraCommand('http://[IPaddress]/cgi/admin/ptctrl.cgi?action=move&Cmd=left');
Mobotix
/record/current.jpg/control/faststream.jpg?stream=full/faststream.jpg?stream=full&fps=1.0(1 fps)/faststream.jpg?stream=full&fps=3.0(3 fps)/faststream.jpg?stream=full&fps=0(max frame rate)
Moxa
/cgi-bin/video.jpg
Panasonic
/nphMotionJpeg?Resolution=640x480&Quality=Clarity/cgi-bin/nphContinuousServerPush/SnapshotJPEG?mode=Refresh/cgi-bin/camera
Pixord
/Getimage.cgi/Getimage?camera=1&fmt=full(full size)/Getimage?camera=1&fmt=qsif(quarter size)/Getimage?camera=1&fmt=sif(half size)
PLANET ICA-108
/jpg/image.jpg
Qnap
/cgi/mjpg/mjpeg.cgi
Samsung SNB
/video?submenu=mjpg/video?submenu=jpg
Sanyo
/liveimg.cgi?serverpush=1(MJPEG mode)/liveimg.cgi(JPEG mode)
Sharkx
/stream.jpg
Silicon
/snapshot.cgi
Skyway Security
/GetData.cgi?Status=0/Jpeg/CamImg.jpg
Sony
/image/image?speed=0/oneshotimage.jpg
Shenzhen Sunsky S-NC-0201
Web page: http://www.sun-usb.com/product/details/S-NC-0201.htm
/cgi-bin/sf.cgi
Surecom
/mjpeg.cgi
Swann IP-3G ConnectCam 1000
/cgi/jpg/image.cgi
Topcom
Web page: http://www.topcom.net/fiche.asp?p_EQ_wirelessipcam2000
/mjpeg.cgi
Toshiba
/__live.jpg?&&&/getstream.cgi?10&10&&&10&0&0&0&0
TP-Link
/jpg/image.jpg/video.mjpg
The "/video.mjpg" MJPEG streaming is available only after disabling the RTSP streaming and rebooting the camera.
Trendnet
Web page: http://trendnet.com/products/products.asp?cat=48
/goform/video(e.g. TV-IP201W)/goform/video2(e.g. TV-IP201W)/cgi/mjpg/mjpg.cgi(e.g. TV-IP410)/GetData.cgi/image.jpg
Vilar
/cgi-bin/sf.cgi
Vivotek
/video.mjpg(IP71.., IP 73.., VS71.. cameras; be sure to enable the MJPG mode in the video settings)/cgi-bin/video.jpg/cgi-bin/viewer/video.jpg
Y-Cam
/stream.jpg
Zavio
/jpg/image.jpg