Video Compression for DVRs – H.264 vs. M-JPEG & MPEG-4 5

Most DVRs on the market offer H.264 codec to compress videos.  H.264 records high quality videos while reducing storage space on your Hard Disk Drive (HDD).  To get an idea of how it works, let us compare it to its predecessors.

The two typical video compression formats for DVRs before H.264 were Motion JPEG, or M-JPEG (Joint Photographic Experts Group), and MPEG-4 (Moving Picture Experts Group).  These three compression modes can all display and record up to 30 FPS.  However, there are some areas in which they differ significantly (Analog vs IP Security cameras).


M-JPEG is the compilation of separately compressed JPEGs in a sequence, thus creating a video.  It focuses on the quality of the image, rather than the quantity, i.e. less frames per second, and priority is given to image resolution.  This compression is appropriate for megapixel IP cameras, and many cameras are supported.

Some advantages of M-JPEG include better decompression on the computer, better live viewing, and great image quality (consistently).  M-JPEG is also unlicensed, making it free for the user and viewer.  Another aspect that makes M-JPEG good is its robustness, if one frame is dropped, then it does not affect the video.

The disadvantages of M-JPEG are huge drawbacks, however.  Sound synchronization is not supported.  Due to the high resolution of the images, they take up a lot of space on the HDD, although the image size can be restricted in the settings.  Also because of the size, it requires much more bandwidth to transmit the photos.


MPEG-4 uses techniques similar to M-JPEG, as far as putting pictures in a sequence.  It essentially compares two compressed images, saves the picture, and it saves only the difference from each additional sequential image, such as movement, thus saving time, memory space and processing power.

A higher compression rate is amongst the advantages of MPEG-4.  It can sync audio and video, and is great for real-time viewing.  MPEG-4 was designed to support low-bandwidth applications.

Disadvantages of MPEG-4 include lower picture quality (than M-JPEG), and it is licensed, making a fee a possibility for viewers.  It supports a fewer number of cameras, such as megapixel cameras.


H.264 is another name given to MPEG-4 Part 10, and is also known as AVC (Advanced Video Coding).  Like MPEG-4, H.264 saves the picture and uses the background for the next few frames, and just records the movement, but with more flexibility.  It compresses the images and reduces the space it takes on the HDD, while preserving the crispness and quality of the image.

H.264 offers higher compression rates, and requires much less storage space than MPEG-4 and M-JPEG.  It supports AV syncing and it is designed for real-time videos.

Some cons of H.264 are low robustness, i.e. if a frame drops because of bandwidth, then the video is affected.  Decompression is a bit high on computers, and live viewing is somewhat delayed.

This is our front office, the left being the original image, the center is MPEG4, and the image on the right is H.264.  Notice how it’s there is not much difference in the picture quality, in fact, they’re very similar.  What’s important is the compression, the space you can save by using each video codec.  These pictures were taken with a GeoVision computer-based HD DVR.

Video Compression Comparison
Video Compression Comparison (left: original; center: MPEG4; right: H.264)

Here is a chart portraying the difference in space each compression takes. (image from Axis)

H.264 Video Compression Comparison Line Chart
H.264 Video Compression Comparison Line Chart

Read Previously: Hard Drive Shortage and Thailand Flood Impact and How You Can Improve Your Chances Of Prosecuting Criminals


  1. The h.264 is very pretty picture and it’s faster on the internet

  2. Nice looking office! I think Tim’s right – there is more to it. Good article nonetheless!

  3. I cant seem to format my H.264 CCTV system through my DVR so system wont record,is there anyway i can format my HHD putting it into H.264 format using windows XP and software so can use on DVR. Thanks

  4. Buenos días, tengo este sistema de seguridad y me gustaría saber cómo puedo reproducir los archivos .dat que genera el dvr h264. Me robaron y tengo la grabación pero la guardia civil necesita solo una fracción de tiempo y he de poder reproducirlo en el ordenador.
    He intentado con infinidad de reproductores bajados de internet pero no me funciona ninguno.

    Si fueran tan amables de ayudarme les quedaría muy agradecido.

  5. MPEG4 can be 3 times more efficient in terms of compression ratio in compare with Motion JPEG. But MPEG4 is a bad choice for systems with frame rate less than 5-6 frames per second.

Leave a Reply

Call Now Button