FFmpeg DNxHR Video Bitrate Settings Guide
This article explains how to properly configure the video bitrate when encoding to the DNxHR codec using FFmpeg. You will learn why traditional bitrate flags do not work for DNxHR, how this professional intermediary codec manages quality through profiles, and the exact FFmpeg commands required to achieve your desired output.
The DNxHR Profile System
Unlike delivery codecs like H.264 or HEVC, you cannot set a custom,
arbitrary bitrate using the -b:v flag when encoding to
DNxHR in FFmpeg. DNxHR (Digital Nonlinear Extensible High Resolution) is
a profile-driven codec designed by Avid. The bitrate is automatically
determined by a combination of the chosen quality profile, the video
resolution, and the frame rate.
To control the quality and resulting bitrate of your DNxHR encode,
you must use the -profile:v option to select one of the
five official DNxHR profiles:
dnxhr_lb(Low Bandwidth): Ideal for offline editing and draft exports. It uses 8-bit color representation and has the lowest bitrate.dnxhr_sq(Standard Quality): Suitable for delivery and medium-quality editing. It uses 8-bit color.dnxhr_hq(High Quality): The standard for high-quality mastering and editing. It uses 8-bit color.dnxhr_hqx(High Quality 10-bit): Designed for high-quality mastering, color grading, and visual effects. It supports 10-bit color.dnxhr_444(4:4:4): The highest quality profile, offering 10-bit color depth and full 4:4:4 chroma subsampling for heavy visual effects work.
Correct FFmpeg Command Syntax
To encode to DNxHR, you must use the dnxhd encoder
wrapper in FFmpeg. You must also specify the correct pixel format
(-pix_fmt) that corresponds to your chosen profile,
otherwise the command will fail.
Example 1: Standard Quality (DNxHR SQ)
Use this command for standard 8-bit editing workflows. It uses
yuv422p pixel format.
ffmpeg -i input.mp4 -c:v dnxhd -profile:v dnxhr_sq -pix_fmt yuv422p output.movExample 2: High Quality 10-Bit (DNxHR HQX)
Use this command for color grading or high-fidelity mastering. It
uses yuv422p10le pixel format to support 10-bit color.
ffmpeg -i input.mp4 -c:v dnxhd -profile:v dnxhr_hqx -pix_fmt yuv422p10le output.movExample 3: Full Chroma 4:4:4 (DNxHR 444)
Use this command for maximum fidelity and archiving. It uses
yuv444p10le pixel format.
ffmpeg -i input.mp4 -c:v dnxhd -profile:v dnxhr_444 -pix_fmt yuv444p10le output.movTroubleshooting Common Errors
If you attempt to run an encode and receive a “Frame rate/resolution not supported” or “Invalid pixel format” error, ensure that:
- You have set the correct pixel format: DNxHR is
highly strict.
dnxhr_hqxanddnxhr_444require 10-bit pixel formats (yuv422p10leandyuv444p10le), whilednxhr_lb,dnxhr_sq, anddnxhr_hqrequire 8-bit pixel formats (typicallyyuv422p). - You are using the
-c:v dnxhdencoder: FFmpeg uses the same encoder library for both older DNxHD (which is limited to HD resolutions) and DNxHR. The encoder will automatically switch to DNxHR mode when a DNxHR profile is specified.