You can find examples of v360 filtering (and much more) in:
by Michael Koch, email@example.com, scripts are PC based, but mostly easy to adapt. The commands are in PC/DOS form, so for Mac (and Linux) make them one-liners and enclose the filter part (after the -vf) in double quotes "". That works most of the time. To translate the PC batch files to shell scripts these resources may help:
abs-guide.pdf, Appendix N. Converting DOS Batch Files to Shell Scripts, 2014, pp.837-840,
And I find this free ffmpeg course to be valuable:
In ffmpeg (in stereo was where I found it), there is a frame size limit of ≈16000x16000 px over/under (or 32000x8000 side/side). I tried to work with 16384x16384 and it failed (2020, ffmpeg 4.3).