[FFmpeg-devel] A change in r_frame_rate values after upgrade to FFmpeg 6.1

Michael Niedermayer michael at niedermayer.cc
Tue Sep 24 02:27:13 EEST 2024


On Mon, Sep 23, 2024 at 08:30:09PM +0100, Kieran Kunhya via ffmpeg-devel wrote:
> > On Mon, Sep 23, 2024 at 4:45 PM Kieran Kunhya via ffmpeg-devel <ffmpeg-devel at ffmpeg.org> wrote:
> >>
> >> On Mon, Sep 23, 2024 at 3:27 PM Anton Khirnov <anton at khirnov.net> wrote:
> >> >
> >> > Quoting Antoni Bizoń (2024-09-23 10:09:51)
> >> > > I understand that the r_frame_rate is the lowest framerate with which
> >> > > all timestamps can be represented accurately. And I know it is just a
> >> > > guess. But why did the logic behind the calculation change?
> >> >
> >> > Because you're most likely using a codec like H.264 or MPEG-2 that
> >> > allows individually coded fields. In that case the timebase must be
> >> > accurate enough to represent the field rate (i.e. double the frame
> >> > rate), but the code doing this was previously unreliable, so you'd
> >> > sometimes get r_frame_rate equal to the frame rate rather than field
> >> > rate. That is not the case anymore.
> >>
> >> This is bizarre and kafkaesque to say the least.
> >
> >
> > Should we schedule deprecation for one of the two fields? I agree it's confusing for end users to check in two fields.
> 

> avg_frame_rate implies it's not precise in some way.

An "average" is precissely one number (once the type of average is defined)
Maybe you are thinkin of "approximate" instead of "average"


> I think the OP is
> correct here that the behaviour makes no sense.

> If something says frame_rate it's the rate of frames, not the rate of
> fields or anything else.

The documentation says:
     * This is the lowest framerate with which all timestamps can be
     * represented accurately (it is the least common multiple of all
     * framerates in the stream). Note, this value is just a guess!
     * For example, if the time base is 1/90000 and all frames have either
     * approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.


thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Homeopathy is like voting while filling the ballot out with transparent ink.
Sometimes the outcome one wanted occurs. Rarely its worse than filling out
a ballot properly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240924/8bf021f3/attachment.sig>


More information about the ffmpeg-devel mailing list