4

I'm using the command ffmpeg -i video.webm -vf fps=1 thumb%04d.jpg

to get one frame every second. However, I cannot figure out way to get the exact timestamp of an extracted frame. I need that timestamp for processing.

Can you please help?

Thanks so much, Vu

6
  • If you set fps=1, the timecode will be 0, 1, 2, etc., no?
    – slhck
    Commented Aug 2, 2018 at 17:39
  • No it does not correct. See superuser.com/questions/575854/…. Also, we tested many times and it did not necessarily to get first frame of a second.
    – user929951
    Commented Aug 2, 2018 at 17:57
  • Well, you could use a "fps=1,drawtext=timecode='00\:00\:00\:00':r=1" filter and see what is rendered in the output images. Or just as shown in the other post, use text='%{pts\:hms}'.
    – slhck
    Commented Aug 2, 2018 at 18:07
  • Thanks. This post is very close to what I want superuser.com/questions/994870/…, but it seems not completely work.
    – user929951
    Commented Aug 2, 2018 at 18:19
  • That won't work, as ffmpeg cannot dynamically set the output file name.
    – slhck
    Commented Aug 2, 2018 at 18:32

0

You must log in to answer this question.

Browse other questions tagged .