Class HEVCAMFSettings
- Namespace
- VisioForge.Core.Types.FFMPEGEXE
- Assembly
- VisioForge.Core.dll
H.265/HEVC AMD Advanced Media Framework (AMF) encoder settings for GPU-accelerated encoding.
public class HEVCAMFSettings : BasicVideoSettingsInheritance
Inherited Members
Remarks
The HEVC AMF encoder provides hardware-accelerated H.265/HEVC encoding using AMD GPU hardware (Video Coding Engine). Compared to H.264 AMF, HEVC offers 25-50% better compression efficiency, making it ideal for 4K content and bandwidth-constrained scenarios.
Hardware requirements: - AMD GPU: Radeon RX 460 or newer (VCE 3.4+ for HEVC) - APUs: AMD Ryzen 2000 series or newer with Vega graphics - Drivers: Latest AMD drivers with AMF HEVC support - Windows 10 or newer (recommended)
HEVC VCE version support: - VCE 3.4: Basic HEVC encoding (Polaris - RX 400/500 series) - VCE 4.0+: Improved HEVC quality and performance (Vega - RX Vega series) - VCE 5.0+: Enhanced HEVC features (RDNA - RX 5000 series) - VCE 6.0+: Further improvements, HDR10 support (RDNA2 - RX 6000 series) - VCE 7.0+: AV1 support alongside HEVC (RDNA3 - RX 7000 series)
FFMPEG integration: Basic usage: ffmpeg -i input.mp4 -c:v hevc_amf -quality balanced -b:v 10M output.mp4 HDR usage: ffmpeg -i input_hdr.mp4 -c:v hevc_amf -profile:v main10 output.mp4
Performance characteristics: - Encoding speed: 2-8x faster than software HEVC (x265) - Real-time 4K encoding on mid-range GPUs - Lower power consumption than CPU encoding - Quality: Good, approaching x265 medium preset - Latency: Sub-frame latency in specific modes
Best practices: - Use Main10 profile for HDR content or 10-bit sources - Enable VBAQ for better quality distribution - Configure QP ranges for quality control - Pre-analysis improves quality at cost of latency - Consider hardware limitations for concurrent sessions
Constructors
HEVCAMFSettings()
Initializes a new instance of the VisioForge.Core.Types.FFMPEGEXE.HEVCAMFSettings class with recommended defaults.
public HEVCAMFSettings()Remarks
Default configuration: - Encoder: HEVC AMF (hevc_amf) - Aspect Ratio: Auto (0:0) - Resolution: Auto (0x0, will use source resolution) - Usage: Transcoding - Profile: Main (8-bit) - Level: Auto - Quality Mode: Speed - Rate Control: CBR - VBAQ: Disabled - PreAnalysis: Disabled
Recommended adjustments for common scenarios:
For 4K HDR content: - Set Profile to Main10 - Set QualityMode to Balanced or Quality - Enable VBAQ for better quality - Use appropriate bitrate (15-40 Mbps)
For low-latency streaming: - Set Usage to UltraLowLatency or LowLatency - Use CBR rate control - Disable PreAnalysis - Set Quality Mode to Speed
For maximum quality: - Set QualityMode to Quality - Enable VBAQ - Enable PreAnalysis (if latency not critical) - Use VBR rate control - Configure appropriate QP ranges
Properties
AUD
Inserts AU Delimiter NAL unit. Default: false.
public bool AUD { get; set; }Property Value
EnforceHRD
Enforce HRD. Default: false.
public bool EnforceHRD { get; set; }Property Value
FillerData
Filler Data Enable. Default: false.
public bool FillerData { get; set; }Property Value
GOPsPerIDR
Gets or sets the GOPs per IDR. 0 - no IDR will be inserted.
public int GOPsPerIDR { get; set; }Property Value
HeaderInsertionMode
Gets or sets the header insertion mode.
public HEVCAMFHeaderInsertionMode HeaderInsertionMode { get; set; }Property Value
Level
Profile level.
public HEVCAMFLevel Level { get; set; }Property Value
MEHalfPel
Enable ME Half Pixel. Default: true.
public bool MEHalfPel { get; set; }Property Value
MEQuarterPel
Enable ME Quarter Pixel. Default: true.
public bool MEQuarterPel { get; set; }Property Value
MaxAUSize
Maximum Access Unit Size for rate control (in bits). Range: 0 to INT_MAX. Default: 0.
public int MaxAUSize { get; set; }Property Value
MaxQPI
Max quantization Parameter for I-Frame. Range: -1 to 51. Default: -1.
public int MaxQPI { get; set; }Property Value
MaxQPP
Max quantization Parameter for P-Frame. Range: -1 to 51. Default: -1.
public int MaxQPP { get; set; }Property Value
MinQPI
Min quantization Parameter for I-Frame. Range: -1 to 51. Default: -1.
public int MinQPI { get; set; }Property Value
MinQPP
Min quantization Parameter for P-Frame. Range: -1 to 51. Default: -1.
public int MinQPP { get; set; }Property Value
PreAnalysis
Pre-Analysis Mode. Default: false.
public bool PreAnalysis { get; set; }Property Value
Profile
Gets or sets the H.265/HEVC profile that defines encoding features and bit depth.
public HEVCAMFProfile Profile { get; set; }Property Value
Remarks
HEVC profiles for AMF: - Main: 8-bit 4:2:0 (standard for most content) - Main10: 10-bit 4:2:0 (HDR content, better quality)
Main10 profile is essential for: - HDR10, HDR10+, and HLG content - 10-bit source material - Reduced color banding - Premium quality archival
Hardware support: - Main: All HEVC-capable AMD GPUs - Main10: RX 460+ (VCE 3.4 and newer)
Default: Main FFMPEG usage: -profile:v [main|main10]
QPI
Quantization Parameter for I-Frame. Range: -1 to 51. Default: -1.
public int QPI { get; set; }Property Value
QPP
Quantization Parameter for P-Frame. Range: -1 to 51. Default: -1.
public int QPP { get; set; }Property Value
QualityMode
Quality mode.
public HEVCAMFQuality QualityMode { get; set; }Property Value
RateControl
Rate Control method.
public HEVCAMFRateControlMethod RateControl { get; set; }Property Value
SkipFrame
Rate Control Based Frame Skip. Default: false.
public bool SkipFrame { get; set; }Property Value
Usage
Gets or sets the encoder usage preset that optimizes for specific use cases.
public AMFEncoderUsage Usage { get; set; }Property Value
Remarks
Usage preset configures internal encoder parameters for different scenarios, affecting latency, quality, and performance characteristics.
For HEVC encoding: - Transcoding: Balanced for file-to-file conversion - UltraLowLatency: Minimizes encoding latency for live streaming - LowLatency: Reduced latency for interactive applications - Webcam: Optimized for webcam/screen capture sources
Default: Transcoding FFMPEG usage: -usage [transcoding|ultralowlatency|lowlatency|webcam]
VBAQ
Gets or sets a value indicating whether Variance Based Adaptive Quantization (VBAQ) is enabled.
public bool VBAQ { get; set; }Property Value
Remarks
VBAQ is AMD's adaptive quantization algorithm that analyzes frame variance to intelligently distribute bits. It allocates more bits to complex/detailed regions and fewer bits to flat/simple areas.
Benefits: - Improved perceived quality at same bitrate - Better detail preservation in complex scenes - Reduced artifacts in flat areas - More efficient bit distribution
Trade-offs: - Slightly increased encoding complexity - Minimal performance impact on modern GPUs - May increase bitrate variability in VBR modes
Recommended for most use cases except where absolutely minimal latency is required.
Default: false FFMPEG usage: -vbaq 1