Zend certified PHP/Magento developer

ffmpeg cropping: ‘Invalid too big or non positive size for width ‘2304’ or height ‘4096’

i’m trying to crop video to format 1080:1920, it works with most videos but sometimes it fails “Invalid too big or non positive size for width ‘2304’ or height ‘4096’”

this is the code I use ffmpy.FFmpeg(inputs={"input.mp4": None}, outputs={"output.mp4": ["-y", "-vf", "crop=ih*(9/16):ih,scale=1080:1920", "-preset", "ultrafast"]})