PR #20916 opened by dashsantosh-mcw URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20916 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20916.patch
>From e7dcef8d8dee549fd8345c5d08d303e781dfd74b Mon Sep 17 00:00:00 2001 From: Harshitha <[email protected]> Date: Fri, 14 Nov 2025 01:45:44 -0800 Subject: [PATCH] doc/encoders: Document MediaFoundation encoders --- doc/encoders.texi | 91 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index b24f98946a..56e2f9008a 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -3414,11 +3414,100 @@ Maximum quantization parameter for B frame. @section MediaFoundation This provides wrappers to encoders (both audio and video) in the -MediaFoundation framework. It can access both SW and HW encoders. +MediaFoundation framework. It supports both software and hardware encoders +through the following codecs: + +@itemize +@item h264_mf +@item hevc_mf +@item av1_mf +@end itemize + Video encoders can take input in either of nv12 or yuv420p form (some encoders support both, some support only either - in practice, nv12 is the safer choice, especially among HW encoders). +Hardware-accelerated encoding is supported via D3D11, including hardware +scaling capabilities through the scale_d3d11 filter. + +To list all available options for the MediaFoundation encoders, use: +@command{ffmpeg -h encoder=h264_mf} + +@subsection Options + +@table @option +@item rate_control +Select rate control mode. Available modes: + +@table @samp +@item default +Default mode +@item cbr +CBR mode +@item pc_vbr +Peak constrained VBR mode +@item u_vbr +Unconstrained VBR mode +@item quality +Quality mode +@item ld_vbr +Low delay VBR mode (requires Windows 8+) +@item g_vbr +Global VBR mode (requires Windows 8+) +@item gld_vbr +Global low delay VBR mode (requires Windows 8+) +@end table + +@item scenario +Select usage scenario. Available scenarios: + +@table @samp +@item default +Default scenario +@item display_remoting +Display remoting scenario +@item video_conference +Video conference scenario +@item archive +Archive scenario +@item live_streaming +Live streaming scenario +@item camera_record +Camera record scenario +@item display_remoting_with_feature_map +Display remoting with feature map scenario +@end table + +@item quality +Set encoding quality (0-100). -1 means default quality. + +@item hw_encoding +Force hardware encoding (0-1). Default is 0 (disabled). + +@end table + +@subsection Examples + +Hardware encoding: +@example +ffmpeg -i input.mp4 -c:v h264_mf -hw_encoding 1 output.mp4 +@end example + +Hardware-accelerated decoding with hardware encoding: +@example +ffmpeg -hwaccel d3d11va -i input.mp4 -c:v h264_mf -hw_encoding 1 output.mp4 +@end example + +Hardware-accelerated decoding and encoding with scaling: +@example +ffmpeg -hwaccel d3d11va -hwaccel_output_format d3d11 -i input.mp4 -c:v h264_mf -hw_encoding 1 -vf scale_d3d11=1920:1080 output.mp4 +@end example + +Hardware decoding and encoding with quality setting: +@example +ffmpeg -hwaccel d3d11va -hwaccel_output_format d3d11 -i input.mp4 -c:v hevc_mf -hw_encoding 1 -quality 80 output.mp4 +@end example + @section Microsoft RLE Microsoft RLE aka MSRLE encoder. -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
