[FFmpeg-devel] [PATCH] ffmpeg: implement -force_key_frames_expr option
Michael Niedermayer
michaelni at gmx.at
Fri Dec 14 20:35:36 CET 2012
On Fri, Dec 14, 2012 at 06:02:11PM +0100, Stefano Sabatini wrote:
> On date Friday 2012-12-14 03:15:22 +0100, Michael Niedermayer encoded:
> > On Fri, Dec 14, 2012 at 12:56:42AM +0100, Stefano Sabatini wrote:
> [...]
> > > +The expression in @var{expr} can contain the following constants:
> > > + at table @option
> > > + at item n
> > > +the number of already forced keyframes
> > > + at item prev_t
> > > +the time of the last forced key frame, it is @code{NAN} when no
> > > +keyframe was forced yet
> > > + at end table
> >
> > implementing this in ffmpeg.c makes the expression evaluation only
> > available to ffmpeg and not to other user applications, also the
> > expression evaluator only has a small number of input variables
> > available from the application.
>
> > in libavcodec it would have a much larger amount of information
> > available, like the scene change score or various rate control
> > parameters
>
> The idea is interesting. How do you want it to be implemented? This
> patch only computes the next value to force when the current frame is
> forced, an alternative could be to evaluate an expression (say:
> "gte(t, n*10-0.05)") at each frame (slower but more flexible).
yes, i think per frame evaluation is better
>
> Another interesting idea would be to get values from a file (e.g. to
> specify a list of values), something like:
> codec:v=mpeg4=force_kf_expr_file=forced_times.lst:force_kf_expr=gte(t,filet(n))
>
> but this can be implemented later.
> --
> FFmpeg = Fascinating and Formidable Magnificient Powered Emblematic God
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121214/bab36b9a/attachment.asc>
More information about the ffmpeg-devel
mailing list