Version: 1.0
Date: 01-2026
Audience: Embedded engineers, camera architects, firmware developers
Video compression is a core component of modern embedded camera systems, enabling real-time video transmission and storage under constrained bandwidth, storage, and power conditions.
Two dominant international standards are:
- H.264 / AVC (Advanced Video Coding)
- H.265 / HEVC (High Efficiency Video Coding)
This document provides:
- Core concepts of both codecs
- Technical comparison
- Advantages & limitations
- Standards and RFC references
- Practical considerations for embedded camera platforms
A video codec is a method to:
- Compress raw video data for transmission/storage
- Decompress encoded video for playback
Primary goals:
- Reduce bitrate
- Maintain acceptable visual quality
- Enable real-time processing on limited hardware
Raw video example (uncompressed):
1920 × 1080 × 8bit × 3 × 30fps ≈ 1.49 Gbps
→ Not feasible without compression.
Both H.264 and H.265 are based on the hybrid block-based coding architecture:
Main components:
- Block partitioning
- Prediction (intra / inter)
- Transform & quantization
- Entropy coding
- Loop filters
- Standard name: ITU-T H.264 / ISO/IEC 14496-10
- First published: 2003
- Widely deployed in IP cameras, CCTV, streaming
-
Macroblock size: 16×16
-
Prediction types:
- Intra (spatial)
- Inter (temporal, motion compensation)
-
Entropy coding:
- CAVLC (baseline)
- CABAC (main/high)
| Profile | Use case |
|---|---|
| Baseline | Low-end MCU, low latency |
| Main | Consumer IP cameras |
| High | High-quality recording / NVR |
- Mature ecosystem
- Low hardware complexity
- Broad hardware decoder support
- Stable real-time performance
- Lower compression efficiency
- Higher bitrate at high resolutions
- Less optimal for 4K+ video
- Standard name: ITU-T H.265 / ISO/IEC 23008-2
- Published: 2013
- Designed for high-resolution video (4K / 8K)
- Coding Tree Units (CTU): up to 64×64
- More flexible partitioning
- Improved motion vectors
- Advanced intra prediction
- Enhanced entropy coding
-
~40–50% bitrate reduction vs H.264 at same quality
-
Ideal for:
- 4K cameras
- Low-bandwidth networks
- Cloud storage optimization
- Superior compression efficiency
- Better subjective quality at low bitrate
- Designed for UHD content
- Higher encoder complexity
- Increased CPU / hardware requirements
- Licensing concerns in some markets
- Slightly higher encoding latency
| Feature | H.264 | H.265 |
|---|---|---|
| Max block size | 16×16 | 64×64 |
| Compression | Baseline | ~50% better |
| CPU usage | Lower | Higher |
| Latency | Lower | Slightly higher |
| Embedded support | Excellent | Platform-dependent |
| 4K efficiency | Moderate | Excellent |
- SDP:
a=rtpmap:96 H264/90000
a=rtpmap:96 H265/90000
H264 obtains the NALU Type by code & 0x1F,
00 00 00 01 67
0110 0111 (0x67)
& 0001 1111 (0x1F)
-----------
0000 0111 (0x07) = 7(DEC) => (SPS)
H265 obtains the NALU Type by (code & 0x7E) >> 1.
0010 0110 (0x26)
& 0111 1110 (0x7E)
-----------
0010 0110 (0x26) >> 1 = 0001 0011 (0x13) = 19 (DEC) => (IDR)
-
Same resolution & quality:
- H.265 bitrate ≈ 50–60% of H.264
-
RFC 6184 – RTP Payload Format for H.264 https://datatracker.ietf.org/doc/html/rfc6184
-
RFC 7798 – RTP Payload Format for H.265 (HEVC) https://datatracker.ietf.org/doc/html/rfc7798
-
RFC 4566 – SDP https://datatracker.ietf.org/doc/html/rfc4566
-
RFC 3550 – RTP https://datatracker.ietf.org/doc/html/rfc3550
-
RFC 2326 / RFC 7826 – RTSP https://datatracker.ietf.org/doc/html/rfc7826
-
ITU-T H.264 https://www.itu.int/rec/T-REC-H.264
-
ITU-T H.265 https://www.itu.int/rec/T-REC-H.265
When choosing a codec:
- Available hardware encoder (ISP / VPU)
- Target resolution & framerate
- Network conditions
- Power & thermal constraints
- Decoder compatibility (NVR, mobile app)
Typical recommendation:
- 1080p / low latency → H.264
- 4K / cloud storage / WAN → H.265
H.264 remains the most compatible and robust choice for embedded cameras, while H.265 provides significant bandwidth and storage savings for high-resolution and next-generation systems.
A well-designed camera platform often supports both codecs, allowing flexible deployment across different scenarios.








