[FFmpeg-devel] [PATCH v4 0/5] ffmpeg: late A/V encoder init, AVFrame metadata usage

Jan Ekström jeebjp at gmail.com
Wed Oct 28 16:58:38 EET 2020


On Tue, Oct 27, 2020 at 8:30 PM Jan Ekström <jeebjp at gmail.com> wrote:
>
> This patch set started with a very simple wish to not have to set color
> related values manually each time when utilizing ffmpeg.c.
>
> As of the fourth iteration, the following changes were done since the third:
> 1. The data size threshold patch was moved to be the first one, thus meaning
>    that there is no case of it not being applied, and the encoder initialization
>    being moved later.
> 2. As noted by Anton, as the encoder options are applied after the
>    AVFrame-based configuration, that code can be simplified to just
>    simple passing of values instead of first checking if the option is
>    set in the dictionary.
> 3. Interlaced/progressive and field order decision making commit has been
>    reworded to include an explanation of the FATE test changes.
>
> Unfortunately, audio still needs two locations where the encoder is
> initialized, due to how avfilter_graph_request_oldest peeks and already puts
> one AVFrame to be available from the filter graph (which is then utilized
> as-is as an early return inside both av_buffersink_get_frame_flags and
> av_buffersink_get_samples). If this would be improved in lavfi (or the call
> to avfilter_graph_request_oldest removed), we could at least remove one of
> these.
>
> Currently limited to using values for video and started with the basic values,
> more can be added later if needed.
>
> This probably fixes some trac issues, but with a quick look I couldn't find
> anything that explicitly was due to lack of video color metadata passthrough.
>

Received an approval from Anton, so unless there are objections I will
be pulling this set in tomorrow evening.

For those still wanting to test out and preferring to utilize git for
getting the patch set,
https://github.com/jeeb/ffmpeg/commits/late_encoder_init_v7 is
available.

Jan


More information about the ffmpeg-devel mailing list