[FFmpeg-user] FFMPEG Timestamp

Luke Davis l1 at newanswertech.com
Sun Jun 29 01:40:34 CEST 2014

On Sat, 28 Jun 2014, Vahid Ghasemkhani wrote:

> I use ffmpeg to record live stream and use `-f segment` option for
> segmentation. I want to assign current Date and time as name of each output
> file.
> can any one help me?

Just shooting from the hip here, but I think you would have to modify the source 
code to create a % style substitution for the timestamp, in order for it to be 
dynamically updated for each new file.

Something like the %###d (such as %03d in the manual page) output convention. 
Printf does not have a date format with % escapes, but you could probably write 
something to grab the current timestamp from somewhere for each file written, 
when a %14t is found (for a 14 digit timestamp of YYYYMMDDhhmmss, for 

If it already has something for this, it's not covered in the documentation I 

Alternatively, use something like fam or similar to monitor the directory, and 
dynamically rename each new file, although that won't update any playlists 

Just a guess.  Not a bad feature idea though.


More information about the ffmpeg-user mailing list