使用ffprobe进行剪切检测

时间:2015-02-02 01:14:17

标签: ffmpeg ffprobe

我试图用ffprobe检测拍摄之间的剪辑。我使用以下命令:

ffprobe -show_frames -of compact=p=0 -f lavfi "movie=test_clip.avi,select=gt(scene\,.4)" > test_clip_cuts.txt

它运作得很好,毫无疑问。但现在我只想在一定范围内检测到切割。让我们说3到8秒。我怎么能这样做?

我尝试使用-read_intervals 3%8,但它给了我一个错误:

Could not seek to position 3000000: Invalid argument
Could not read packets in interval id:0 start:3 end:8

命令-read_intervals %+3(从最开始到第3秒读取)有效,但是以奇怪的方式 - 它会检测到最多4秒的切换(以及我猜)。

所以我很困惑。什么是那些"间隔"以及如何使用它们?是否可以定期设置范围?

以防这是我的测试片https://yadi.sk/i/nd-c12mYeQ2nb

1 个答案:

答案 0 :(得分:0)

最后我找到答案=)
要只检测3到8秒之间的割伤,我必须更换

"movie=test_clip.avi,select=gt(scene\,.4)"

使用

"movie=test_clip.avi,select=between(t\,3\,8)*gt(scene\,.4)"