title: ffmpeg output images filename with time position
body: <p>I am using ffmpeg to get some jpg from my video at a specific rate (one screenshot every 5 seconds) with this command :</p>
  
  <pre><code>ffmpeg -i source -f image2 -r 1/5 %d.jpg
  </code></pre>
  
  <p>This works and give me sequential filenames :</p>
  
  <pre><code>1.jpg
  2.jpg
  3.jpg
  4.jpg
  </code></pre>
  
  <p>What if I need to know at which time those screenshots have been taken ? Something like a timestamp :</p>
  
  <pre><code>00:00:00.0000.jpg
  00:00:05.0000.jpg
  00:00:10.0000.jpg
  00:00:15.0000.jpg
  </code></pre>
  
  <p>or the number of seconds :</p>
  
  <pre><code>0.jpg
  5.jpg
  10.jpg
  15.jpg
  </code></pre>
  
  <p>I tried again with the new <a href="https://www.ffmpeg.org/ffmpeg-formats.html#Options-6" rel="noreferrer">-frame_pts</a> option :</p>
  
  <pre><code>ffmpeg -i source -f image2 -r 1/5 -frame_pts 1 %d.jpg
  </code></pre>
  
  <p>I got similar sequential filenames, but now they are starting from zero :</p>
  
  <pre><code>0.jpg
  1.jpg
  2.jpg
  3.jpg
  </code></pre>