Opened 10 months ago

Last modified 9 months ago

#10468 new defect

lavfi/vpp_qsv: regression in setting of time_base

Reported by: Øystein Sture Owned by:
Priority: normal Component: avfilter
Version: 6.0 Keywords: VPP_QSV
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
The following commit changed the default parameters for frame rate and time base
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/077e63496581edf02e503e7d99dbc4e1a5670246

As a part of these changes, the outlink time_base is set to the inverse of the estimated frame rate, regardless of if these new features with deinterlacing or frame rate control is used or not. When upgrading to ffmpeg 6.0, the encoder started complaining that the pts was not monotonously increasing with variable frame rate (since the new time_base is effectively 1/avg_frame_rate).

How to reproduce:
An easy way to reproduce the regression is to omit setting the frame_rate parameter of the buffersrc filter, thus using the default of 0/1. The vpp_qsv filter will still try to set the time_base to the inverse of frame rate, ending up with 1/0 time base and no valid output pts from the filter graph (always 0). I'm using the C-api directly, so I don't have an ffmpeg command on hand to illustrate the problem, but it should be fairly obvious looking at the code.

Not sure what priority to assign to this, but it's present both in master and release/6.0.

Change History (2)

comment:2 by Øystein Sture, 9 months ago

I can confirm that this resolves the issue with default initialized frame rate (0/1).

Note that it still may reduce the resolution of the output time base. For example if time base is 1/90000 and frame rate is given as 30/1, the resolution will be 1/30 afterwards. I've created a workaround by setting the frame rate to 30 / (30 * 90000). I'm dealing with video with variable frame rate where the actual frame rate may deviate a bit from the average.

Note: See TracTickets for help on using tickets.