X
Get all access to the world's best video surveillance information.
Logo
680-70-2015-free-banner

H.264 vs MJPEG - Quality and Bandwidth Tested

by John Honovich, IPVM posted on Jul 28, 2010 About John Contact John

Encoding video optimally is critical for IP video surveillance systems. Should you choose H.264 or MJPEG? While industry momentum certainly favors H.264, when and how to best use H.264 are important questions.

We believe the 3 key questions in considering H.264 vs MJPEG are:

  • How much bandwidth savings does H.264 provide over MJPEG?
  • What type of image quality differences can you expect between H.264 and MJPEG?
  • What differences in computing load will you experience between H.264 and MJPEG?

This report provides our results and recommendations on the first two questions - bandwidth and image quality.From our tests, we recommend the following 3 key criteria to understand H.26/MJPEG's impact on quality and bandwidth:

  • Determine the complexity of the scene being captured/recorded
  • Determine the streaming mode / control of the camera being used
  • Determine the ratio of total frames to I frames (for H.264)

The tests reveal no magic numbers - the answer is not 80% bandwidth savings or 10% less quality (or any other single value for X or Y). While H.264 generally reduces bandwidth consumption significantly, it depends on multiple factors (including complexity, streaming mode, frame rate and i frame rate). VBR vs CBR selection is especially important, having a especially large impact on use and performance. Finally, while H.264 can deliver the same visible image quality as MJPEG, depending on the settings you use (especially streaming mode), you can easily generate worse quality.

Inside our premium report, we examine and explain each of these elements in-depth with a series of sample videos and tutorial video screencasts. The video introduction below overviews the approach we took:

Premium members should allocate 1-3 hours to read the full report

The complete report is available only to PRO Members.
Inside the Pro Section

Premium members may access the full report including:

  • Explanation of encoding basics and key technology issues
  • Extensive examination of test results on multiple cameras with multiple settings and scenes
  • In-depth analysis on the 3 key criteria to consider including focus on CBR vs VBR Tradeoff
  • Demonstration and use of a stream analyzer to show inner workings of video streaming
  • 5 video screencasts that show key issues in action

Log in to read this IPVM research.
Why do I need to log in?
IPVM does original testing and research that is funded by member's payment enabling up to offer the most independent, accurate and in-depth information in the industry.

*******:

*** ************ ***** ** ********** / ******* (******* ** ** *****, ****-*, *.***, ***.). *** **** ******** ** *** **** *** **** **** ** ***********/******** ** *********.

*** **** ********** ******* *.*** *** ***** ** **** ***** **** ********** ********** ****** ** ***** ***** *.*** ********** ****** ******. *** *****, **** ***** ** ***** ** ********** ** ******, **** ** ** *** **** *********** * ****** ** **** ****** ******** (**** ****** ****). *** *.***, **** ** *** ****** *** ********** ** ****** (****** ** * ** ************** *****) ***** **** ** *** ****** **** ****** ******* **** *** ******** ***** (****** * ** *********** ******). **** *** **** * *********** ****** ** ********* ******** ** ***** ***** ******* **** ***** ****.

[****: **** *********** ***** ** *** ************ ******** ****. ** ** ************** *** **** ******** ******** **** ****** ** *****'* ** ***** ************ *******.]

*********** ** ******* ** **********. *** ************ ******* ** *********** ******** *** ************ ***** ******** ** ******* *****/********. *** **** ******* ** *** **** ********* ****** * ******* **, *** **** ****** ** ** *** * ******* ** ** ********** (** *** ****** ** ** ** ********** ****). ***** *.*** *** ******** '****' **** *****, **** ********* ** ** ** ********* ******* ** ************* ********* ** *********** *** ***** ********.

****** ********: ** **** ****, ** **** * **** ****** ******** **** ********* ** ******* *** *.*** *******. ******** *** ********* ********. ** *** ********** **** *****, ** ******* * **** ***** **** ******* ********** ** ********** *** ******* (******** *** ****** ******** **** ******).

Criteria *: ********* *** ********** ** *** ***** ***** ********/********

******* *** *** ***** ** *.***, ** ** ********* ** **** *** ********** ** **** *****. *******, ** ** **** **** ********* ** ********** **** **** ***** *.***. **** ** ******* ********* ** *** ***** *** *.*** *** **** *********** **** ***** *** ***** (**** ****** ** ******** ***** *** *** *****, *.*** ********* *********** *** ****** ***** ** *** **********).** ***** **********, ** **** *** **** ******** ** ********* ** *** ***** ** ***** **** *** *** *********. *** ********, * ****** ******* ** ***** ** * ***** **** ** *** **** '*******' **** * ******* *******. ** *******, *** **** *****, ******, *****, ******* *** ********* ** * *****, *** **** ******* **** ***** **** **.

*** **** ******* * ***** ** *** **** ********* **** ** ****** ** ******** *** **** ******* *****. **** ** ******** ** *** ******.

******* *********, *** ********** ** * ***** *** ****** ********* ** *** **** ** *** ** *** **** ** ****. *** ********, * ***** ** ****** ******* ** * ***** **** ** * *** **** ******* ***** **** **** **** ********* ** ******** **** *** ****** ** ******. ** ******** *** **** *******, *** ****** **** ******* **** ********* *** *** ****** **** * ***** ** ****** **** **** **** *** ***** **** ** **********.

**** ******* ****** *** ***** *** **** ********* ****** ****** ***** ************ ** **** ******* ******** *** *********** ******** (** ** ***** ********** ** ********).

** *** ***** ***** ** **** *** ********* *********** ******* *** * ******* ** ****** ******:*** ****** ** ********** ** ********* ******* ************* ******* ***** *** *.***. ** *** *****, **** *****, *** ********** ** ********* ****** *** *** ***** ** **** ******* ****** **** ******** ** * ****** ** *. *******, ** *** ***** **** *.***, *** ****** ** ********* ****** ****** ** ***** ** *****.

*** ***** ***** ********* *** ************ ******* ***** ********** *** ********* ******** *** ***** *** *.*** *** ****** ******:

*** *.*** ***** ******** ******* **** *********** ** *** ***** *** *.*** ********** *****. *.***'* *** **** ******** *** ********* **** **** ******* ****** ** ** ********* *.***'* ******* ** ******** ****** ******. ** ********, ***** **** *** ******** ****** ****** ** ** ***** **** **** **** ******* ******. *******, ***** ***** **** **** ** ******** ********** ****** *** ***** **** ******* ****** ***** ******* **** *********, ***** ********* ******* **** ******** *** **** ******** **** *.***.** ** * ******* **** *****'* ********* ******* *** ******** ** **** *** ****** **** **** *** **** **** **********. **** ************* *** ***** ***** ******* ** ***** ***** *****, ****** *** ********** **** ***** ** ********** *****. **** *** ****** ** **** ******* *** ******** ** ********* **** *** ** ********** ** ********** ******* *** *****. *******, **** **** ****** **** ****** ***** ** ******* **** (** ********* ************).

**** ****** *.*** ****** *********** ********* ******* ****** *** *****, *** ***** ***** ** ****** ******** *** ********* ***** ************ ********** * ****** ******* **** *** *** *********** **** *****.

Criteria *: ********* *** ********* **** / ******* ** *** ****** ***** ****

*** **** ********* ****** ** ********* **** ** ************* *** *** ** ******** *** **** (***) **. ******** *** **** (***) *** *.***. ***** *** ***** **** **** ***** ***** **** *** ** **** ****** ****** *** ***** ******* ******* ** ********, **** ** ******** ** ***** *** *********** *** *.***.

**** ******** *** ****, *** ** ****** **** ******** *** **** ********* ***** ********** ** *** *****'* **********. ** ********* ** ************ ** ***** *** **********, ******* **** ** **********.

**** ******** *** ****, *** ** ****** **** **** ********* *** ********* ***** ** **** *** ******* ****** **** *** *****'* **********.

** *** ***** *****, ** **** *** *** *** **** ******* ******* **** *** ***** ******* *** **** *** ** ****** **** *** ****: 

********** **** *** ****** *******. **** ** ******** ** ********** *** ** ********* ********* ***** ** *** *** ** *** *********. *** ***** ** ************ ** ********** *** **** *********** ***** **** ** *** ******** **** (****** ***** ***********). ****'* *** **** ** *** '*****' *** *********** **. **** ** ********** ** *** ************ ***** - *** ****** *** *****, *** ******* *** *********** *** *** ***** ******* *** ***** **** ******.

**** ***, ** *** ********* ** ************, *** ** ****** ******** **** ****** *******. **** *** ** ************ ** *** **** - ****** ******* ******* ** * ***** ***** ** ****** *** ****** ** ****** ********. ************* **** ** **** ******* **** ******* *** **** *** ******* ****** **. ** *** ***** *****, ** **** ******** ** ********* ************* ****** ***********, ******** *** ******* *** *** ******* ***********.

** * **** ****, **** ***, ** *** ********* ***** ** '*** ****' *** *** * *** ********** *****, *** ************ ***** **** ** *******, ********* *** * **** ******** ***********. *********** *** **** *** *** ****** *** *********** **** ***, ** *** ********* ** **** ***** ******** ** ******* ******** *** *** ****/***********.

** *** ** ****** ******** ***** *** ******* ** ****** *** ******* ******* ** * ***** ***** **** **** ** **** ******* ** ******** *** ************ *****

******* *** ************ ***** ** ** *** ***** ** *** *.*** ***** *** **** ***** **** ***** *****. ** *** ***** *****, ** **** *.*** *** ******* ** ******** *** *****. ***** * ****** ********, ** **** *** *** ************ ***** ****** *** *** **** ** ********** **** ******* ** ******* ***** *******.

****** ********: ** *** ********** *****, ** **** * **** ****** ******** **** ********* ** ******* *** *.*** *******. ******** *** ********* ******** *** *** ****** ****** ** ********.

Should *** *** *** ** ***?

******** ** ******* ** *** *** ** *** *** *.*** ** ******* *** **** ********* ******** ** ***** *.***. *** ****** *** *********** ******* ** ********* *******, ****** ******* *** ************** ********.

** *** *** ***, *** ******** *** ******** ** **** ************** - ************ ** ******* ****** ** ****** *** ****** **** **** ** ***** ***** ******** **** **** ********** ******* (*.*., ********, *******) *** **** **** ********* (*.*., ******* ******* *** ********, ******* **********). **** ************** ***** *** * ****** ************** ** ***** ******* ***** ****** ****.

*** *** ***** ********* ** ***** *** *** (*) ********* ******* *********** ** (*) ************** ************. ** *** *** *** *** **** *** *** *** **** *****'* **********, *** **** **** ****** ****** ** ******* ****** (** ********* *****). ** *** *** *** *** **** *** ****, *** **** ***** ******* *** ******* **** ********** ********* **** ****** *** **** *****.

*** *** *** ******** ********* *** **********. **** ***, *** *** ** ********* **** *** ******* ** **** ***** **** ** **********. ****, *** ***** ****** ** ******* *** ********* **** ** ********* ** *** *** **** **** **** *** **** ** ***** *** *****'* **********.

*** *** ******* *** *** ** **** ** ***** ************** ******** **** *********. ******** **** ** ******** *** *********** ***** **** ********* ** **** ******* ********.

***** *** *** *** *** *** *** **** ********** *** ********* *.***, ************* ************** *** ** ******** ** ******* *** ***. ** *** *****, ** ***** * '******' ********** **** *** ** ** ********:

  • ****'* ***, **** *** ** * *** **** *** *** *** *** ********** ***** ****/**********, **** ******** '****-****' **** *** **** ******* *** ****** * *** **** **** *** ** ************* ******. *** ********** ** **** *** ******* ********** *** *** **** ** **** *** *** ** ******* ******** ***** ** ********** *******. ***** **** ***** *****, ** *** ** ** ********** ******** ** *** **** ******** **** ******* ** **** *** ********** *** ****.
  • ********* ****** * ********* ***** **** ******* *** ******* *** *****. ** ****, **** ** * *********** *** **** **** * ********** ***** ** *** *****. **** ******** **** *********** ** ****** ****** ********** ******. *******, ** *** *****, **** ******* *** *** ****** ** **** ** *********.

Criteria *: ********* *** ***** ** ***** ****** ** * ******

* *** **** ** *.***'* ***** ***** **** * ******. ***** *** *** ***** **** **** '********' *** ******** ** ******* **** *** **** ******** ** * ******. ***** *** **** ** * ****** *** **** (********* ** ***** **********/*******), ******* * ****** *** *** ******* **** * ******. ** *** ***** *****, ** **** *** **** ** * *** * ****** ** * ****** ********:

[****: ***** *** * ****** ** **** *** *** ************ ******** ** ***** ************ *.*** *************** **** *** * ****** *********.]

*** **** * ****** ***** *** ** * ******, *** **** ********* ******* **** *.*** ********. *** ********, * ***** **** **** * * ***** *** ****** ******** *** **** ********* **** * ***** **** ** * ****** *** ****** (******* ***** ***** ** ** * ***** *** ** * ****** *** ********. *******, **** ******* ******* **** *****, ****** *** *** * ***** ********* *** * **** ***** ********* ********* ******** ** *****. ** *** ***** *****, ** *********** ***** *********:

******* *** *** ***** ** ***** ****** ** * ****** *** ** ********* *** ** ***** ******. ** ******* **** ** **** *** ** ****** ************ ******** *** **** *** *** ******* ** *********. ** *** **********, *** **** ****** * ***** **** ** * *** ****** (********** ** *** **** ****** *** ****** ***** *** ********). *******, ************ ************ ** * * ***** *** * ******* *** **** ****** ******* ******** ** * * ***** *** ** * ****** (******* **** ** *** ****** ** * ***, ** * ***** **** **** ** ****/********* ***** ** *******).

*** ******* **** ** **** ******* * ***** ********* ** ******* ***** ******** / *******. *** ****** *** * ***** ********, *** **** ****** ***** **** ** ****** ** ******** ** ********** **** ** ******** *****. ***** * ****** **** '********' * **** ** *** *****, ** ** ********* *** ******** ** ******* * **** ***** **-****** ***** ** * ***** *******. **, *** ******* ** * ***** ** **** ********* ***** ** *******, **** *** ****** ********* ********.

Sample *********** **** ********* ******* ************ ****

********* * ******** ****** ** **** ***** ** *.*** ******* ** ********* ******** ** ***** ** *************. ** ******** ********* ****** ******** **** *** ************ ***** ***** ** ********** *** *******.

** *** ***** ******* ** *** ******, ** ******* * ******* ************ **** *********** ********* ********* ** *** *** ******* ********** ** ***** ******** ***********: (*) ***** **********, (*) * ***** ****, (*) ***** **** *** (*) *** ** ***.

Scene ********** *********

Daytime ****** - H.264 bandwidth was 200 Kbps. By contrast, MJPEG bandwidth was 11.8Mbps, a 59x difference, and a 98% bandwidth savings. Image quality between both codecs were similar; we did not note any significant variances.

Daytime ****** **** ******** - H.264 bandwidth was 790 Kbps. MJPEG bandwidth was 13.71Mbps, a 17x difference, and a 94% bandwidth savings. No significant image quality differences observed. 

Daytime ******* - H.264 bandwidth was 2.63 Mbps. By contrast, MJPEG bandwidth was 39.23Mbps, a 15x difference, and a 93% bandwidth savings. No significant differences in image quality observed.

Night ****** (* ***) - H.264 bandwidth was 720 Kbps. By contrast, MJPEG bandwidth was 13.27Mbps, a 18x difference, with a 95% bandwidth savings. Although both images look similar in quality, the MJPEG scene has a little more visible noise, while the H.264 image is a little softer. 

Night ****** (***** *****) - H.264 bandwidth was 2.92 Mbps. By contrast, MJPEG bandwidth was 15.15 Mbps, a 5x difference, and 81% bandwidth savings. A totally black image in itself is not a complex scene, but the random camera noise on screen (which vary between vendors) raises the complexity significantly. Although it is not apparent on the exported clips or screencaps, we witnessed the MJPEG scene suffer from significantly more camera noise than the H.264 scene. 

Night ******* - H.264 bandwidth was 1.89Mbps. By contrast, MJPEG bandwidth was 17.57 Mbps, a 9x difference, with 89% bandwidth savings. No significant image quality differences observed.

I ***** **** *********

30fps, ** * ****** *** ****** ****** ******* - In this scenario, H.264 bandwidth was 3.48 Mbps. By contrast, MJPEG bandwidth was 11.8 Mbps, which shows a 3x difference. Although having a maximum I frame ratio, this scenario did not show any visible quality gain, but still having a bandwidth savings of 71% from the MJPEG scenario.

30fps, * * ***** *** ****** ****** ******* - In this scenario, H.264 bandwidth was 280 Kbps. By contrast, MJPEG bandwidth was 11.8 Mbps, which shows a 42x difference, and a 98% bandwidth savings. This being a default i frame configuration for many camera vendors, this scenario has no significant variances in MJPEG image quality.

Frame **** *********

1fps, * * ***** *** ****** ******* ******* - This scenario shows the H.264 bandwidth at 1.1Mbps. Contrasting this to a 1fps MJPEG scenario, with bandwidth consumption at 1.3 Mbps, a 1.2x difference, and 15% bandwidth savings. No obvious visual differences in quality. Contrast this to the example above for 30fps, 30 i frames. While the ratio of I frames to total frames is the same (1:1), the scene above is indoor daytime - delivering significantly enhanced bandwidth reduction because of the relatively simpler scene.

30fps, * * ***** *** ****** ******* ******* - H.264 bandwidth was 2.63 Mbps.  Contrasting this to a 1fps MJPEG scenario, with a bandwidth consumption of 39.23 Mbps, a 15x difference, and 93% bandwidth savings . Quality wise, no obvious visual differences, but h264 clip is running slightly less frames at 27.99fps.

CBR ** *** *********
CBR ***** ***** ******* ******* - In this scenario, H.264 bandwidth was 2.24 Mbps. By contrast, MJPEG bandwidth consumption was 16 Mbps, a 7x difference. H.264 bandwidth savings was 86%. However, H,.264 stream exhibited clear visual degradation compared to the MJPEG stream.
CBR ***** ***** ******* ******* - In this scenario, H.264 bandwidth was 3.1 Mbps. Contrasting it to the same 16Mbps MJPEG scenario, shows a 5x difference, 80% bandwidth savings. Comparing to the previous scenario of 2Mbps, video quality was significantly improved and matched the visible quality of MJPEG.
VBR ***** ******* ******* - In this scenario, H.264 bandwidth was 2.63 Mbps. By contrast, MJPEG bandwidth was 6X. H.264 bandwidth savings was 84%. H.264 stream quality exhibited no deficincies relative to MJPEG.





Most Recent Industry Reports

List of Security Manufacturer Representatives on Aug 31, 2015
Below is a list of 120+ Security Manufacturer Representative Firms. These companies partner with manufacturers to represent them in specific regions. Typically, a 'rep firm' will represent one manu...

HD Analog Four Way Cameras Tested on Aug 28, 2015
One camera that delivers AHD, HDCVI, HDTVI and 960H, all for as little as $15 a camera. Both on price and claimed support, that is pretty outstanding. And we are hearing from people all over the w...

The Prox Reader Shootout on Aug 27, 2015
In this report, we put eight readers of the popular 125 kHz contactless format head to head and see which one rises to the top. Over a third of integrators call 125 kHz 'favorite', and tens of t...

Axis WDR Zipstream Low-Cost M1125 Tested on Aug 26, 2015
Axis has been busy promoting speciality devices like IP horns and video intercoms. However, they have quietly released a new series of low-cost HD cameras with true WDR and Zipstream support, spec...

IPVM Launches Live Chat Room on Aug 24, 2015
Now you can get help or talk with colleagues any time with IPVM's new Live Chat. Chat is as old as AOL chat rooms and as hot as mega-startup Slack. Benefits of Chatting Ask a question anytime,...

SMB Market Video Surveillance Guide on Aug 20, 2015
This 13-page guide explains the key uses, design factors, and players in the small-medium business surveillance market. A global group of 90 integrators responded, each offering insigh...

Panasonic 4K / 12MP Camera Tested on Aug 17, 2015
We bought the new Panasonic 4K / 12MP WV-SFV781L dome camera and tested it against the:  Axis P1428E Bosch NBN-80122 Dahua IPC-HFW4800E In this in-depth report, we tested: ...

Testing Petzi, The Pet Cam That Shoots Treats on Aug 14, 2015
Do you love dogs? Do you love the Internet of Things? Then we have a product for you. Half camera, half remote-controlled pet treat dispenser, Petzi lets you shoot treats at your dog. That'...

Genetec Cloud Tested on Aug 12, 2015
Not since Axis public and prolonged agony with AVHS, has a major manufacturer bet as heavily as Genetec is now doing on the cloud. Genetec started with Stratocast, which took a similar small ...