Answers.Body: <p>Use</p>
  
  <pre><code>ffmpeg -start_at_zero -copyts -ss 00:00:14.435 -i input.mp4
      -vf "drawtext=fontfile=/path/to/Arial.ttf:
            fontsize=45:fontcolor=yellow:box=1:boxcolor=black:x=(W-tw)/2:y=H-th-10:
            text='Time\: %{pts\:hms}'"
      -vframes 1 output.png
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-09T09:27:45.290Z
Answers.Text: Can this code be expanded to take a screenshot every X minutes from the video and paste on each one the time elapsed until that point?. I am unable to do this by my own.
Answers.UserDisplayName: Chris Steinbeck Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-01T05:44:17.977Z
Answers.LastActivityDate: 2017-06-01T05:44:17.977Z
Answers.UserDisplayName: Gyan
Body: <p>I am trying to output a screenshot of a video at an specified time and the resulting picture should have a black square with the time that was given initially.</p>
  
  <p>So far I was only able to produce a screenshot using vframes from the example at the documentation on ffmpeg page which is this below:</p>
  
  <pre><code>ffmpeg -i input.flv -ss 00:00:14.435 -vframes 1 out.png
  </code></pre>
  
  <p>But I would like to add a timestamp in the resulting thumbnail or capture of the video which would show that '00:00:14.435' using arial fontface and a black square as background an yellow as fontcolor. Can this be done?.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-31T06:15:16.780Z
Comments.Text: See [here](https://video.stackexchange.com/a/19139/1871). Skip `\:1466507118`
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-31T06:40:43.000Z
Comments.Text: I've already tried the method you mentioned but it does generate a sequence of frames and it is not the way how I intend to assess my problem hence i stressed the part of inserting the time in a black frame at the bottom of the screen capture with the specified time.
Comments.UserDisplayName: Chris Steinbeck Bell
Tags: <ffmpeg><video-capture><thumbnails>
Title: How to add a time stamp using ffmpeg to a screenshot capture of a video
UserDisplayName: Chris Steinbeck Bell
ThreadText: # How to add a time stamp using ffmpeg to a screenshot capture of a video
  
  (Asked by: username_0 on 2017-05-31)
  
  I am trying to output a screenshot of a video at an specified time and the resulting picture should have a black square with the time that was given initially.
  
  So far I was only able to produce a screenshot using vframes from the example at the documentation on ffmpeg page which is this below:
  
  ```
  ffmpeg -i input.flv -ss 00:00:14.435 -vframes 1 out.png
  
  ```
  
  But I would like to add a timestamp in the resulting thumbnail or capture of the video which would show that '00:00:14.435' using arial fontface and a black square as background an yellow as fontcolor. Can this be done?.
  
  **Tags:** ffmpeg, video-capture, thumbnails
  
  > **Comments:**
  > **username_1**: See [here](https://video.stackexchange.com/a/19139/1871). Skip `\:1466507118`  
  > **username_0**: I've already tried the method you mentioned but it does generate a sequence of frames and it is not the way how I intend to assess my problem hence i stressed the part of inserting the time in a black frame at the bottom of the screen capture with the specified time.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-06-01. Score: 3
  
  Use
  
  ```
  ffmpeg -start_at_zero -copyts -ss 00:00:14.435 -i input.mp4
      -vf "drawtext=fontfile=/path/to/Arial.ttf:
            fontsize=45:fontcolor=yellow:box=1:boxcolor=black:x=(W-tw)/2:y=H-th-10:
            text='Time\: %{pts\:hms}'"
      -vframes 1 output.png
  
  ```
  
  > **Comments:**
  > **username_0**: Can this code be expanded to take a screenshot every X minutes from the video and paste on each one the time elapsed until that point?. I am unable to do this by my own.  
  
  ---
  
  