使用FFMPEG选择最接近特定时刻的关键帧 [英] Select keyframe closest to a particular instant with FFMPEG

查看:473
本文介绍了使用FFMPEG选择最接近特定时刻的关键帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由一些第三方软件创建的MP4视频。我不知道关键帧是否定期进行。我已经成功地用FFMPEG提取了与第3分钟(180秒*帧/秒)相对应的视频帧。



我想要做的是将第三分钟的最近关键帧提取出来,因为通常情况下,我用当前成功的代码提取的帧是不是关键帧,因此模糊。



我知道有一种方法来提取FFMPEG中的所有关键帧,但是有一种方法来提取关键帧最接近视频中的特定时间?



非常感谢!

解决方案

您可以使用 Avidemux 查找关键帧,也称为 I-frames


I have an MP4 video created by some third party software. I am not aware if the keyframes are at regular intervals or not. I have been successful in extracting a video frame corresponding to the 3rd minute (180 seconds * frames/s) with FFMPEG.

What I want to do is extract the "closest" keyframe to the third minute - since it is often the case that the frame that I extract with the currently successful code is NOT a keyframe and therefore blurry.

I know there is a way to extract all keyframes in FFMPEG, but is there a way to extract the keyframe closest to a particular time in a video?

Thanks very much!

解决方案

You can use Avidemux to find the keyframes, also known as I-frames.

这篇关于使用FFMPEG选择最接近特定时刻的关键帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆