[PATCH] img2enc: add option to use strftime() for filename
Hello, 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
On Thu, Jul 18, 2013 at 07:21:36PM -0300, Ramiro Polla wrote:
Hello,
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
img2enc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 0ea92157647e4beef4c8500277bb940b80dcda7e 0001-img2enc-add-option-to-use-strftime-for-filename.patch From 5af884e6129f4dbac5ea06a50c3127fc89726e98 Mon Sep 17 00:00:00 2001 From: Ramiro Polla <ramiro.polla@gmail.com> Date: Thu, 18 Jul 2013 19:17:11 -0300 Subject: [PATCH] img2enc: add option to use strftime() for filename
applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can be no freedom; when there is freedom there will be no State. -- Vladimir Lenin
On date Thursday 2013-07-18 19:21:36 -0300, Ramiro Polla encoded:
Hello,
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@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. Also note that this solution is suboptimal, since we should support some form of pattern or an expansion mode like for the image2 demuxer. -- FFmpeg = Faithless Frenzy Murdering Ponderous Evil Gymnast
On Fri, Jul 19, 2013 at 5:50 AM, Stefano Sabatini <stefasab@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@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.
Attached.
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?
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@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@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.
Attached.
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
participants (3)
-
Michael Niedermayer -
Ramiro Polla -
Stefano Sabatini