Repository navigation
Enabling AMD AMF Decoder in HandBrake
The AMD AMF decoder in HandBrake allows for a significant encoding speed boost, by leveraging AMD's hardware acceleration.
Follow the steps below to enable and configure this feature.
HandBrake provides two ways to utilize functionality:
- Using the GUI application (HandBrake.exe)
- Using the command-line interface (HandBrakeCLI.exe)
1. Enabling the AMF Decoder in HandBrake Preferences
-
Open the Tools -> Preferences menu.
-
Navigate to the Video tab.
-
Check the box labeled:
"Prefer use of AMD AMFDec for decoding video when using the AMFEnc encoder and the hardware is available for use."- This setting enables the AMF decoder when supported hardware is available and a compatible encoder is selected.
Selecting a Compatible Encoder
To utilize the AMF decoder, ensure that one of the following encoders is selected in the main application menu under the Video tab, in the Video Encoder field:
- H.264 (AMD VCE)
- H.265 (AMD VCE)
- H.265 10-bit (AMD VCE)
- AV1 (AMD VCE)
Benefits of Enabling the AMF Decoder
- No Data Copies to CPU: Video decoding and encoding are performed directly on the GPU, reducing CPU load and improving performance.
- Increased Encoding Speed: Hardware acceleration can boost encoding speeds by an average of 25%.
Behavior When the Option is Disabled or Another Encoder is Selected
- If the checkbox is unchecked or a different encoder (e.g., x264 or x265) is selected, video data will be copied to the CPU for processing.
This will increase the overall encoding time.
Using the Scale Filter for Resolution Adjustment
AMF pipeline in HandBrake now includes support for the scale filter, allowing you to adjust the resolution of your video.
Follow these steps to configure it:
Default Resolution
- Navigate to the Dimensions tab.
- In the Resolution Limit dropdown, select the desired resolution.
- If the new resolution is larger than the current one, check the Allow Upscaling checkbox below.
Custom Resolution (e.g., 1500x700)
- Uncheck the Optimal Size checkbox.
- In the Scaled Size field, enter the desired resolution.
Verifying Your Settings
At the bottom of the Dimensions tab, review the Final Dimensions section.
This displays the resolution parameters of the output file, ensuring your settings are correctly applied.
2. Using the Command-Line Interface (HandBrakeCLI.exe)
To enable the AMF decoder in HandBrakeCLI.exe, use the following argument:
--enable-hw-decoding amfdec
Example Command
Here is an example of using the AMF decoder with HandBrakeCLI:
HandBrakeCLI.exe -i input.mp4 -o output.mp4 --enable-hw-decoding amfdec -e h264_amf --width 1920 --height 1080
Notes
- Replace
input.mp4with the path to your source video file. - Replace
output.mp4with the desired path for the output file. - The
-eoption specifies the encoder, such ash264_amf,h265_amf, orav1_amf. - Use
--widthand--heightto set the desired resolution. If upscaling is required, ensure that the source resolution is smaller than the specified dimensions.
By following these steps, you can optimize video encoding in HandBrake using AMD AMF hardware acceleration.