Use FFMpeg to get middle frame of a video?

后端 未结 4 1203
耶瑟儿~
耶瑟儿~ 2020-12-08 23:51

I\'m wondering how to use FFMpeg to grap the middle frame of a video. I\'ve already written the C# to grab a frame at a certain time (ie pull one frame at second 3). But I\'

4条回答
  •  隐瞒了意图╮
    2020-12-09 00:15

    FFmpeg helps you get the framerate and the length of the video, so you can multiply one by the other and divide by 2 to get the number of the middle frame.

    ie for a 30 seconds video running at 15 frames per second : 30 * 15 = 450 / 2 = 225, meaning you need to grab the 225th frame.

提交回复
热议问题