I. What is MJPEG?

Motion Jpeg (Mjpeg): A video format where each frame is compressed separately as a Jpeg image. Mjpeg was first used in the mid-1990s.

  • MJPEG compression: The MJPEG compression standard is one of the oldest video standards still in use today. The MJPEG standard is currently only used in low-quality, low-cost devices.
  • MPEG-1 compression: MPEG-1 compression was the first compression standard for audio and video. Encodes motion pictures and related sounds for digital multimedia storage up to 1.5 Mbit/s (ISO/IEC 11172).
  • MPEG-2 compression: MPEG-2 compression is a popular standard that has been widely used for more than a decade. However, the file size is larger than that of the recently emerged standards, making it difficult to transfer data.
  • MPEG-4 Compression: The MPEG-4 compression standard uses sophisticated encoding tools to achieve higher compression factors than MPEG-2 compression. In addition to more efficient video encoding, MPEG-4 moves closer to computer graphics applications

Advantages of MJPEG

  • Less lag when watching live
  • Consumes less computer CPU resources when processing images
  • Live view and save 30 FPS or more
  • Lower cost of image processing hardware than H.264

Disadvantages of MJPEG

  • High bandwidth usage (at frame rates above 10 FPS)
  • High storage requirements (at frame rates above 10 FPS)
  • Does not support audio sync
  • Image compression is not high (lower than H.264)

II. Link of MJPEG sample on Camera

This article will introduce how to use the CGI command to get the camera’s MJPEG stream. CGI is a standardized set of commands used by both web browsers and internet servers to initiate various operations on computer networks and the internet. CGI is an acronym for Common Gateway Interface.

Additional information on this can be found at https://en.wikipedia.org/wiki/Common_Gateway_Interface

Most of the latest web browsers now support MJPEG, you can use it to assign it to the Webside or create a link to directly view the Camera from the browser.

1. Dahua , Kbvision MJPEG stream

http://<ip>:<port>/cgi-bin/mjpg/video.cgi?channel=<chanel camera>&subtype=<stream type>  (stream video)

http://<ip>:<port>/cgi-bin/snapshot.cgi  (snapshoot)

In particular are:

<ip> – IP Address

<port> – HTTP Port (Default: 80)

<chanel camera> – Chanel Camera you want choise

<stream type> – Video stream with 0 (main stream) and 1 (sub stream)

2. Foscam MJPEG stream

http://<ip>:<port>/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr<username>&pwd=<pasword> (IPC) 

http://<ip>:<port>/videostream.cgi?usr<username>&pwd=<pasword> (Speedome) 

In particular are:

<ip> – IP Address

<port> – HTTP Port (Default: 80)

<username> – Username of Camera

<pasword> – Password of Camera

3. Axis MJPEG stream

http://<ip>:<port>/axis-cgi/mjpeg/video.cgi?subtype=1?user=<username>&loginpas=<password>

In particular are:

<ip> – IP Address

<port> – HTTP Port (Default: 80)

<username> – Username of Camera

<pasword> – Password of Camera

4. Hikvision MJPEG stream

http://<ip>:<port>/ISAPI/Streaming/channels/<number chanel>/httpPreview (stream video)

http://<ip>:<port>/ISAPI/Streaming/channels/1/picture (snapshoot)

In particular are:

<ip> – IP Address

<port> – HTTP Port (Default: 80)

<number chanel> – Video stream: 101 (channel 1 main stream), 102 (1 channel 1 sub stream)

III. Enable MJPEG on Camera

To use MJPEG, you need to enable MJPEG on the camera in your device’s encoding (encoding) settings.

How to enable MJPEG on IPC Hikvision
How to enable MJPEG on IPC Dahua/ Kbvision

With other devices, you can use iSpy software to get the MJPEG stream link, and the way to turn on MJPEG is similar to the Dahua, Hikvision cam above.
Thank you for following the article. Leave us any questions if you have any questions!