Table of Contents

Enum H264AMFRateControlMethod

Namespace
VisioForge.Core.Types.FFMPEGEXE
Assembly
VisioForge.Core.dll

Represents the rate control method settings for the AMD H.264 AMF hardware encoder.

public enum H264AMFRateControlMethod

Fields

CQP = 0

Constant Quantization Parameter - Fixed quality encoding.

CQP (Constant QP) mode characteristics:

  • Uses fixed quantization parameter for all frames
  • Produces consistent quality across the video
  • Variable bitrate output
  • No bitrate constraints

VCE implementation:

  • Hardware bypasses rate control logic
  • Minimal encoding latency
  • Predictable quality results
  • Simple and fast operation

Quality control:

  • QP range: 0-51 (lower = better quality)
  • QP 0: Lossless (if supported)
  • QP 18-23: Visually lossless range
  • QP 23-28: High quality
  • QP 28-35: Standard quality
  • QP 35+: Low quality

Use cases:

  • Quality benchmarking
  • Intermediate/mezzanine files
  • When storage is not a constraint
  • Archival masters
  • Quality-critical workflows

FFMPEG: -rc cqp -qp_i 23 -qp_p 23 -qp_b 23

Advantages:

  • Predictable quality
  • Fast encoding
  • No quality fluctuations

Disadvantages:

  • Unpredictable file sizes
  • Not suitable for streaming
  • Can waste bits on simple scenes
CBR = 1

Constant Bitrate - Fixed bitrate for streaming compatibility.

CBR (Constant Bitrate) mode characteristics:

  • Maintains specified average bitrate
  • Minimal bitrate variation (±10%)
  • Quality varies to meet bitrate target
  • Predictable bandwidth usage

VCE hardware features:

  • Hardware rate control with lookahead
  • HRD (Hypothetical Reference Decoder) compliance
  • VBV (Video Buffering Verifier) buffer management
  • Real-time bitrate adjustment

Buffer management:

  • VBV buffer size affects quality stability
  • Smaller buffers = more consistent bitrate
  • Larger buffers = better quality adaptation
  • Typical: 1-2 seconds of video

Applications:

  • Live streaming platforms
  • Broadcast television
  • Video conferencing
  • Fixed bandwidth channels
  • IPTV systems

FFMPEG: -rc cbr -b:v 5M -maxrate 5M -bufsize 10M

Quality considerations:

  • Complex scenes may show artifacts
  • Simple scenes may waste bandwidth
  • Requires careful bitrate selection
  • Consider VBR for better quality

Tips:

  • Set maxrate = target bitrate
  • Set bufsize = 1-2x bitrate
  • Enable HRD compliance for broadcast
  • Use filler data for strict CBR
VBRPeak = 2

Peak Constrained Variable Bitrate - Quality-focused with bitrate limits.

VBR Peak mode characteristics:

  • Variable bitrate with maximum limit
  • Quality-based encoding decisions
  • Efficient bit allocation
  • Prevents bitrate spikes

AMD VCE optimization:

  • Multi-pass analysis in hardware
  • Intelligent bit redistribution
  • Scene complexity detection
  • Adaptive quantization

Bitrate behavior:

  • Target: Average bitrate goal
  • Peak: Maximum allowed bitrate
  • Typical peak = 1.5-2x target
  • Saves bits on simple scenes
  • Uses more bits for complex scenes

Quality benefits:

  • 20-30% better quality than CBR
  • Consistent perceived quality
  • Efficient bandwidth usage
  • Handles scene changes well

Ideal for:

  • VOD streaming services
  • Progressive download
  • High-quality web video
  • Blu-ray encoding
  • Content with variable complexity

FFMPEG: -rc vbr_peak -b:v 5M -maxrate 10M -bufsize 20M

Configuration tips:

  • Set peak 1.5-2x average bitrate
  • Larger bufsize = better quality
  • Monitor average bitrate achieved
  • Adjust target based on content

Note: Requires player buffer for peak rates. Not suitable for strict bandwidth limits.

VBRLatency = 3

Latency Constrained Variable Bitrate - Low-latency VBR for live applications.

VBR Latency mode characteristics:

  • Variable bitrate with latency constraints
  • Limited lookahead for fast decisions
  • Balance of quality and responsiveness
  • Suitable for real-time encoding

VCE low-latency optimizations:

  • Reduced frame buffering
  • Fast rate control decisions
  • Minimal encoding pipeline delay
  • Hardware-accelerated analysis

Latency specifications:

  • Frame delay: 1-3 frames typical
  • Decision window: 0.5-1 second
  • Bitrate adjustment: Per-frame
  • Buffer requirements: Minimal

Quality vs latency trade-off:

  • Better than CBR quality
  • Lower latency than VBR Peak
  • Some quality loss vs full VBR
  • Good scene change handling

Perfect for:

  • Live game streaming
  • Interactive broadcasts
  • Cloud gaming
  • Remote desktop
  • WebRTC applications

FFMPEG: -rc vbr_latency -b:v 5M -maxrate 7M -bufsize 5M

Optimization strategies:

  • Keep bufsize small (0.5-1x bitrate)
  • Set conservative peak rates
  • Monitor encoding latency
  • Adjust quality preset for speed

Advantages over CBR:

  • Better quality on average
  • Handles motion better
  • More efficient bandwidth use

Note: Newer VCE versions (3.0+) excel at this mode with hardware-specific optimizations.

Remarks

Rate control determines how the encoder allocates bits across frames to achieve target quality or bitrate. AMD's VCE hardware implements these methods with dedicated silicon for real-time rate control decisions.

Each method offers different trade-offs:

  • Quality consistency vs. bitrate predictability
  • Latency vs. quality optimization
  • Buffer requirements vs. quality variance
  • Network compatibility vs. efficiency

The VCE hardware includes dedicated rate control units that work in parallel with the encoding pipeline for minimal latency impact.

FFMPEG usage: -c:v h264_amf -rc [cqp|cbr|vbr_peak|vbr_latency]