By Dan Molenhouse, Solutions Engineer
What is a Codec?
A codec is a technology used to compress and decompress digital media to more efficiently transmit, store, and play it. During compression, the codec analyzes the data, identifies redundancies, and eliminates or represents them in a more compact form. The compressed data can then be stored or transmitted with greater efficiency.
During decompression, the codec reverses the compression process and reconstructs the video file for playback. Depending on the codec, some information can be lost during this process. This leads to a final video file that may not perfectly match the originally compressed video, resulting in potential differences in video quality or resolution. Codecs are essential for enabling efficient media handling, reducing bandwidth requirements, and ensuring optimal quality in digital media applications.
Codec Comparison: H.264 vs H.265
H.264/AVC (Advanced Video Coding), and its successor H.265/HEVC (High Efficiency Video Coding) are two of the most popular video codecs due to their advanced compression capabilities and widespread support. Both codecs compress video by first partitioning the video frame into variable-sized squares. Each partition is then compressed by eliminating redundant visual information within single frames (spatial compression) and by storing only the changes between consecutive frames (temporal compression), thus reducing file sizes while maintaining acceptable visual quality.
H.264 uses a coding structure called macroblocks, which are fixed-size 16x16 pixel blocks that can then be further segmented into smaller partitions for high motion areas. H.265 improves upon this concept by introducing a new coding structure called Coding Tree Units (CTUs), which are flexible and variable-sized units that can be can be much larger (64x64 pixels) than the outdated macroblocks. This allows H.265 to preserve detail and retain quality in critical areas of the video more efficiently.
With these improvements, H.265 can achieve better video quality at the same bitrate or reduce the file size while maintaining similar visual quality compared to H.264. However, hardware restrictions and changes in licensing structure have prevented H.265 from becoming as widely adopted as its predecessor. It was not until Google Chrome launched full support for H.265 in late 2022 that it became feasible for video service providers to begin supporting the codec.
The Hybrid Cloud Challenge
Verkada faced a unique engineering challenge in implementing H.265 across its hybrid cloud architecture. Video codecs are not cross-compatible; the codec used to encode and transmit video data must match the codec used to decode and play it. This means a device that only has an H.264 codec cannot view a video file encoded in the H.265 format. For Verkada, it was paramount that all customer devices retain the ability to view video files before adopting H.265.
Through a patent-pending schema of on-device encoders and cloud transcoding, Verkada’s suite of cameras now records and transmits all video content in H.265 while still providing H.264 video to incompatible devices. To learn more, check out our free ebook on how Verkada adopts H.265 at scale. The ebook provides a comprehensive overview on:
- Codec Comparison: H.264 versus H.265
- The Hybrid Cloud Challenge: Traditional versus Hybrid Cloud Architecture
- Verkada’s Unique Approach to Video Codecs: Using the Cloud to Guarantee Compatibility