H.264 vs MJPEG - Quality and Bandwidth Testedby 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
*******:
*** ************ ***** ** ********** / ******* (******* ** ** *****, ****-*, *.***, ***.). *** **** ******** ** *** **** *** **** **** ** ***********/******** ** *********.
*** **** ********** ******* *.*** *** ***** ** **** ***** **** ********** ********** ****** ** ***** ***** *.*** ********** ****** ******. *** *****, **** ***** ** ***** ** ********** ** ******, **** ** ** *** **** *********** * ****** ** **** ****** ******** (**** ****** ****). *** *.***, **** ** *** ****** *** ********** ** ****** (****** ** * ** ************** *****) ***** **** ** *** ****** **** ****** ******* **** *** ******** ***** (****** * ** *********** ******). **** *** **** * *********** ****** ** ********* ******** ** ***** ***** ******* **** ***** ****.
[****: **** *********** ***** ** *** ************ ******** ****. ** ** ************** *** **** ******** ******** **** ****** ** *****'* ** ***** ************ *******.]
*********** ** ******* ** **********. *** ************ ******* ** *********** ******** *** ************ ***** ******** ** ******* *****/********. *** **** ******* ** *** **** ********* ****** * ******* **, *** **** ****** ** ** *** * ******* ** ** ********** (** *** ****** ** ** ** ********** ****). ***** *.*** *** ******** '****' **** *****, **** ********* ** ** ** ********* ******* ** ************* ********* ** *********** *** ***** ********.
****** ********: ** **** ****, ** **** * **** ****** ******** **** ********* ** ******* *** *.*** *******. ******** *** ********* ********. ** *** ********** **** *****, ** ******* * **** ***** **** ******* ********** ** ********** *** ******* (******** *** ****** ******** **** ******).
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.
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.
Most Recent Industry Reports
Testing Axis' Top Low Light Camera Q1635 on Nov 23, 2015
Low light performance continues to improve, first driven by advances in image processing and now increasing number of 1/2" imagers in 1080p HD cameras. IPVM has recently tested new super low light...
Audio Analytics Aggression Tested on Nov 20, 2015
What if you could use your IP cameras to detect fights before they start? That is the goal of Louroe / Sound Intelligence with their recently released Aggression Detector audio analytics. Cl...
Pelco Optera 12MP Multi-Imager Tested on Nov 09, 2015
This summer, Pelco came out firing against Arecont, touting the superior performance of its new multi-imager line vs Arecont's. But is this really the case? We bought a Pelco Optera 180° multi...
IP Camera Bootup Shootout 2015 on Nov 04, 2015
IP cameras, like PCs, take some time to boot up. And just like PCs, the amount of time can vary greatly. Many people do not care but some people find it annoying. Perhaps more importantly, in surve...
Live From China on Nov 02, 2015
China's growing influence, if not dominance, of the global video surveillance market is unquestionable. To better understand this, IPVM has gone to China. Our first stop is CPSE, which claims ~100...
Network Cabling for Video Surveillance Guide on Oct 30, 2015
In this 14 page guide, we teach the fundamentals of network cabling for video surveillance networks, how they should be installed, and the differences in testing them for production networks. Spec...
Large Video Surveillance Systems Guide on Oct 29, 2015
This 14 page guide explains the key uses, design factors, and players in the large system surveillance market. A global group of 80 integrators responded, each offering insig...
Sony 20MP / 4K Camera Tested on Oct 26, 2015
For 18 month, Sony has been hyping 4K cameras, a year before they even announced a 4K network camera. Now, amidst intense competition and price pressure, Sony has released their long awaited 2...
ONVIF Screen Capture Tested on Oct 23, 2015
Recording a PC's screen to a VMS has several uses, but historically has required expensive dedicated encoders or specialized software for each VMS. Now, a new offering called Screen ONVIF has...
Milestone Arcus VMS Tested on Oct 21, 2015
For more than a decade, Milestone was a Windows only VMS. With the Internet shifting power away from Windows OSes, Milestone launched a new VMS, called Arcus, which can be embedded onto Linux ...