[FFmpeg-trac] #11126(ffmpeg:new): Filter "setpts=PTS-STARTPTS" in 2-pass VP9 may cause abnormal bitrate allocation

FFmpeg trac at avcodec.org
Tue Aug 6 04:12:19 EEST 2024


#11126: Filter "setpts=PTS-STARTPTS" in 2-pass VP9 may cause abnormal bitrate
allocation
-------------------------------------+-------------------------------------
             Reporter:  Saul Baker   |                    Owner:  (none)
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  ffmpeg
              Version:  git-master   |               Resolution:
             Keywords:  regression   |               Blocked By:
  2-pass                             |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by Saul Baker):

 > Didn't it work without..? Or try without touching timestamps for "-pass
 1"?

 It's used deeper inside an application where arbitrary clips can be
 requested to be concatenated together, it finds two main uses:

 Fixing the slight offsets that creep in from the multiple slicing and
 dicing of a segments to apply and join the results of the xfade filter.

 A step improving the resolution of very short precise cuts to synchronise
 with audio tracks by interpolating the clips up, cutting them, joining
 with reset timestamps and then interpolating them back down.

 Both function without it but cumulative errors creep in otherwise.

 Regardless, it's often useful for inputs with timestamp weirdness.

 For the logs, the diagnostic thing seems to be that fps is no longer
 accurate, possibly similar to https://trac.ffmpeg.org/ticket/11086

 {{{

 nofilter:

 #options: 846x480 fps=30/1 timebase=1/30 bitdepth=8 cabac=1 ref=1
 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00
 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0
 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=15
 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=3271
 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 in:0 out:0 type:I dur:2 cpbdur:2 q:22.17 aq:16.15 tex:246309 mv:55229
 misc:6102 imb:1590 pmb:0 smb:0 d:- ref:;
 in:2 out:1 type:P dur:2 cpbdur:2 q:22.80 aq:16.56 tex:89046 mv:9528
 misc:1114 imb:343 pmb:694 smb:553 d:- ref:0 ;
 in:1 out:2 type:b dur:2 cpbdur:2 q:22.80 aq:21.46 tex:30162 mv:9949
 misc:953 imb:88 pmb:607 smb:895 d:- ref:0 ;
 in:5 out:3 type:P dur:2 cpbdur:2 q:22.71 aq:16.55 tex:129176 mv:11196
 misc:988 imb:320 pmb:840 smb:430 d:- ref:0 ;
 in:3 out:4 type:B dur:2 cpbdur:2 q:22.77 aq:21.06 tex:33786 mv:9206
 misc:1080 imb:56 pmb:711 smb:823 d:- ref:0 ;



 setpts:

 #options: 846x480 fps=90000/1 timebase=1/90000 bitdepth=8 cabac=1 ref=1
 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00
 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0
 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=15
 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=3271
 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 in:0 out:0 type:I dur:6000 cpbdur:6000 q:69.00 aq:51.00 tex:129 mv:447
 misc:6024 imb:1590 pmb:0 smb:0 d:- ref:;
 in:2 out:1 type:P dur:6000 cpbdur:6000 q:69.00 aq:51.00 tex:0 mv:0
 misc:152 imb:0 pmb:0 smb:1590 d:- ref:0 ;
 in:1 out:2 type:b dur:6000 cpbdur:6000 q:69.00 aq:51.00 tex:0 mv:0
 misc:152 imb:0 pmb:0 smb:1590 d:- ref:0 ;
 in:5 out:3 type:P dur:6000 cpbdur:6000 q:69.00 aq:51.00 tex:0 mv:0
 misc:152 imb:0 pmb:0 smb:1590 d:- ref:0 ;
 in:3 out:4 type:B dur:6000 cpbdur:6000 q:69.00 aq:51.00 tex:0 mv:0
 misc:160 imb:0 pmb:0 smb:1590 d:- ref:0 ;
 in:4 out:5 type:b dur:6000 cpbdur:6000 q:69.00 aq:51.00 tex:0 mv:0
 misc:152 imb:0 pmb:0 smb:1590 d:- ref:0 ;


 }}}
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11126#comment:11>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list