<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>

CC BY-SA 3.0
2017-06-09T09:27:45.290Z
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.
Chris Steinbeck Bell
CC BY-SA 3.0
2017-06-01T05:44:17.977Z
2017-06-01T05:44:17.977Z
Gyan
<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>

CC BY-SA 3.0
2017-05-31T06:15:16.780Z
See [here](https://video.stackexchange.com/a/19139/1871). Skip `\:1466507118`
Gyan
CC BY-SA 3.0
2017-05-31T06:40:43.000Z
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.
Chris Steinbeck Bell
<ffmpeg><video-capture><thumbnails>
How to add a time stamp using ffmpeg to a screenshot capture of a video
Chris Steinbeck Bell
# 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.  

---

