[FFmpeg-devel] [PATCH] img2enc: add option to use strftime() for filename
stefasab at gmail.com
Wed Jan 8 10:28:44 CET 2014
On date Wednesday 2014-01-08 02:49:42 -0200, Ramiro Polla encoded:
> On Fri, Jul 19, 2013 at 5:50 AM, Stefano Sabatini <stefasab at gmail.com> wrote:
> > On date Thursday 2013-07-18 19:21:36 -0300, Ramiro Polla encoded:
> >> Attached patch adds option to use strftime() for img2enc filename, as such:
> >> ffmpeg -f video4linux2 -r 1 -re -i /dev/video0 -strftime 1
> >> "%Y-%m-%d_%H-%M-%S.jpg"
> >> Ramiro
> >> From 5af884e6129f4dbac5ea06a50c3127fc89726e98 Mon Sep 17 00:00:00 2001
> >> From: Ramiro Polla <ramiro.polla at gmail.com>
> >> Date: Thu, 18 Jul 2013 19:17:11 -0300
> >> Subject: [PATCH] img2enc: add option to use strftime() for filename
> >> ---
> >> libavformat/img2enc.c | 11 +++++++++++
> >> 1 file changed, 11 insertions(+)
> > Please send documentation updates, also the example stays better in
> > the docs than in the log.
Pushed with various edits.
> > Also note that this solution is suboptimal, since we should support
> > some form of pattern or an expansion mode like for the image2 demuxer.
> Could you please explain more in depth how this should work?
After six months I probably forgot what I wanted to say, but I guess
strftime per se is not bad. Ideally it would be better to have
something like -pattern_type as in the image2 demuxer, so that if we
add another "expansion mode" then we don't have to check things like
-strftime 1 -pts 1 (this can be fixed deprecating strftime when the
times come). This would also allow to override the update option.
At some point it would be useful to generate a custom output pattern,
for example to print the microseconds of the output PTS, and make the
image2 demuxer be able to read from such a pattern.
FFmpeg = Frenzy & Fast Multimedia Practical Encoding/decoding Genius
More information about the ffmpeg-devel