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

Thierry Foucu tfoucu at gmail.com
Thu Sep 7 22:15:30 EEST 2017


On Thu, Sep 7, 2017 at 11:37 AM, Nicolas George <george at nsup.org> wrote:

> [ Ccing you, but no need to Cc me. ]
>
> Le primidi 21 fructidor, an CCXXV, Thierry Foucu a écrit :
> > 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.
>
> Yes, it lacks documentation.
>
> > 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?
>
> Yes, it is meant exactly for that. The patch series I was referring is
> this one:
>
> https://ffmpeg.org/pipermail/ffmpeg-devel/2017-September/215988.html
> https://patchwork.ffmpeg.org/patch/5024/
> (and next)
>
> I thought I had cced you on one of the patches, but it may have been
> ignored.
>
>
Thanks Nicolas.


> With this patch series, when a filter reaches EOF, the link->current_pts
> contains the timestamp of the end, including the duration of the last
> frame: from that, you can implement your patch in a very similar way.
>

As soon as your patches landed, I will re-work on my patch and send it to
the list.

>
> (Although vf_fps would need to be rewritten to take advantage of the
> link's FIFO, but that is more work, and not required immediately.)
>

any pointer on this? maybe i can give it a shot as well.

>
> Regards,
>
> --
>   Nicolas George
>


More information about the ffmpeg-devel mailing list