1
I'm running web app that is using ffmpeg to convert image + audio to video and sometimes someone happens to upload something that will make ffmpeg run forever on 100% CPU until the whole drive is filled.
It happens when someone uploads some corrupted or weird file, or recently I was able to catch that it also happens when there is image instead of audio (has to do something with -loop)
ffmpeg -loop 1 -r 1 -i image.jpg -i image2.jpg -vcodec libx264 -acodec copy -xerror -preset ultrafast -r 1 -shortest out.mp4
I know I could validate user input, but this should be not happening. What ffmpeg query would prevent this, but also would provide identical file?
I tried adding -stimeout or -timeout but it didn't work.