Video Encoding Technology
How Lamco RDP Server delivers crystal-clear remote desktop with H.264 encoding, AVC444 chroma, and intelligent bandwidth optimization
Remote desktop is fundamentally a video streaming problem. Your desktop generates frames, those frames need to reach the client, and the client needs to display them with minimal delay. The quality of this video pipeline determines whether remote work feels responsive or frustrating.
Lamco RDP Server implements a sophisticated H.264 encoding pipeline with multiple encoder backends, intelligent codec selection, and bandwidth optimization techniques that adapt to your content and network conditions.
H.264/AVC Fundamentals
H.264 (also called AVC or MPEG-4 Part 10) is the dominant video codec for remote desktop protocols. It offers excellent compression efficiency, hardware acceleration support on virtually all GPUs, and universal client compatibility.
Why H.264 for Remote Desktop?
| Factor | Benefit |
|---|---|
| Compression | 10-50x smaller than raw frames |
| Hardware Support | Dedicated encode/decode on all modern GPUs |
| Latency | Designed for real-time streaming |
| Compatibility | Every RDP client supports it |
| Quality | Excellent at typical desktop bitrates |
H.264 Profiles and Levels
Lamco RDP Server uses the High Profile for maximum quality and automatically selects the appropriate Level based on your resolution:
| Level | Max Resolution | Typical Use |
|---|---|---|
| 3.1 | 1280×720 | 720p HD |
| 4.0 | 1920×1080 | 1080p Full HD |
| 4.1 | 1920×1080 | 1080p (higher bitrate) |
| 5.0 | 2560×1440 | 1440p QHD |
| 5.1 | 3840×2160 | 4K UHD |
| 5.2 | 3840×2160 @ 60fps | 4K UHD high frame rate |
AVC420 vs AVC444
This is where Lamco RDP Server distinguishes itself from most remote desktop solutions.
Standard H.264 video uses 4:2:0 chroma subsampling—the color information is stored at half the resolution of the brightness information. This is imperceptible for natural video content (movies, camera footage) but creates visible artifacts on computer-generated content like text and UI elements.
The Chroma Subsampling Problem
Original pixel grid: 4:2:0 subsampling:
┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐
│ R │ G │ B │ Y │ │ R │ │ B │ │ ← Color samples
├───┼───┼───┼───┤ ├───┼───┼───┼───┤ at half density
│ C │ M │ W │ K │ │ │ │ │ │
├───┼───┼───┼───┤ ├───┼───┼───┼───┤
│ R │ G │ B │ Y │ │ R │ │ B │ │
├───┼───┼───┼───┤ ├───┼───┼───┼───┤
│ C │ M │ W │ K │ │ │ │ │ │
└───┴───┴───┴───┘ └───┴───┴───┴───┘
The result: colored text looks fuzzy, thin lines have color fringing, and sharp UI edges become muddy.
AVC444: Full Chroma Resolution
AVC444 (4:4:4 chroma) preserves full color resolution. Every pixel retains its exact color, resulting in perfect reproduction of text and UI elements.
Lamco RDP Server implements AVC444 using the RDP Graphics Pipeline Extension (RDPGFX) dual-stream approach:
Desktop Frame (BGRA)
│
▼
┌───────────────────┐
│ Color Convert │
│ BGRA → YUV444 │
└───────────────────┘
│
├─────────────────────────┐
▼ ▼
┌───────────────┐ ┌───────────────┐
│ Main Stream │ │ Aux Stream │
│ (Luminance) │ │ (Chroma) │
│ Y only │ │ U + V │
└───────────────┘ └───────────────┘
│ │
▼ ▼
H.264 Encode H.264 Encode
│ │
└──────────┬──────────────┘
▼
RDP Client
(recombines streams)
When to Use Each Codec
| Content Type | Recommended | Why |
|---|---|---|
| Programming/Code | AVC444 | Text clarity critical |
| Document Editing | AVC444 | Sharp text rendering |
| UI/Design Work | AVC444 | Color accuracy matters |
| Video Playback | AVC420 | Native video is already 4:2:0 |
| General Desktop | AVC444 | Best overall quality |
| Bandwidth Limited | AVC420 | ~40% less data |
Encoder Backends
OpenH264
Cisco's open-source H.264 encoder, optimized for real-time encoding.
Best for: Systems without capable GPUs, maximum compatibility
NVIDIA NVENC
Hardware encoder using NVIDIA's dedicated encoding silicon.
Best for: NVIDIA GPU systems, lowest CPU usage, best quality
VA-API
Video Acceleration API for Intel and AMD GPUs.
Best for: Intel laptops, AMD systems, open-source drivers
Bandwidth Optimization
Damage Tracking
Not every frame contains changes across the entire screen. Lamco RDP Server uses tile-based damage tracking to identify which regions actually changed.
Frame divided into 64×64 pixel tiles:
┌───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┤
│ │ ▓ │ ▓ │ │ │ │ ▓ = Changed tiles
├───┼───┼───┼───┼───┼───┤
│ │ ▓ │ ▓ │ ▓ │ │ │ (cursor moved,
├───┼───┼───┼───┼───┼───┤ text typed)
│ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┤
│ │ │ │ │ │ │
└───┴───┴───┴───┴───┴───┘
Result: 90%+ bandwidth savings for typical desktop use (static content with localized changes).
Implementation: SIMD-accelerated comparison using AVX2 (x86) or NEON (ARM).
Adaptive Frame Rate
Frame rate adjusts based on content activity to save bandwidth and battery:
Benefits: Battery savings on static content, full fluidity when needed, automatic with no user intervention.
Configuration Reference
Complete video encoding configuration:
[egfx]
enabled = true
codec = "auto" # auto, avc420, avc444
h264_level = "auto" # auto, 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2
h264_bitrate = 5000 # kbps
# Quality
qp_min = 10
qp_max = 40
qp_default = 23
# AVC444
avc444_enabled = true
avc444_aux_bitrate_ratio = 0.5
avc444_enable_aux_omission = true
avc444_max_aux_interval = 30
avc444_aux_change_threshold = 0.05
[hardware_encoding]
enabled = true
prefer_nvenc = true
vaapi_device = "/dev/dri/renderD128"
quality_preset = "balanced" # speed, balanced, quality
fallback_to_software = true
[damage]
enabled = true
tile_size = 64
diff_threshold = 0.01
merge_adjacent = true