ffmpeg filename output format

I hacked up a bash script that creates file names based on time into the film. It uses a format: "hh_mm_ss" in the file name. You can see it at:

https://github.com/pozar/makemoviethumbs


Turns out this behavior was not yet implemented at the time.

I implemented an initial version of %t support on my fork of FFmpeg (https://github.com/yuvadm/FFmpeg), and am currently working on cleaning up the patch so that it can be merged upstream.


The strftime option allows you to expand the filename with date and time information. Check the documentation of the strftime() function for the syntax.

For example to generate image files from the strftime() %Y-%m-%d_%H-%M-%S pattern, the following ffmpeg command can be used:

ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 "%Y-%m-%d_%H-%M-%S.jpg"

Tags:

Ffmpeg