New submission from Alexander Strange <[email protected]>:

http://astrange.ithinksw.net/ffmpeg/camp_mot_mbaff0_full.mp4

This file is CFR and has packet timestamps that increment by 3003. ffmpeg.c's 
next_pts generation only increments by 5. This is because it uses the codec 
time_base, but in this file it's not reduced. Using avg_frame_rate would work 
better, not tested on other files yet.

Note that next_pts is always used to set the timestamp on flushed EOF frames. I 
sent a patch fixing this as a side-effect, but it's not perfect. It probably 
should be disabled harder for that and in VFR (ffmpeg should at least log a 
complaint in that case).

codec->time_base:
(gdb) print *ist->st->codec
...
  time_base = {
    num = 1, 
    den = 180000
  }

avg_frame_rate:
(gdb) print *ist->st
...
  time_base = {
    num = 1, 
    den = 90000
  },
  avg_frame_rate = {
    num = 30000, 
    den = 1001
  },

----------
messages: 12064
priority: normal
status: new
substatus: new
title: ffmpeg next_pts generation inaccuracy
type: bug

________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2252>
________________________________________________

Reply via email to