[ffmpeg] [filter_fps] duplicate OR drop frame方式

在此举例一个duplicate frame的情况:
该情况发生的原因,生成的第一帧的pts不是从0开始的。

如果pts不正确,会导致fps filter根据pts进行相应帧的duplicate
假如:输入的time_base=50,第一帧的pts为80。设置的帧率转换fps=15
80/50 = 1.6秒 (ffmpeg认为这一帧需要显示到1.6秒)
需要进行帧率转换, 并且输出的time_base为15,则1.6秒需要显示的帧数量15*1.6 = 24
原来存在1帧,还需要duplicate 23帧

出现以下parser_fps的log:
[Parsed_fps_0 @ 0x15de940] Read frame with in pts 80, out pts 24
[Parsed_fps_0 @ 0x15de940] Set first pts to 0
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 0
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 1
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 2
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 3
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 4
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 5
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 6
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 7
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 8
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 9
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 10
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 11
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 12
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 13
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 14
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 15
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 16
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 17
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 18
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 19
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 20
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 21
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 22
[Parsed_fps_0 @ 0x15de940] Writing frame with pts 0 to pts 23
[Parsed_fps_0 @ 0x15de940] Duplicated frame with pts 0 23 times

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值