[FFmpeg-devel] How to correctly use init and uninit

Paul B Mahol onemda at gmail.com
Fri Apr 19 16:08:03 EEST 2019

On 4/19/19, Ulf Zibis <Ulf.Zibis at cosoco.de> wrote:
> Am 19.04.19 um 14:35 schrieb Paul B Mahol:
>>> Do I really need the init function, as it has to do nothing in my case?
>> If it does nothing, you can safely remove it.
> Thanks!
>>> For performance testing I use the like:
>>> -f rawvideo -pix_fmt gray16 -s 400x600 -i /dev/zero
>>> Are there doubts if that is good either?
>> Use ffmpeg -f lavfi -i color=color=black:size=400x600 ...
>> Thing about /dev/zero and -f rawvideo is that it will decode zeroes
>> over and over again and thus use more CPU for that.
> Thanks again for the hint. For my tests I use different formats:
> test[i++]="3-plane 8-bit  YUV-420:   -pix_fmt yuv420p"
> test[i++]="3-plane 16-bit YUV-420:   -pix_fmt yuv420p16"
> test[i++]="3-plane 16-bit YUV-444:   -pix_fmt yuv444p16"
> test[i++]="1-plane 8-bit  Y-400:     -pix_fmt gray"
> test[i++]="1-plane 16-bit Y-400:     -pix_fmt gray16"
> test[i++]="4-plane 16-bit RGBA-444:  -pix_fmt rgba64"
> What could be the expressions with "-f lavfi"?

ffmpeg -f lavfi -i color=...,format=rgba64/gray/gray16...

This would use scale filter to convert every frame, but your case
is not depending on it.
You could also use bench filter.

More information about the ffmpeg-devel mailing list