Opened 6 years ago

Closed 6 years ago

#4104 closed enhancement (fixed)

add strftime to segment muxer

Reported by: illumilore Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: segment
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: yes


Since the documentation for the segment muxer says "Output filename pattern can be set in a fashion similar to image2." there should also be a strftime option for segment as well.
Being able to input the current time or day into a filename would be useful when using ffmpeg to record constant security video streams that need to be converted into segments for watchability.

Change History (2)

comment:1 Changed 6 years ago by cehoyos

  • Component changed from undetermined to avformat
  • Keywords segment added
  • Priority changed from normal to wish
  • Version changed from unspecified to git-master

comment:2 Changed 6 years ago by saste

  • Analyzed by developer set
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in:

commit 202947a0665ea523022afb0a6c50eed96bcd6b69
Author: Pedro E. M. Brito <>
Date:   Sun Dec 28 05:35:34 2014 -0200

    libavformat/segment.c: Add strftime expansion for segment filename templates
    Allows expansion of the filename template with strftime() with the option
    -strftime 1 (disabled by default). This allows segments to be named by time 
    creation, adding some flexibility.
    Fixes Ticket 4104 (add strftime to segment muxer)
    Signed-off-by: Pedro E. M. Brito <>
    Signed-off-by: Michael Niedermayer <>
Note: See TracTickets for help on using tickets.