[FFmpeg-user] watch a folder for new images

Michael Koch astroelectronic at t-online.de
Sat Jan 29 22:41:03 EET 2022

Am 29.01.2022 um 20:36 schrieb Michael Koch:
> Hello,
> is it possible to watch a folder for new images (like 
> fileSystemWatcher in C#), and if a new image appears, then load it in 
> FFmpeg? The question is for Windows.
> Very large PNG images (about 30 Megapixels) are written to the folder 
> every 5 seconds. I want to load these images, extract the four 
> corners, enlarge them by a factor 10, stack the four images together 
> and show the result on the screen, until the next image appears. The 
> filtering is no problem, the question is only how to watch the folder 
> for new images.

I did try to read the same image again and again with this command line:

ffmpeg -loop 1 -i input.png -window_x 0 -window_y 0 -f sdl2 -

I was hoping that I could overwrite the input image by another image, 
but that doesn't work. Access denied, because the file is open in FFmpeg.

Any other ideas?


More information about the ffmpeg-user mailing list