[FFmpeg-devel] [PATCH 6/7] Implement settb filter.
Wed Sep 1 19:49:54 CEST 2010
On date Thursday 2010-07-22 17:25:35 +0200, Michael Niedermayer encoded:
> On Thu, Jul 22, 2010 at 04:34:29PM +0200, Stefano Sabatini wrote:
> > On date Thursday 2010-07-22 14:09:28 +0200, Michael Niedermayer encoded:
> > > On Wed, Jul 21, 2010 at 06:00:05PM +0200, Stefano Sabatini wrote:
> > > > ---
> > > > doc/filters.texi | 19 +++++++++
> > > > libavfilter/Makefile | 1 +
> > > > libavfilter/allfilters.c | 1 +
> > > > libavfilter/vf_settb.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++
> > > > 4 files changed, 113 insertions(+), 0 deletions(-)
> > > > create mode 100644 libavfilter/vf_settb.c
> > >
> > > i think a single filter that can modify timestamps and timebase would make
> > > more sense than spliting this operation?
> > > modifying tb implicates recaling timestamps anyway ...
> > I see these as two different operations, changing timebase is not
> > implying a change of the absolute temporal value of the timestamps.
> > Alternatively we could have a setpts filter which accepts:
> > outpts_expression:tb_num:tb_den
> > but I tend to prefer to keep distinct the two problems (and keep
> > simple both filters). Also note that in the case of settb the
> > rescaling is done implicitely by the filter framework
> > (avfilter_start_frame()).
> if the filters are seperate then this will cause 2 rescalings to be
> done, one for settb and one for changing pts. This would make it
> impossible to change both while minimizing rounding errors
So two possible solutions:
1) keep settb and setpts separate, and make setpts able to change the
output timebase. This way the settb has to be considered a
simplified version of setpts.
2) don't implement a settb filter, setpts can be used instead:
settb=TB <=> setpts=PTS:TB
I prefer solution 1).
FFmpeg = Fanciful Furious Mean Picky Elfic Gem
More information about the ffmpeg-devel