有没有办法告诉ffmpeg mpdecimate仅评估帧的特定部分? [英] Is there a way to tell ffmpeg mpdecimate to only evaluate a specific part of the frame?

查看:111
本文介绍了有没有办法告诉ffmpeg mpdecimate仅评估帧的特定部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个60 FPS的屏幕录像,显示的视频明显慢得多,而且帧率可变.但是,它应该是恒定的帧速率.

I have a 60 FPS screen recording of a significantly slower, variable frame rate, video. It is supposed to, however, be constant frame rate.

幸运的是,帧号出现在屏幕的固定区域中.在该区域内,唯一更改的唯一时间就是帧号更改.

Fortunately, frame numbers are present in a fixed area of the screen. Within that area, the only time anything changes is when the frame number changes.

(有时帧之间会有变化-在帧的其他部分中-我希望mpdecimate忽略这些变化.但是,这些变化永远不会出现在帧计数区域中.)

(There are sometimes changes between frames - in other parts of the frame - that I would like mpdecimate to ignore. Those changes, however, never appear in the frame count zone.)

有没有一种方法可以告诉mpdecimate在确定顺序帧是否重复时仅评估帧的那小部分帧计数"?

Is there a way that I can tell mpdecimate to only evaluate that small 'frame counting' portion of the frame in determining whether sequential frames are duplicates?

谢谢.

推荐答案

此处的基本方法是克隆输入流,在其中一个副本中用纯色绘制帧的不需要部分,运行mpdecimate过滤器,然后将未修改的副本覆盖在重复数据删除副本的顶部.

The basic method here is to clone the input stream, paint over the undesired portion of the frame with a solid color in one of the copies, run mpdecimate filter, then overlay the untouched copy on top of the de-duplicated copy.

假定除框架计数器外,底部横条是静态的,并且占据底部底部5%的高度.绘制框会在框架的顶部95%处绘制一个白框.

Assume the bottom bar is static except for the frame counter and occupies the bottom 5% of height. drawbox will draw a white box over the top 95% of the frame.

ffmpeg -i" split = 2 [full] [masked]; [masked] drawbox = w = iw:h = ih * 0.95:x = 0:y = 0:t = fill:c = white,mpdecimate [deduped]; [deduped] [full] overlay = shortest = 1"-vsync vfr -c:复制出来

这篇关于有没有办法告诉ffmpeg mpdecimate仅评估帧的特定部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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