Fastest way to extract frames using ffmpeg?

前端 未结 7 1438
礼貌的吻别
礼貌的吻别 2020-12-07 07:20

Hi I need to extract frames from videos using ffmpeg.. Is there a faster way to do it than this:

ffmpeg -i file.mpg -r 1/1 $filename%03d.jpg
<
相关标签:
7条回答
  • 2020-12-07 07:50

    Output one image every minute, named img001.jpg, img002.jpg, img003.jpg, etc. The %03d dictates that the ordinal number of each output image will be formatted using 3 digits.

    ffmpeg -i myvideo.avi -vf fps=1/60 img%03d.jpg
    

    Change the fps=1/60 to fps=1/30 to capture a image every 30 seconds. Similarly if you want to capture a image every 5 seconds then change fps=1/60 to fps=1/5

    SOURCE: https://trac.ffmpeg.org/wiki/Create a thumbnail image every X seconds of the video

    0 讨论(0)
提交回复
热议问题