As far as I can tell from the ffmpeg docs, they don't provide a way to use timestamps in the filename rather than sequential numbers. What they provide allows you to create 0001.jpg, 0002.jpg, 0003.jpg but not 2011-08-01 7:30:00.jpg, 2011-08-01 7:30:01.jpg, 2011-08-01 7:30:02.jpg. Can anyone think of a solution that could take the sequentially named files from ffmpeg and name them using their created time?
At least the newer versions of ffmpeg have the strftime option that allow you to do what you want.
For example:
ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 "%Y-%m-%d_%H-%M-%S.jpg"
Will generate files such as:
2015-11-20_16-25-06.jpg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With