Surveillance Codec Guide

Author: IPVM Team, Published on Jan 03, 2019

Codecs are core to surveillance, with names like H.264, H.265, and MJPEG commonly cited. How do they work? Why should you use them? What issues may you face? In this tutorial, we examine this in-depth covering:

  • Uncompressed vs. Compressed Video
  • Inter vs. Intra Frame Compression
  • I vs P Frames
  • Other Frame Types
  • H.264 vs H.265 vs MJPEG
  • H.265 Emergence
  • Smart Codec Growth
  • Proprietary Codecs
  • Scalable Codecs - JPEG2000, SVC
  • Quality of Codecs
  • Codec Support in Surveillance
  • Future Codecs
  • What Codecs to Choose?

****** *** **** ** ************, **** ***** **** *.***, *.***, and ***** ******** *****. *** ** **** ****? *** ****** you *** ****? **** ****** *** *** ****? ** **** tutorial, ** ******* **** **-***** ********:

  • ************ **. ********** *****
  • ***** **. ***** ***** ***********
  • * ** * ******
  • ***** ***** *****
  • *.*** ** *.*** ** *****
  • *.*** *********
  • ***** ***** ******
  • *********** ******
  • ******** ****** - ********, ***
  • ******* ** ******
  • ***** ******* ** ************
  • ****** ******
  • **** ****** ** ******?

[***************]

Uncompressed **. ********** *****

*********** *** ************ ***** ** **********, ** ******* *** ******* demands ***** ****** ** **** ******* *** ************.

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

  • *** ***** ** ****** ********* *** **** *****
  • *** ***** ****** ** ****** *** *****
  • *** ***** ****** ** ****** *** ******

** **** *** ***** ****, *** ******** **** ** *****. Let's **** ******* **** ** *****.

***** ******

**** ***** ** ***** * ***** *********** ** * ****** within * *****. *** ***** ********** *** ********* *** ***** can ** ******* *** **** ******* ******* *** *********/****.

  • **** *********, ***** ********** *** * ***** ** *** ****** (8 ****) **** * ************ *****, *** ************ ***** *** the ******* ** ******* ************ ****** ** ****.
  • ** ******, ****** *** ************ ***** ***** ******** ***** ** the ***** ** ****** ****** ** ********* *** *** ****** is *** *******. ** **** ** **,*** ****** ** ******.

**********/********* ******

*** ***** *** ******* *** *** ****** ** ********** ** they *** ************* ** *** *** ******, *********** ********** ***** ******** ***** ******:

** **** ******** *** ******, ****** ****, *****, *****, ***. *** **** ******** ** surveillance ******* (>**% ** *** *******) *** ******** ** ******* 5 *** ** *** (********** ***** **** ***** ************ ****).

Adding ** **

**** ** ******** **** ** *********** *** ******* ************ ***** can ******. **** * ***** ***** ****** ** *****. ************ it ** *** ******* ** *** *********:

*********** ***** ***** ******* ******* ** ~* **/* *** ************ 1080p/30fps *****. ** * ***, ** **** ****, *** ***** have ~***** ** ******* **** * ****** ******. ***** **** drives ******** ** *** ******, * ** ****** ************ ************ system ******* *** ** ****, ***** **** ****** **** ** storage ****** * *** ******* **** ****** **** ***** **** hundreds ** ********* ** *******.

Codecs *** ***

******* *** **** **** ** ************ *****, ********** ************ ******* of ** ******* ********* *** ** ******** *** ** **** small **********. *** **** **** ******? ******.

***** ****** *** *********** / ************* *** *** *** ** compression ** *** ******* ******* ** ******** ********* / ******* consumption.

****** ***** ***** ** ***** ***** *** *** ****** ***** is ********** ******** ** **** ****** *** ****** **** * small ****** ** ******* ******. ****** ******** ***** ** ******** the ****** ** ****** ******** ***** ******** ***** ****** **** the **** ** ******* ******, ******** ** ** ******** *** lower ******* ** ****.

Inter **. ***** ***** ***********

***** *** *** *********** ********** ** ***********: *****-***** *** *****-*****. It ** ******** ** ********** *** ************ ******* *** *** as **** ****** ********* ***********, ********** ***** ************, *** ******* risks.

  • *****-***** *********** ** ****** * ****** ***** **** *** *** across ****** (******* - *****)
  • *****-***** *********** ** ****** ******** ****** *** ****** ****** ****** (examples - *.***, *.***, ****-*)

*** ****** ******* *****-***** *********** *** **** **** **** ******* both ***** *** ***** ***** ***********.

Intra-frame ***********

*****-***** *********** **** ***** ** *** ***** ** * ****, doing *** **** ** ******** **** ** ** **** *****. Even ****** ***** ** * ****** ** ******, *****-***** *********** sees **** * ***** ** * ****, ******** *** "******." An *****-***** ***** ******'* ********** ****** **** **** *** ****** of * *****:

*** ****** ** **** **** ** ****** ** ** *************** and **** ************* ******** *****. *** ********, * *****/***** ***** stream ***** ** *****-***** *********** **** ***** *** **** *** bitrate ******* **** ~**** **/* ** ~****/*. *******, *** ******** is **** **** **** ******* *** ********* ** *** ******* between ******.

Inter-frame ***********

***** *****-***** ***********, *** **** ** *** ***** ****** *** frame *******, *** ***** ******** ******** ****** ** ******* ******** the *****. **** ** ******** ******* ***** **** ****** ******* from *** ***** ** *** ****. *** *******, ***** *** same ***** ** * ****** ******, *****-***** *********** ***** **** only *** *******'* ***.

**** ** **** ** * ***** ***** ********* ******, ******* only ******* ** *** ***** ***** *********** *********/*******. *** ********, the **** *****/***** ****** **** ***** **** ****/* **** *****, an *****-***** **** *****, *** **** **** ***/* **** *.***, a ***** **** **** ****.

*******, *** **** ******** ** *****-***** *********** ** **** ** is *** **** *************** *********, ***** *** ******** *********** *** quality ***** (******** *****).

I ** * ******

***** *** *** *** ***** ***** ** *****-***** *********** **** as *.***/*.***.

*-******

*** ***** ***** ** * ***** ***** ** ******** ** called ** *-*****, ***** *** *****-*****, *** ** *********** * full ***** ** *****, ** ******* ** **** ******* ***** in * ******. *** ******** ******* *** *-****** ** ******** to ** *-***** ********, *** (***** ** *****), ** *** (group ** ********).

** ** *******, **** ***** ***** *** *-***** ** ** outdoor ***** **** ** *** ******* (***** *** **** ****):

i-frame contains full frame information

*-******

*-****** ********* *** **** ***** ** *** ******** *-***** ** send **** *** ******* ** *** *****. ******* *** ** small, **** ** ******* ***** ** ***** ******* ********, ** large, **** ** * *** ****** ****** **** ****** ** preset. *** * ** *-***** ****** *** "**********."

*** ******* **** ** * *-***** **** *** **** ***** can ** **** ** *** ***** ***** (***** *** **** size). **** *** ***** **** *** ****, ***** **** ******, and ****** ******* ** *** *****, *** **** ** *******.

p-frame contains only changes in scene

******* ***** ******** ** *** **** *****, *** *-***** ******* can ** **** "********" **** **** *****, ***** *** **** I-frame ** **** (~** *******).

Other ***** *****

**** **** ***** *** ***** ***** ***** ** ******** ** I *** *, **** ** *, **, *** **, ****** they *** ********* ****** ** ************. **** ** ******* ******* B-frame *******, *** *** *** ***** *** ******* ** ******** decoding ****, ** **** *** ********* *** ****.

Standard ******

** *** ********* ** ****, **** *** *********** ***** *** H.264. ***** *.*** ******* *** *** ****** *** *** *********** is *********, *** **** *********, *** **** ** ***** *******, and ******* ********* ***** **** **** *.*** ** *** **** common ****** (*** ***** *** **** *******).

***** ** ***** **** ** **** ***********, ********* **** ******** by *** **** ** *** ********** ************ **** ** *** or ***** *********. *******, ************* **** ***** ** ***** ******* for *****, ******** ****** *** ********* ** ***** ******.

******** ** ** *****-***** ***** ******* ** *****, *** ******** (see *****). ** *** **** ***** *** *** *** ** Avigilon, *** *** **** **** ******* ****** *** ** *******/** *****. ******, **** *********'* ***-**(**** ***'* **************) ************** *** ********.

H.265 ******** *** ***** *******

*** *** **** *** *****, *.*** *** **** *** **** big *****, ********* ** ******* *.*** *** ****** ******** ** another ~**%. *******, ***** *** *** ******** ********** *** ********** implementation:

  • ******* *****:***** *** ****** **** ***** ** *.*** ******** ** ******* bitrate **********, ***** **-**% ** ****, *** ***** ** *.*** show **** **-**% ******* **** *.*** ** **** ******. ***** this **** *** *** ***** ******** ** ****/******** ** **** of **** **** ******, *** ******** ** *.*** *** *** as ********** ** *** ***********.
  • ********* *** ****:** *** *****, ******* *.*** ******* ******** ************* **** ********* load **** ********** ***/********** *.*** *******, ** **** ***** ******, which ***** ******* *** ******* ************ ** **** *************.
  • *********** ********:******, ***** **** ********* *.*** ********, * ***-******* *********** *******, though **** ******* ******* *** ** *** ***** ****** ** current *.*** ****** *** ******* *********/******* *******.
  • ******* ***** ***********:*******, ****** ** *.*** ******* *** ***** ****** ** **** ONVIF *********** ***** *** ********** ** ***** ****** *******,******* *, ***** *** ******** ** ** **** **** ******* ********** products. ****** ************* **** **** ** ********* *.*** ***** *****'* 2.4 ****, *** ***** *** ** *********** **** ***** **** profile *** ********. ** ****** *.*** ******* * ******* ** grow ******* ** ****.

** ****** *.*** ** ******** ** ******* ** ** *******, but ***** ******* ******** ***** **** ** ********.

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

Proprietary ******

************ *** *** * ******* ** *********** ******, *** **** few ** ***** *** ** *** ** ****. ** ***** analog *******, ***** *** *******, ****** *** ******* ** *** same ********* (*.*., * ***), ****** ** ****** ** *** a *********** ***** ** *** ************ ********** *** ****** *** to *** *******.

*******, ** ******* ****** ***** ** ********** *** **** **** to ******** **** ******* ***** ** * ********/*** *** ******* and ******** **. *********** ****** ******** *** ********** ** *******, managing, *** ********** ***** ** **** **** **** ** ********** to *** ***. *** **** ***** ** ***** **** *** multiple *********** ****** **** ********* **** ** ****** ************ ******.

Mobotix ***** *********

*******'******** *** **** ****** ***** *********** ***** **** ** ***** surveillance. ********** ** ****, ***** ******** *****-***** ***********, ********* **** MJPEG *** ******** ********* *********** ******** ** ** (*** *** *****). *******, ***** ** ** ***********, **** *** *** ***** VMSes ******* **, ******* **** ** ****** *** *******'* *** VMS ** ** *** ******* ******* ** *****. ***********, *.***'* bandwidth *********** ** ********* **** ***** **** *** ********** ***** stream, ******* ******** *** **************.

Smart ******

** *** **** *-* *****, *.*** *** *.*** ***** ****** have ****** ******, ****** ** ******* ****** ******** ******** ** standard *.***/*. ******* *** ***** ***** ****** ******** ******, *** generally **** *** *** **********, ******** *****. ******* ****** *** our***** ***** ******** **** ******* ** ***** ************.

Smart ***********

******* ** ******** *** **** *********** ***** ** *** ****** scene, ***** ****** *********** ****** *********** *** ******** ** *** camera's ***. *** *******, ******* ** *** ***** *****, *********** could ** *** ** "***" *** *** ******** ****** ** keep ******* ****, *** *** ***** ********** *** ** *** to "****", ***** ** ** *** **** ******* ** *** white ****.

dynamic compression varies depending on activity

Dynamic *-***** ********

******, ***** ****** ********* *********** ****** *-***** ******** ***** ** activity ** *** *****. ** ** * ***** *** ****** or ** ******, *** ****** ***** *-****** ************ (*, **, 20 ******* ** ****), *** **** ******** ** ******** ** the *****, ** *********** ***** ** *-***** *** ******** **** to ****** (********* * ******) *-***** ********* ** **** ** activity *********.

**** ***** **** * ****** ******** ***** *** ******* ** dynamic *-***** ********:

Smart ***** ********

** *** *****, ***** ****** **** ******* ******** *************, ~**% at * *******, *** ** ** **%+ ** **** ******. These ****** *** **** ********* ** ***** ******, ** *-***** intervals ****** ****** *** *********** ****** *** ** *** **** of ********. *** ******** ***** ******** **** *******.

H.264 **. ***** *******

***** *.*** ** ******* *** **** ****** **** ***** ** surveillance, *** **** ***** * ****** ****** ******* ***** ******* loss ******** ** *****, *** **** ***** ** ******* *.*** is ********, **** ** ****. ************ *.*** ** ***** ********* ****, **** ******** **********, *.*** ******** *** **** ******* quality ** *****.

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

  • ******* **** *********** ******:** ************** ********* *** *** ****, *** ***** **** **** ******* ***********. See ***** ****** ************ *********** ************* **** ******* *** *** ******** ************* ****** ***********.
  • **** ********** ******:**** ****** ***** *** ******* ** ******* ******, ***** ***** is **** ** ****** - *************, ******, ***.
  • ******* *** ******** *** *****:******* **** *** *** *** **** ** *** *** ***, the ***** **** **** ******* ***********.

*******, ** **** *****, **** **** ***** ******* ********, *.*** has ********* ******* ******* ** ***** ** *** *****.

Scalable ******

**** ****** *** **** ******* * ****** **********. *** ********, changing **** * *** ****** ** * *** *** ***** MJPEG ** *.***, ******** ****** ******** * ********** *** ****** or *********** (*.*. **-**********) *** *** ****** ** **** ** 1MP. *******, ** **** ***** *** **** ** ****** *** stream ********** ******* ********* * *** ******, *** ********, ** you *** ******* ** * ****** **** * ***** ********* connection (*.*., ******) ** **** ** ****** ******* **** ** older *****.

* ******* ***** ** ******, ****** '********', *** ** **** automatically, ******* ****** ** ******* * *** ****** ** **-******* an ******** ******. * ******** ***** *** *********** '****' *** frames ** ********** ****** **** **** *** ** * ******. This ****** ******* ****** ** ********** **** **** ** **** as *********** ********* ********** / *** *** ****** / ****** clients.

***** *** *** **** ***** ******** ******:

  • *** ** *.*** **** ***********. *** **** **** ** **** it ******** *********** **** *** ********* ******** ** *.***. *************, very *** ************* ******* ****. **** ********** **** ******* *****-********* (sending ******** ******* ************** ** ********* **********/***** *****).
  • ********, ***** ** *********** *****, **** *** ******** ** ***********. This ** *** ***** **** ******** ************* **** *** *** phased *** ** *** *******. *** **** ******** ** ********, like *****, ** ******* *********/******* ******** ******** ** *.***, **** partially ****** ** *******.

*** *********** *** **** **** ****, **** ****** ****** ******** despite ************ ** **** ******* (** ***** ** *****) *** several *****. **** *** ******* ********** ** *.*** ***** ****** (which ******* ****** ** ** *** *** ***********) *** *.*** taking **********, *** ** ******** ** ****** * ***** ****** in ************ ******.

Future ******

***** **** *********** ****** *** ********* ** *******, ** ** highly ******** **** *** *** ************ **** **** **** **** adoption ** ************.

*** ********, **** ********** ***** ******* ********* ******* **** ***** proprietary ******, **** ********* ******** *** / *******. *******, **** ***** ******* **** ****** ************* *** *** developers ** ********* ***** ****** ** ***** ********. ************, ***** the *********** ******* ********** ** ***** ******, ***** *** ********** with *** ******** ** ******* *.*** *********/***, *** ********** ** development ** *** ***** *********** ****** ** **** **** ********.

**** **** ********* ******'**** *** ********* ** ************* ** ************, ********** ** * *******-**** *********** to *.*** (***** *** ************ *** ******* ****). *******, ***** ****** *** ****** ** ** ******** **** manufacturers, **** ** ************ ******** ****** ** ***** ****, *** have **** ****** ** ********.

What ****** ** ******?

********** **** ****, *** **** ***** *********** *** **** *** cases ** *.*** **** ***** ***** ******* ** ***** ****** significantly ******** ********** ** *.*** **** ******* *********.

*.*** ** *************, *** ** **** ***** **** ** ***** out *** ** *** ******* ***********. *******, ** ** ******* stronger *** **** ***** **** ** ***-**-*** ******/*** ******* **** a ****** ************ (*.*., *****, *********, ***.) ***** ************* ****** are *********.

***** ******* * ***** *** ********** ************ *** ***** *** fear (******* ************) **** **** *****-***** ***********.

[****: **** *** ********** ********* ** ****, *** ************* **-******* in **** *** **** ** ******* ********** ******** ** *.*** and ***** ******.]

Comments (11)

Very good guide!

10 points!

Great Update!

One question about:

While the change from MJPEG to H.264 resulted in drastic bitrate reductions, often 50-75%, our tests of H.265 show that 15-30% savings over H.264 is more likely.

Was the change usually from MJPEG to h.264 directly, or was there often a baby step of MPEG-4 (Part 2) involved? If so, how big was the change from MPEG-4 to h.264?

Was the change usually from MJPEG to h.264 directly, or was there often a baby step of MPEG-4 (Part 2) involved?

For MP, the move was straight from MJPEG to H.264. See 2008 article - H.264 makes Megapixel go Mainstream.

how big was the change from MPEG-4 to h.264?

How big the change depends on actual codec implementations and scenes. So it's always a challenging question. In the entertainment industry, assuming very good implementation of codecs in both cases ~40%. Practically it always depends...

However, H.264 has 2 very sufficient differences vs MPEG4(part2):


1) In H.264 DCT( discrete cosine transform) is done in integer values.
In MPEG4(part2)(as well as in MPEG1,MPEG2,H.261,H.263) the DCT was done in float values, and standard did not dictate how accurate should it be. So while encoders used one accuracy(due to the hardware of software specifics), decoders doing inverse DCT used another formula (accuracy), which led to the error accumulation with every next P frame. So, by the end of the GOP(with new I frame) it was sort of re-synchronization. Visually it led to image quality jump with every new I frame(typically every second). You might remember this visual effect of MPEG4, that image changes significantly every second. Not the case with H.264.

This is the reason why GOP size was very limited in MPEG4(image degradation accumulation). It's not the case in H.264. Practically H.264 GOP size could be very huge( practically unlimited). The only limitation comes from editing software( in order to decode frame N inside the GOP, decoder have to decode all previous frames).

So, H.264 made a huge step forward eliminating GOP size issue and image degradation towards the end of the GOP.

2) deblocking filter became part of the standard. So they have to be universally implemented across all H.264 codecs. Wich also made H.264 stream look the same on any device.

So, H.264 is not only bandwidth saver but solves some fundamental issues of previous standards.

Excellent article, the inclusion of all the smart codec data is very useful.

Excellent article. It will add high value add for users. Grate Job.

Sounds like there is always room for improvement on H. 264, but it has proven to be the foundation in which to build on. The H. 265 sounds good at the drawing board, but when put into practice, it has its "ghosts" to be worked out.

I have a better understanding of compression

Thanks for taking the mystery out of compression!

Good article.

Few points:

P-frames reference the full image of the previous I-frame to send only the changes in the scene.

Just in case: P frame reference the full image of any I or P previous frames. Advanced codecs can refer to multiple frames back minimizing the difference(part of the image could be taken from one reference frame, another part form another). Practically P frame most of the time refers previous P frame.


MISC: as a paradox, typically in the surveillance industry(due to static scenes) H.264 takes less CPU to decode than MJPEG. (since most of the time most of the image parts difference with prev frame is about zero).

H.265 is designed in such a way that besides potential bandwidth savings it's better parallelized for multiple CPU cores to encode/decode.

Thank you for the excellent summary and outline to explain CODECS. Well done!

Login to read this IPVM report.
Why do I need to log in?
IPVM conducts unique testing and research funded by member's payments enabling us to offer the most independent, accurate and in-depth information.

Related Reports

Testing Bandwidth Vs. Low Light on Jan 16, 2019
Nighttime bandwidth spikes are a major concern in video surveillance. Many calculate bandwidth as a single 24/7 number, but bit rates vary...
Access Control Records Maintenance Guide on Jan 16, 2019
Weeding out old entries, turning off unused credentials, and updating who carries which credentials is as important as to maintaining security as...
Avigilon Favorability Results 2019 on Jan 15, 2019
Since IPVM's 2017 Avigilon favorability results, the company was acquired by Motorola and has shifted from being an aggressive startup to a more...
Gorilla Technology AI Provider, Raises $15 Million, Profiled on Jan 15, 2019
Gorilla Technology is a Taiwanese video analytics manufacturer that recently announced a $15 million investment from SBI Group, saying this...
Pelco Favorability Results 2019 on Jan 11, 2019
Pelco had a significant favorability problem amongst integrators in our previous study (see 2016 Pelco results). Now, in the first edition of our...
Winter 2019 IP Networking Course on Jan 10, 2019
Today is the last day to register for the Winter 2019 IP Networking course. This is the only networking course designed specifically for video...
NTP / Network Time Guide For Video Surveillance on Jan 10, 2019
Inaccurate time can lead to missing or inadmissible video, yet this topic is often overlooked, with cameras and servers left defaulted,...
Wavelynx Access Control Manufacturer Profile on Jan 10, 2019
Denver-based WaveLynx is not well known as an access reader manufacturer, but OEMs for big industry brands including Amag, Isonas (Allegion),...
Managed Video Services UL 827B Examined on Jan 09, 2019
Historically, UL listings for central stations have been important, with UL 827 having widespread support. However, few central stations have...
UK: Private Video Surveillance Complaints Down Since GDPR on Jan 09, 2019
The arrival of the GDPR on May 25, 2018, brought fears the law would spark a massive increase in privacy complaints about security camera use....

Most Recent Industry Reports

Mobile Surveillance Trailers Guide on Jan 17, 2019
Putting cameras in a place for temporary surveillance where power and communications are not readily available can be complicated and expensive....
Exacq Favorability Results 2019 on Jan 17, 2019
Exacq favorability amongst integrators has declined sharply, in new IPVM statistics, compared to 2017 IPVM statistics for Exacq. Now, over 5 since...
Testing Bandwidth Vs. Low Light on Jan 16, 2019
Nighttime bandwidth spikes are a major concern in video surveillance. Many calculate bandwidth as a single 24/7 number, but bit rates vary...
Access Control Records Maintenance Guide on Jan 16, 2019
Weeding out old entries, turning off unused credentials, and updating who carries which credentials is as important as to maintaining security as...
UK Fines Security Firms For Illegal Direct Marketing on Jan 16, 2019
Two UK security firms have paid over $200,000 in fines for illegally making hundreds of thousands of calls to people registered on a government...
Access Control Cabling Tutorial on Jan 15, 2019
Access Control is only as reliable as its cables. While this aspect lacks the sexiness of other components, it remains a vital part of every...
Avigilon Favorability Results 2019 on Jan 15, 2019
Since IPVM's 2017 Avigilon favorability results, the company was acquired by Motorola and has shifted from being an aggressive startup to a more...
Gorilla Technology AI Provider, Raises $15 Million, Profiled on Jan 15, 2019
Gorilla Technology is a Taiwanese video analytics manufacturer that recently announced a $15 million investment from SBI Group, saying this...
2019 IP Networking Book Released on Jan 14, 2019
The new IP Networking Book 2019 is a 285 page in-depth guide that teaches you how IT and telecom technologies impact modern security...
Arecont Costar Layoffs on Jan 14, 2019
Arecont Vision, a Costar Company, has laid off more than 10% of their workforce in a move the company described to IPVM as a result of "important...

The world's leading video surveillance information source, IPVM provides the best reporting, testing and training for 10,000+ members globally. Dedicated to independent and objective information, we uniquely refuse any and all advertisements, sponsorship and consulting from manufacturers.

About | FAQ | Contact