ffmpeg export video to 1 image In the process of creating a preview of what ffmpeg, is streaming i came up with this command:

ffmpeg -i colony.mkv -c:v libx264 -f mpegts udp://127.0.0.1:1234 -vf fps=1 -s 320x240 d:\preview\out%d.jpg


This is great, but it is outputting to a series of image files that are difficult to track:out1.jpg, out2.jpg ... etc...

When i remove the %d parameters, it throws an error saying 

[image2 @ 00000162c6a3d840] Could not get frame filename number 2 from pattern 'd:\preview\out.jpg' (either set update or use a pattern like %03d within the filename pattern)
av_interleaved_write_frame(): Invalid argument


Is there a way to do this please?
You have to use the update option.

-vf fps=1 -s 320x240 -update 1 d:\preview\out.jpg


This will rewrite onto the same file.

To avoid a possible read op in the middle of the updating, you can add -atomic_writing 1