I tried saving image from my webcam, since strftime in ffmpeg 4.2.2 does not provide microseconds, to avoid overwriting the image in the same seconds, I plan to use both strftime and sequence number.
ffmpeg -i /dev/video0 -f image2 "%04d.jpg"
gives 0001.jpg, 0002.jpg
ffmpeg -i /dev/video0 -f image2 -strftime 1 "%F_%H-%M-%S.jpg"
gives 2020-07-25_01-02-03.jpg, 2020-07-25_01-02-04.jpg ...
ffmpeg -i /dev/video0 -f image2 "%F_%H-%M-%S_%%04d.jpg"
gives 2020-07-25_01-02-03_%04d.jpg, 2020-07-25_01-02-04_%04d.jpg ...
I would expect the %%04d will be replaced with numbers, but it does not. Is there any other solution?