[FFmpeg-trac] #8415(avformat:new): image2 strftime %z not supported

FFmpeg trac at avcodec.org
Wed Dec 18 02:19:49 EET 2019


#8415: image2 strftime %z not supported
-------------------------------------+------------------------------------
             Reporter:  ap           |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avformat
              Version:  unspecified  |               Resolution:
             Keywords:  image2       |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------

Comment (by AlexSmith):

 I see your command line specifies output as this:

 {{{
 "test\%%Y%%m%%d%%H%%M%%S%%z.jpg"
 }}}

 It may be a typo, but the correct pattern should be this:

 {{{
 "test\%Y%m%d%H%M%S%z.jpg"
 }}}

 By inspecting the
 [http://git.ffmpeg.org/gitweb/ffmpeg.git/blob_plain/HEAD:/libavformat/img2enc.c
 source code], you can see, at line 99, ffmpeg uses strftime() from the
 system's time.h, so, unless you have a problem with your system libs, it
 should work just fine.

 I don't have a Windows box to test it, but in Linux, this command line:

 {{{
 ffmpeg -nostdin -loglevel debug -f v4l2 -r 1 -i /dev/video0 -f image2
 -strftime 1 -y "/tmp/%Y%m%d%H%M%S%z.jpg"
 }}}

 generates this output files:

 {{{
 ...
 [image2 @ 0x555557c49b40] Opening '/tmp/20191218000441+0000.jpg' for
 writing
 [file @ 0x555557cfadc0] Setting default whitelist 'file,crypto'
 [AVIOContext @ 0x555557cfaec0] Statistics: 0 seeks, 1 writeouts
 [rawvideo @ 0x555557c496c0] PACKET SIZE: 614400, STRIDE: 1280
 [image2 @ 0x555557c49b40] Opening '/tmp/20191218000504+0000.jpg' for
 writing
 ...
 }}}

 I'm using the latest git version.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8415#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list