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
Compression10-50x smaller than raw frames
Hardware SupportDedicated encode/decode on all modern GPUs
LatencyDesigned for real-time streaming
CompatibilityEvery RDP client supports it
QualityExcellent 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.11280×720720p HD
4.01920×10801080p Full HD
4.11920×10801080p (higher bitrate)
5.02560×14401440p QHD
5.13840×21604K UHD
5.23840×2160 @ 60fps4K 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/CodeAVC444Text clarity critical
Document EditingAVC444Sharp text rendering
UI/Design WorkAVC444Color accuracy matters
Video PlaybackAVC420Native video is already 4:2:0
General DesktopAVC444Best overall quality
Bandwidth LimitedAVC420~40% less data

Encoder Backends

OpenH264

Cisco's open-source H.264 encoder, optimized for real-time encoding.

Availability Always (bundled)
CPU Usage Moderate-High
Quality Excellent
Latency Low
AVC444 ✓ Full support
Color VUI ✓ Full support

Best for: Systems without capable GPUs, maximum compatibility

NVIDIA NVENC

Hardware encoder using NVIDIA's dedicated encoding silicon.

Availability NVIDIA GPUs
CPU Usage Near zero
Quality Excellent
Latency Very low
AVC444 ✓ Full support
Color VUI ✓ Full support

Best for: NVIDIA GPU systems, lowest CPU usage, best quality

VA-API

Video Acceleration API for Intel and AMD GPUs.

Availability Intel/AMD GPU
CPU Usage Near zero
Quality Good-Excellent
Latency Very low
AVC444 ✓ Full support
Color VUI Limited

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:

Static 5 FPS
Low (typing) 15 FPS
Medium (scrolling) 20-30 FPS
High (video) 30-60 FPS

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