avfilter/setpts: add option strip_fps to decide framerate handling

In f121d95, the outlink framerate was unconditionally unset.
This breaks/bloats outputs from CFR muxers unless the user explicitly
sets a sane framerate. And the most common invocation for setpts seen in
workflows, our docs and across the web is `PTS-STARTPTS` or others of the
general form `PTS+constant` which preserves the input framerate.

Default value is false, which restores old behaviour.

Fixes #11428
This commit is contained in:
Gyan Doshi
2025-01-23 10:52:16 +05:30
parent f632ab53d9
commit 959b799c8d
5 changed files with 14 additions and 4 deletions

View File

@ -31478,6 +31478,12 @@ This filter accepts the following options:
@item expr
The expression which is evaluated for each frame to construct its timestamp.
@item strip_fps (@emph{video only})
Boolean option which determines if the original framerate metadata is unset.
If set to true, be advised that a sane frame rate should be explicitly
specified if output is sent to a constant frame rate muxer.
Default is @code{false}.
@end table
The expression is evaluated through the eval API and can contain the following