I have a directory where new files in jpeg format are periodically emerge.
How can these files be processed one by one, waiting for the next one and convert them to a mp4 file.
I tried like this
ffmpeg -framerate 1 -i test%d.jpg -c:v libx264 -r 30 -pix_fmt yuv420p output.mp4
but ffmpeg do not wait for new files and exits.
Is there a solution?