ffmpeg时间戳校正到相同或+1

1、校正到上一个时间戳


[flv @ 0000000004a72a60]

 
Non-monotonous DTS in output stream 0:0; previous: 38226576, current: 31954504; 
changing to 38226576. This may result in incorrect timestamps in the output file.

[flv @ 0000000004a72a60]
 
Non-monotonous DTS in output stream 0:0; previous: 38226576, current: 31954543; 

changing to 38226576. This may result in incorrect timestamps in the output file.



negative cts, previous timestamps might be wrong 
DTS 4294905094, next:4418668000 st:0 invalid dropping 
PTS 4294905094, next:4418668000 invalid dropping st:0 

frame=110408 fps= 25 q=-1.0 size= 326675kB time=01:13:38.89 bitrate= 605.6kbits/s 
frame=110526 fps= 25 q=-1.0 size= 327025kB time=01:13:43.61 bitrate= 605.6kbits/s 
negative cts, previous timestamps might be wrong 
[flv @ 0000000004a72a60] 
Non-monotonous DTS in output stream 0:0; previous: 4423587, current: -52282; 
changing to 4423587. This may result in incorrect timestamps in the output file. 

[flv @ 000000000039f900] 
negative cts, previous timestamps might be wrong 
[flv @ 0000000004a72a60] 
Non-monotonous DTS in output stream 0:0; previous: 4423587, current: -52202; 
changing to 4423587. This may result in incorrect timestamps in the output file. 


https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=1172



2、校正到上一个时间戳+1

[mp4 @ 0x7f897a01bc00] Non-monotonous DTS in output stream 0:0; previous: 598061, current: 467644; changing to 598062. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7f897a01bc00] Non-monotonous DTS in output stream 0:0; previous: 598062, current: 468044; changing to 598063. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7f897a01bc00] Non-monotonous DTS in output stream 0:0; previous: 598063, current: 468444; changing to 598064. This may result in incorrect timestamps in the output file.
...
[mp4 @ 0x7f897a01bc00] Non-monotonous DTS in output stream 0:0; previous: 598362, current: 588044; changing to 598363. This may result in incorrect timestamps in the output file.

http://video.stackexchange.com/questions/15468/non-monotonous-dts-on-concat-ffmpeg



ffmpeg -f v4l2 -video_size 1920x1080 -vcodec h264 -i /dev/video0 -c copy -fflags +genpts -video_track_timescale 15360 -avoid_negative_ts make_zero output.mp4


  • 1
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值