--- layout: default category: "OBS" title: "High Quality Recording (in OBS Studio) with H.264/AVC" comments: true date: "2023-05-05" redirect_from: - /guides/high-quality-recordings/x264/ - /guides/high-quality-recordings/h264/ ---

The H.264/AVC codec is one of the oldest, and yet still one of the most versatile codecs out there. It is (relatively) simple to encode and decode, supports a variety of chroma subsampling and bit depths, and is one of the first codecs for stereoscopic video.

# x264

Option | Lossless | Near Lossless | Indistinguishable | High Quality | Acceptable Quality
--- | --- | --- | --- | --- | ---
Rate Control | CRF
CRF | 0 | 0 to 4 | 5 to 10 | 11 to 16 | 17 to 22
Keyframe Interval | 1
Preset | ultrafast - placebo A slower preset only affects file size, quality should be unaffected.
Profile | None or high The `high` profile is required for 4:4:4 and 4:2:2 encoding.
Tune | None Tuning can slightly improve compression efficiency, but often harms it instead.
x264 Options | `bframes=0 keyint=1 min-keyint=1` |
OBS Color Format | 4:4:4 | 4:4:4 or 4:2:2 | 4:4:4, 4:2:2 or 4:2:0

For empty fields, look further left.

# AMD AMF

## Built-In

Option | Lossless | Near Lossless | Indistinguishable | High Quality | Acceptable Quality
--- | --- | --- | --- | --- | ---
Rate Control | N/A | CQP
CQ Level | 5 - 10 | 11 - 16 | 17 - 22+
Profile | Speed
Max B-frames | Any, but less may be faster
AMF/FFmpeg Options | `profile_tier=high preanalysis=false vbaq=false filler_data=false skip_frame=false`
OBS Color Format | 4:2:0

For empty fields, look further left.

### Additional Notes

- AMDs H264 encoder is only capable of 4:2:0 SDR (8bit).
- You can freely adjust the Key-Frame Interval for anything but Lossless. Lossless will (and should) always produce an IDR-Frame every frame.

# Intel QSV

## Built-In

Option | Lossless | Near Lossless | Indistinguishable | High Quality | Acceptable Quality
--- | --- | --- | --- | --- | ---
Rate Control | N/A | CQP
CQQ | 5 - 10 | 11 - 16 | 17 - 22+
Target Usage | veryfast
Profile | high
Keyframe Interval | 1
Latency | normal
B Frames | 0
OBS Color Format | 4:2:0

For empty fields, look further left.

### Additional Notes

- OBS Studio does not export 4:2:2 and 4:4:4 support for QSV.
- Intels QSV H.264 encoder is tied to CPU usage, so it may perform worse than x264 would.
- You can freely adjust the Key-Frame Interval for anything but Lossless. Lossless will (and should) always produce an IDR-Frame every frame.

# NVIDIA NVENC

## StreamFX

Option | Lossless | Near Lossless | Indistinguishable | High Quality | Acceptable Quality
--- | --- | --- | --- | --- | ---
Preset | Fastest (P1)
Tune | Lossless | High Quality
H264
Profile | High 4:4:4 Predictive | High 4:4:4 Predictive (when using I444) High (when using NV12)
Level | Automatic
Rate Control Options
Mode | Constant Quantization Parameter
Multi-Pass | Single Pass
Look Ahead | 0 frames
Adaptive I-Frames | Disabled
Adaptive B-Frames | Disabled
Quantization Parameters
I-Frame QP P-Frame QP B-Frame QP | 0 | 0 to 4 | 5 to 10 | 11 to 16 | 17 to 22+
Adaptive Quantization
Spatial Adaptive Quantization | Disabled
Temporal Adaptive Quantization | Disabled
Other Options
Maximum B-Frames | Any
B-Frame Reference Mode | Any
Zero Latency | Default
Weighted Prediction | Default
Non-reference P-Frames | Default
Reference Frames | -1 frames
Low Delay Key-Frame Scale | -1
Key Frames
Interval Type | Frames | Any
Interval | 1 frame | Any
OBS Color Format | 4:4:4 | 4:4:4 or 4:2:0

For empty fields, look further left.

## Built-In

Option | Lossless | Near Lossless | Indistinguishable | High Quality | Acceptable Quality
--- | --- | --- | --- | --- | ---
Rate Control | N/A | CQP
CQ Level | 0 - 4 | 5 - 10 | 11 - 16 | 17 - 22+
Preset | P1: Fastest (Lowest Quality)
Tuning | High Quality
Multipass Mode | Single Pass
Profile | high
Look-ahead | Disabled
Psycho Visual Tuning | Disabled
Max B-frames | 0
OBS Color Format | 4:4:4 | 4:4:4 or 4:2:0

For empty fields, look further left.

### Additional Notes

- You can freely adjust the Key-Frame Interval for anything but Lossless. Lossless will (and should) always produce an IDR-Frame every frame.

Back to the Guide