0

I am trying to extract desired frames from video when someone in video start to speak and extract 5 frames per second when speaking. I get the framelist I want like 0, 6,12,18 and 200,206, 212.... I try to create scripts to do it automatically using below command per frame,but it's pretty slow, is there quick to get the desired frames from list with frame num as image name?

ffmpeg -i 1.mp4 -vf select='eq(n,0)' -vsync 0 -an -y -q:v 16 0.png

ffmpeg -i 1.mp4 -vf select='eq(n,6)' -vsync 0 -an -y -q:v 16 6.png ....

stone lee
  • 11
  • 2
  • Check out this answer: https://stackoverflow.com/a/28321986/4962858 and the documentation: https://ffmpeg.org/ffmpeg.html#Main-options Looks like you should use `ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg` combined with the `-frames:v` argument. – francis duvivier Oct 17 '21 at 17:57
  • Thanks. I found below command, but don't know how to map the frame number to image name: ffmpeg -i 1.mp4 -start_number 0 -vf select='eq(n,5)+eq(n,11)+eq(n,15)+eq(n,16)' -vsync 0 images/frames%d.jpg – stone lee Oct 18 '21 at 04:03

0 Answers0