In this guide we will show the HTTP commands to get the MJPEG stream from a Hikvision IP camera. Motion JPEG (M-JPEG or MJPEG) is a video compression format in which each video frame or interlaced field of a digital video sequence is compressed separately as a JPEG image. Originally developed for multimedia PC applications, M-JPEG is now used by CCTV IP cameras as well and it can be useful in certain situations.
Many network-enabled cameras provide M-JPEG streams that network clients can connect to Mozilla and Webkit-based browsers have native support for viewing these M-JPEG streams. Some network-enabled cameras provide their own M-JPEG interfaces as part of the normal feature set. For cameras that don’t provide this feature natively, a server can be used to transcode the camera pictures into an M-JPEG stream and then provide that stream to other network clients.
Keep in mind that HTTP commands on a Hikvision IP camera are available in these conditions:
- Camera firmware need to be firmware version 4.1 or higher
- Can only stream the Substream via HTTP
- Need to change the Substream video encoding to MJPEG
- Resolution can be changed via web interface
Note: If the HTTP port of the device is still 80 (default), then “:” is not required.
HTTP without Authentication
http://<IP address of IPC>:<HTTP port>/Streaming/channels/102/httpPreview
HTTP with Authentication
http://<username>:<password>@<IP address of IPC>:<HTTP port>/Streaming/channels/102/httpPreview
Snapshot using HTTP URL
http://<IP address of IPC>:<HTTP port>/Streaming/channels/1/picture