I am using this command to convert to flat a small region of an equirectangular image (BTW: how can I specify how much large the section is?):
ffmpeg -hide_banner -i input.png -vf v360=e:flat -y output1.png
The I modify the cropping as I need:
Then I convert it back to equirectangular:
ffmpeg -hide_banner -i output1.png -vf v360=flat:e -y output2.png
I get a big equirectangular white image, with my section in the center:
Now I want to overlay it to the original image...
ffmpeg -hide_banner -i input.png -i output2.png -filter_complex "overlay" -y output3.png
... but of course the original image is completely hidden by the white part of output2.png, unless I manually open it in IrfanView, set the white as transparent, and save the image before overlaying it on the original image.
Can I use FFMpeg to set as transparent the white part of the image without usaing IrfanView? I experimented randomly with fillcolor and color, but I don't get it.
But there is an additional issue: the color which ffmpeg uses to fill the empty area surrounding the cropping is not always the same: it's white in this example, but in other tests it is light gray, dark grey, other colors, so a side question is:
- How can I specify the color used by ffmpeg to surround the cropping converted to equirectangular?
- If I cannot specify the color to be used, can I at least use ffmpeg to read it, so I can then use it as transparent color?