[FFmpeg-user] Why is format=rgb24 required after maskedmerge?

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed Aug 19 20:55:54 EEST 2020


Am Di., 18. Aug. 2020 um 14:44 Uhr schrieb Michael Koch
<astroelectronic at t-online.de>:

> c:\ffmpeg\ffmpeg -i red.mp4 -i yellow.mp4 -i mergemap.png -lavfi
> "[0]format=rgb24,v360=input=fisheye:output=e:ih_fov=200:iv_fov=200[a];[1]format=rgb24,v360=input=fisheye:output=e:yaw=180:ih_fov=200:iv_fov=200[b];[a][b][2]maskedmerge,format=rgb24,format=yuv422p"
> -y out.mp4
>
>
> This works fine and the output video looks as expected. My
> question is why "format=rgb24" is required

I believe it was already explained why it really is required in this case.

Also important to mention imo is that in general, the automatic pix_fmt
conversion cannot always succeed, the system as a whole is not and
cannot be clairvoyant.
Therefore, for a sufficiently complex filter-chain, you have to force
conversions with format because without it, the conversion decisions
may be wrong (or at least not optimal).

Carl Eugen


More information about the ffmpeg-user mailing list