[FFmpeg-devel] [PATCH 4/5] Add setpts filter by Victor Paesa.

Stefano Sabatini stefano.sabatini-lala
Tue Oct 12 00:56:40 CEST 2010


On date Monday 2010-10-11 17:43:14 +0200, V?ctor Paesa encoded:
> Hi,
> 
> First of all, thanks a lot for pushing this.
> 
> On Mon, Oct 11, 2010 at 12:19, Stefano Sabatini wrote:
> > ---
> > ?doc/filters.texi ? ? ? ? | ? 46 +++++++++++++++
> > ?libavfilter/Makefile ? ? | ? ?1 +
> > ?libavfilter/allfilters.c | ? ?1 +
> > ?libavfilter/vf_setpts.c ?| ?143 ++++++++++++++++++++++++++++++++++++++++++++++
> > ?4 files changed, 191 insertions(+), 0 deletions(-)
> > ?create mode 100644 libavfilter/vf_setpts.c
> >
> > diff --git a/doc/filters.texi b/doc/filters.texi
> > index 3c3285e..384500f 100644
> > --- a/doc/filters.texi
> > +++ b/doc/filters.texi
> > @@ -457,6 +457,52 @@ settb=2*intb
> > ?settb=AVTB
> > ?@end example
> >
> > + at section setpts
> > +
> > +Change the PTS (presentation timestamp) of the input video frames.
> > +
> > +Accept in input an expression evaluated through the eval API, which
> > +can contain the following constants:
> > +
> > + at table @option
> > + at item PTS
> > +the presentation timestamp in input
> > +
> > + at item PI
> > +Greek PI
> > +
> > + at item E
> > +Euler number
> > +
> > + at item AVTB
> > +the FFmpeg Time Base
> > +
> > + at item N
> > +the count of the input frame, starting from 0.
> > +
> > + at item STARTPTS
> > +the PTS of the first video frame
> > + at end table
> > +
> 
> Docs missing for
> +    "INTERLACED"  ///< tell if the current frame is interlaced
> +    "NOPTS"       ///< value corresponding to an undefined PTS
> +    "POS",        ///< original position in the file of the frame
> +    "PREV_INPTS"  ///< previous  input PTS
> +    "PREV_OUTPTS" ///< previous output PTS
> 
> > +Follows some examples:
> > +
> 
> "Some examples follow:"
> 
> > + at example
> > +# Start counting PTS from zero
> > +setpts=PTS-STARTPTS
> > +
> > +# Fast motion
> > +setpts=0.5*PTS
> > +
> > +# Slow motion
> > +setpts=2.0*PTS
> > +?
> > +# Fixed rate 25 fps
> > +setpts=N*AVTB/25
> > +
> > +# Fixed rate 25 fps with some jitter
> > +setpts='AVTB/25 * (N+0.05 * sin (N*2*PI/25))'
> > + at end example
> > +
> 
> Here or somewhere in the docs: 'Remember to use "-vsync 0", and to
> avoid "-copyts".'

Thanks for the comments, note that I posted this patch by error, but
I'll take your comments in account when I'll post the next round for
the setpts filter, which will be hopefully soon.

Regards.
-- 
FFmpeg = Fascinating and Fancy Magic Portable Elected Guru



More information about the ffmpeg-devel mailing list