FFMPEG:获取所有帧的场景变化检测值 [英] FFMPEG: Get the Scene Change Detection value for all frame

查看:1532
本文介绍了FFMPEG:获取所有帧的场景变化检测值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测量一部电影是快(屏幕上更多的动作和快速的场景机会)。我不想只是一个电影的价值,但电影中的价值观,看看行动的变化。在标准化电影的帧速率(10 fps)后,我的想法是将每个帧与先前的帧进行比较。如果场景有所改变,我不仅感兴趣,而且如果没有剪切,还有多少动作。不仅人/物运动,而且摄像机运动。总结起步(我认为这个术语)的场景。

I'm trying to measure how much a movies is "fast" (more action in the screen and quick scene chances). I don't want just a single value for the movie, but values along the movie to see how the action varies during it. After normalize the frame rate of the movies (10 fps), my idea is to compare each frame with the previous. I'm not only interest if the scene has changed, but also, if there was no cut, how much movement there is. Not only people/object movement but also, camera movement. In summary the paced (I think that the term) of the scenes.

我的想法是使用场景功能从ffmpeg作为度量。但是查看文档在线示例我想我只能使用场景变化检测作为返回帧信息的阈值,但是我无法获取ffmpeg返回值。是对的吗?有什么办法可以使其返回值?

My idea was to use the scene function from ffmpeg as a metric. But looking at the document and examples online I'm thinking I can only use the value of the Scene Change Detection as a threshold to return frames informations, but I can't get ffmpeg to return the value. Is that right? There is any way I can make it return the value?

推荐答案

使用

ffmpeg -i in.mp4 -vf select='gte(scene,0)',metadata=print:file=scenescores.txt -an -f null -

创建的文本文件将具有如下输出:

The text file created will have output like this:

...
frame:1440 pts:737280  pts_time:48     
lavfi.scene_score=0.003069
frame:1441 pts:737792  pts_time:48.0333
lavfi.scene_score=0.001593
frame:1442 pts:738304  pts_time:48.0667
lavfi.scene_score=0.000077
frame:1443 pts:738816  pts_time:48.1   
lavfi.scene_score=0.002219
...

这篇关于FFMPEG:获取所有帧的场景变化检测值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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