title: FFmpeg: Could not get frame filename with strftime
body: <p>I want to have a timestamp in my JPEG files generated by FFmpeg.
  I'm getting the above error message when executing FFmpeg like this:</p>
  
  <pre><code>ffmpeg -f dshow -framerate 50 -i video="XI100DUSB-HDMI Video" -strftime 1 "%Y-%m-%d_%H-%M-%S_thumb%04d.jpg"
  </code></pre>
  
  <p>It also says:</p>
  
  <p>av_interleaved_write_frame(): Invalid argument</p>
  
  <p>What am I doing wrong?
  Thanks!</p>
  
  <p><strong>Complete FFmpeg output:</strong></p>
  
  <pre><code>ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 5.4.0 (GCC)
    configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-li
  bopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
    libavutil      55. 34.100 / 55. 34.100
    libavcodec     57. 64.100 / 57. 64.100
    libavformat    57. 56.100 / 57. 56.100
    libavdevice    57.  1.100 / 57.  1.100
    libavfilter     6. 65.100 /  6. 65.100
    libswscale      4.  2.100 /  4.  2.100
    libswresample   2.  3.100 /  2.  3.100
    libpostproc    54.  1.100 / 54.  1.100
  Input #0, dshow, from 'video=XI100DUSB-HDMI Video':
    Duration: N/A, start: 777552.702000, bitrate: N/A
      Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 50 fps, 50 tbr, 10000k tbn, 10000k tbc
  [swscaler @ 0000000001c8c940] deprecated pixel format used, make sure you did set range correctly
  [mjpeg @ 0000000001c7ea60] removing common factors from framerate
  Output #0, image2, to '%Y-%m-%d_%H-%M-%S_thumb%04d.jpg':
    Metadata:
      encoder         : Lavf57.56.100
      Stream #0:0: Video: mjpeg, yuvj422p(pc), 1920x1080, q=2-31, 200 kb/s, 50 fps, 50 tbn, 50 tbc
      Metadata:
        encoder         : Lavc57.64.100 mjpeg
      Side data:
        cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
  Stream mapping:
    Stream #0:0 -&gt; #0:0 (rawvideo (native) -&gt; mjpeg (native))
  Press [q] to stop, [?] for help
  [image2 @ 0000000001c7afe0] Could not get frame filename with strftime
  av_interleaved_write_frame(): Invalid argument
  frame=    1 fps=0.0 q=7.9 Lsize=N/A time=00:00:00.02 bitrate=N/A speed=0.687x
  video:101kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
  [dshow @ 0000000001c728a0] real-time buffer [XI100DUSB-HDMI Video] [video input] too full or near too full (136% of size: 3041280 [rtbufsize parameter])! frame dropped!
  Conversion failed!
  </code></pre>