[FFmpeg-devel] [PATCH] avcodec/mfenc: expose more properties of the media foundation encoder

Mark Thompson sw at jkqxz.net
Mon Apr 1 21:55:55 EEST 2024


On 01/04/2024 17:25, Mark Samuelson wrote:
> On Mon, Apr 1, 2024 at 10:06 AM Mark Thompson <sw at jkqxz.net> wrote:
> 
>>> On 28/03/2024 12:34, Mark Samuelson wrote:
>>>> Thank you for the notes, here is a new patch that incorporates your
>> suggestions.  You are right, the default value of 12 for gop_size is
>> suprising, I didn't know about it before now.
>>>>
>>>> ---
>>>>    libavcodec/mf_utils.h |  5 +++++
>>>>    libavcodec/mfenc.c    | 33 +++++++++++++++++++++++++++------
>>>>    2 files changed, 32 insertions(+), 6 deletions(-)
>>>
>>> Patch looks good.
>>>
>>> I did a bit of testing with the Microsoft H.264 MFT: GOP size and
>> compression level work as expected, and VBV parameters seem to be doing
>> something sensible.
>>>
>>> Under what conditions are you expecting global_quality ->
>> AVEncVideoEncodeQP to do anything, though?  When I set it alone the output
>> was always identical regardless of what value I set > it to.  (Including
>> with "-rate_control quality".)
>>>
>>> Thanks,
>>>
>>> - Mark
>>
> 
> I have also had issues making the Media Foundation encoder respect that
> value.  I put it in there so that I could easily test it, because I was
> having issues with the existing opt_enc_quality -> AVEncCommonQuality.  I
> figured it was better to leave it in so people can experiment with it.

Fair, these options are not particularly consistent between different encoder MFT implementations.

I will apply this patch tomorrow unless there are any more comments on it.

Thanks,

- Mark


More information about the ffmpeg-devel mailing list