[FFmpeg-devel] [PATCH] vf_fps: uses the last frame duration to duplicate it if needed

Thierry Foucu tfoucu at gmail.com
Thu Sep 7 21:17:25 EEST 2017


Hi Nicolas,

On Wed, Sep 6, 2017 at 2:07 PM, Nicolas George <george at nsup.org> wrote:

> Le decadi 20 fructidor, an CCXXV, Thierry Foucu a écrit :
> > ---
> >  libavfilter/vf_fps.c        | 40 ++++++++++++++++++++++++++++++
> +++++-----
> >  tests/ref/fate/filter-fps   |  6 ++++++
> >  tests/ref/fate/filter-fps-r |  4 ++++
> >  3 files changed, 45 insertions(+), 5 deletions(-)
>
> Already explained: no, pkt_duration is not part of the information taken
> into account by libavfilter. The correct way of obtaining the end
> timestamp is to use the link's timestamp after EOF. There is an old
> patch series to ensure it is accurate, but it has been delayed by
> bikeshedding.
>
>
Sorry I did not know and I did not see any documentation in the header
explaining which field of the AVFrame can/cannot be used by filter.

If we cannot used the duration of the AVframe, how can we resolve the
problem I'm trying to resolve.
For example, if you take a video with a fps of 1 frame/second and you are
trying to convert it to 30fps, the duration of the output file will be
shorter by 1 second.
Knowing the last frame duration allows us to pad the last video frame with
the correct fps.

You are saying there is an old patch series to ensure it. How far are you
with it?
With the patch you are talking about, will we be able to do what i'm trying
to do with this patch?

Regards.


> Regards,
>
> --
>   Nicolas George
>


More information about the ffmpeg-devel mailing list