[PATCH] lavfi: add fade filter
From: Brandon Mintern <bmintern at gmail.com> Port fade filter from libavfilter soc repo, with minor fixes by Stefano. --- doc/filters.texi | 33 +++++++++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_fade.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 205 insertions(+), 0 deletions(-) create mode 100644 libavfilter/vf_fade.c diff --git a/doc/filters.texi b/doc/filters.texi index 049e2bd..bbc730d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -465,6 +465,39 @@ within the parameter list. For more information about libfreetype, check: @url{http://www.freetype.org/} + at section fade + +Apply fade-in/out effect to input video. + +It accepts the parameters: + at var{type}:@var{start_frame}:@var{nb_frames} + + at var{type} specifies if the effect type, can be either "in" for +fade-in, or "out" for a fade-out effect. + + at var{start_frame} specifies the number of the start frame for starting +to apply the fade effect. + + at var{nb_frames} specifies the number of frames for which the fade +effect has to last. At the end of the fade-in effect the output video +will have the same intensity as the input video, at the end of the +fade-out transition the output video will be completely black. + +A few usage examples follow, usable too as test scenarios. + at example +# fade in first 30 frames of video +fade=in:0:30 + +# fade out last 45 frames of a 200-frame video +fade=out:155:45 + +# fade in first 25 frames and fade out last 25 frames of a 1000-frame video +fade=in:0:25, fade=out:975:25 + +# make first 5 frames black, then fade in from frame 5-24 +fade=in:5:20 + at end example + @section fifo Buffer input images and send them when they are requested. diff --git a/libavfilter/Makefile b/libavfilter/Makefile index b3f77a0..f116fe5 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -27,6 +27,7 @@ OBJS-$(CONFIG_CROP_FILTER) += vf_crop.o OBJS-$(CONFIG_CROPDETECT_FILTER) += vf_cropdetect.o OBJS-$(CONFIG_DRAWBOX_FILTER) += vf_drawbox.o OBJS-$(CONFIG_DRAWTEXT_FILTER) += vf_drawtext.o +OBJS-$(CONFIG_FADE_FILTER) += vf_fade.o OBJS-$(CONFIG_FIFO_FILTER) += vf_fifo.o OBJS-$(CONFIG_FORMAT_FILTER) += vf_format.o OBJS-$(CONFIG_FREI0R_FILTER) += vf_frei0r.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 347a728..0fdd09b 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -46,6 +46,7 @@ void avfilter_register_all(void) REGISTER_FILTER (CROPDETECT, cropdetect, vf); REGISTER_FILTER (DRAWBOX, drawbox, vf); REGISTER_FILTER (DRAWTEXT, drawtext, vf); + REGISTER_FILTER (FADE, fade, vf); REGISTER_FILTER (FIFO, fifo, vf); REGISTER_FILTER (FORMAT, format, vf); REGISTER_FILTER (FREI0R, frei0r, vf); diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c new file mode 100644 index 0000000..203a186 --- /dev/null +++ b/libavfilter/vf_fade.c @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2010 Brandon Mintern + * Copyright (c) 2007 Bobby Bingham + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * video fade filter + * based heavily on vf_negate.c by Bobby Bingham + */ + +#include "libavutil/pixdesc.h" +#include "avfilter.h" + +typedef struct { + int factor, fade_per_frame; + unsigned int frame_index, start_frame, stop_frame; + int hsub, vsub, bpp; +} FadeContext; + +static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) +{ + FadeContext *fade = ctx->priv; + unsigned int nb_frames; + char in_out[4]; + + if (!args || + sscanf(args, " %3[^:]:%u:%u", in_out, &fade->start_frame, &nb_frames) != 3) { + av_log(ctx, AV_LOG_ERROR, + "Expected 3 arguments '(in|out):#:#':'%s'\n", args); + return AVERROR(EINVAL); + } + + nb_frames = nb_frames ? nb_frames : 1; + fade->fade_per_frame = (1 << 16) / nb_frames; + if (!strcmp(in_out, "in")) + fade->factor = 0; + else if (!strcmp(in_out, "out")) { + fade->fade_per_frame = -fade->fade_per_frame; + fade->factor = (1 << 16); + } else { + av_log(ctx, AV_LOG_ERROR, + "first argument must be 'in' or 'out':'%s'\n", in_out); + return AVERROR(EINVAL); + } + fade->stop_frame = fade->start_frame + nb_frames; + + av_log(ctx, AV_LOG_INFO, + "type:%s start_frame:%d nb_frames:%d\n", + in_out, fade->start_frame, nb_frames); + return 0; +} + +static int query_formats(AVFilterContext *ctx) +{ + const static enum PixelFormat pix_fmts[] = { + PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, + PIX_FMT_YUV411P, PIX_FMT_YUV410P, + PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P, + PIX_FMT_YUV440P, PIX_FMT_YUVJ440P, + PIX_FMT_RGB24, PIX_FMT_BGR24, + PIX_FMT_NONE + }; + + avfilter_set_common_formats(ctx, avfilter_make_format_list(pix_fmts)); + return 0; +} + +static int config_props(AVFilterLink *inlink) +{ + FadeContext *fade = inlink->dst->priv; + const AVPixFmtDescriptor *pixdesc = &av_pix_fmt_descriptors[inlink->format]; + + fade->hsub = pixdesc->log2_chroma_w; + fade->vsub = pixdesc->log2_chroma_h; + + fade->bpp = av_get_bits_per_pixel(pixdesc) >> 3; + return 0; +} + +static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) +{ + FadeContext *fade = inlink->dst->priv; + AVFilterBufferRef *outpic = inlink->cur_buf; + uint8_t *p; + int i, j, plane; + + if (fade->factor < 65536) { + /* luma or rgb plane */ + for (i = 0; i < h; i++) { + p = outpic->data[0] + (y+i) * outpic->linesize[0]; + for (j = 0; j < inlink->w * fade->bpp; j++) { + /* fade->factor is using 16 lower-order bits for decimal + * places. 32768 = 1 << 15, it is an integer representation + * of 0.5 and is for rounding. */ + *p = (*p * fade->factor + 32768) >> 16; + p++; + } + } + + if (outpic->data[0] && outpic->data[1]) { + /* chroma planes */ + for (plane = 1; plane < 3; plane++) { + for (i = 0; i < h; i++) { + p = outpic->data[plane] + ((y+i) >> fade->vsub) * outpic->linesize[plane]; + for (j = 0; j < inlink->w >> fade->hsub; j++) { + /* 8421367 = ((128 << 1) + 1) << 15. It is an integer + * representation of 128.5. The .5 is for rounding + * purposes. */ + *p = ((*p - 128) * fade->factor + 8421367) >> 16; + p++; + } + } + } + } + } + + avfilter_draw_slice(inlink->dst->outputs[0], y, h, slice_dir); +} + +static void end_frame(AVFilterLink *inlink) +{ + FadeContext *fade = inlink->dst->priv; + + avfilter_end_frame(inlink->dst->outputs[0]); + + if (fade->frame_index >= fade->start_frame && + fade->frame_index <= fade->stop_frame) + fade->factor += fade->fade_per_frame; + fade->factor = av_clip_uint16(fade->factor); + fade->frame_index++; +} + +AVFilter avfilter_vf_fade = { + .name = "fade", + .description = NULL_IF_CONFIG_SMALL("Fade in/out input video"), + .init = init, + .priv_size = sizeof(FadeContext), + .query_formats = query_formats, + + .inputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_props, + .get_video_buffer = avfilter_null_get_video_buffer, + .start_frame = avfilter_null_start_frame, + .draw_slice = draw_slice, + .end_frame = end_frame, + .min_perms = AV_PERM_READ | AV_PERM_WRITE, + .rej_perms = AV_PERM_PRESERVE, }, + { .name = NULL}}, + .outputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, }, + { .name = NULL}}, +}; -- 1.7.2.3
On Mon, Feb 21, 2011 at 12:02:57PM +0100, Stefano Sabatini wrote:
From: Brandon Mintern <bmintern at gmail.com>
Port fade filter from libavfilter soc repo, with minor fixes by Stefano. --- doc/filters.texi | 33 +++++++++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_fade.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 205 insertions(+), 0 deletions(-) create mode 100644 libavfilter/vf_fade.c
commited ideas for future work: allow multiple fade in / out per filter allow times in seconds instead of frame numbers regression test [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
On date Monday 2011-02-21 14:24:52 +0100, Michael Niedermayer encoded:
On Mon, Feb 21, 2011 at 12:02:57PM +0100, Stefano Sabatini wrote:
From: Brandon Mintern <bmintern at gmail.com>
Port fade filter from libavfilter soc repo, with minor fixes by Stefano. --- doc/filters.texi | 33 +++++++++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_fade.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 205 insertions(+), 0 deletions(-) create mode 100644 libavfilter/vf_fade.c
commited
ideas for future work:
allow multiple fade in / out per filter
Not sure about what you mean here.
allow times in seconds instead of frame numbers
I'm working on this, extending the syntax so that it will accept start time specified as an av_parse_time() string or #FRAME_NB, same for DURATION.
regression test
This should be easy to add. -- FFmpeg = Fascinating & Friendly Mysterious Powerful Enhancing Gospel
On Mon, Feb 21, 2011 at 03:58:17PM +0100, Stefano Sabatini wrote:
On date Monday 2011-02-21 14:24:52 +0100, Michael Niedermayer encoded:
On Mon, Feb 21, 2011 at 12:02:57PM +0100, Stefano Sabatini wrote:
From: Brandon Mintern <bmintern at gmail.com>
Port fade filter from libavfilter soc repo, with minor fixes by Stefano. --- doc/filters.texi | 33 +++++++++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_fade.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 205 insertions(+), 0 deletions(-) create mode 100644 libavfilter/vf_fade.c
commited
ideas for future work:
allow multiple fade in / out per filter
Not sure about what you mean here.
fade=in:10:20,fade=out:50:60 could be supported as: fade=in:10:20:50:60 and fade=out:10:20:50:60 to black a part out (currently not supported with individual filters easily) and more than 2, that is N such fade in/outs in a single filter would also be usefull for example consider that someone concatenates videos from several scenes to make a movie. She might want to create fade out+fade in at the transitions [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. -- Plato
On date Monday 2011-02-21 18:06:50 +0100, Michael Niedermayer encoded:
On Mon, Feb 21, 2011 at 03:58:17PM +0100, Stefano Sabatini wrote:
On date Monday 2011-02-21 14:24:52 +0100, Michael Niedermayer encoded:
On Mon, Feb 21, 2011 at 12:02:57PM +0100, Stefano Sabatini wrote:
From: Brandon Mintern <bmintern at gmail.com>
Port fade filter from libavfilter soc repo, with minor fixes by Stefano. --- doc/filters.texi | 33 +++++++++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_fade.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 205 insertions(+), 0 deletions(-) create mode 100644 libavfilter/vf_fade.c
commited
ideas for future work:
allow multiple fade in / out per filter
Not sure about what you mean here.
fade=in:10:20,fade=out:50:60 could be supported as: fade=in:10:20:50:60
and fade=out:10:20:50:60 to black a part out (currently not supported with individual filters easily)
and more than 2, that is N such fade in/outs in a single filter would also be usefull for example consider that someone concatenates videos from several scenes to make a movie. She might want to create fade out+fade in at the transitions
Uhm, so it may support a list: fade=out=S:D;in=S:D;out=S:D;... the list is translated to a struct array, after each iteration you have: factor_i+1 *= factor * factor_i; ";" is special in the filtergraph syntax, so this will require escaping: -vf "foo, bar, fade='...'" -- FFmpeg = Fast Fundamental Multimedia Powered Experimenting Gnome
On Mon, Feb 21, 2011 at 10:22:00PM +0100, Stefano Sabatini wrote:
On date Monday 2011-02-21 18:06:50 +0100, Michael Niedermayer encoded:
On Mon, Feb 21, 2011 at 03:58:17PM +0100, Stefano Sabatini wrote:
On date Monday 2011-02-21 14:24:52 +0100, Michael Niedermayer encoded:
On Mon, Feb 21, 2011 at 12:02:57PM +0100, Stefano Sabatini wrote:
From: Brandon Mintern <bmintern at gmail.com>
Port fade filter from libavfilter soc repo, with minor fixes by Stefano. --- doc/filters.texi | 33 +++++++++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_fade.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 205 insertions(+), 0 deletions(-) create mode 100644 libavfilter/vf_fade.c
commited
ideas for future work:
allow multiple fade in / out per filter
Not sure about what you mean here.
fade=in:10:20,fade=out:50:60 could be supported as: fade=in:10:20:50:60
and fade=out:10:20:50:60 to black a part out (currently not supported with individual filters easily)
and more than 2, that is N such fade in/outs in a single filter would also be usefull for example consider that someone concatenates videos from several scenes to make a movie. She might want to create fade out+fade in at the transitions
Uhm, so it may support a list: fade=out=S:D;in=S:D;out=S:D;...
fade=out=S:D:S:D:S:D:... doesnt need escaping and is shorter you cant have 2 out or 2 in after each other so this is not ambigous syntax [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB DNS cache poisoning attacks, popular search engine, Google internet authority dont be evil, please
On date Tuesday 2011-02-22 04:53:13 +0100, Michael Niedermayer encoded:
On Mon, Feb 21, 2011 at 10:22:00PM +0100, Stefano Sabatini wrote:
On date Monday 2011-02-21 18:06:50 +0100, Michael Niedermayer encoded: [...]
fade=in:10:20,fade=out:50:60 could be supported as: fade=in:10:20:50:60
and fade=out:10:20:50:60 to black a part out (currently not supported with individual filters easily)
and more than 2, that is N such fade in/outs in a single filter would also be usefull for example consider that someone concatenates videos from several scenes to make a movie. She might want to create fade out+fade in at the transitions
Uhm, so it may support a list: fade=out=S:D;in=S:D;out=S:D;...
fade=out=S:D:S:D:S:D:... doesnt need escaping and is shorter you cant have 2 out or 2 in after each other so this is not ambigous syntax
What about having two distinct fade and multifade filters? My problem with the multifade is that allowing #F and time format creates problems since it isn't possible to reliably predict the exact timing of a duration expressed using a number of frames, so you could have fade-in/fade-out intervals overlap or nesting. On the other hand I reckon that using frames for expressing init and end of a fade-in/out could be useful, and is not problematic for a single fade. So we could have: fade={in|out}=TIMEINT fade={in|out}=TIMEINT TIMEINT::= S+D | S-E (S=Start, D=Duration, E=End) where S, D, and E can be expressed both as a number of frame (#F, with F a number of frames) or TIME (where time is parsed by av_parse_time()). For the multi-fade: fade={in|out}=TIMEINT{:[{in|out}=]TIMEINT}* but with TIMEINT not supporting the #F syntax. The following in|out are optional, but may help redability: in=TIMEINT:out=TIMEINT:in=TIMEINT:out=TIMEINT rather than: in=TIMEINT:TIMEINT:TIMEINT:TIMEINT Another possibility would be to drop the #F syntax, and have just one fade filter. -- FFmpeg = Fiendish and Frenzy Magical Purposeless Elected Gnome
On Tue, Mar 08, 2011 at 11:39:01AM +0100, Stefano Sabatini wrote:
On date Tuesday 2011-02-22 04:53:13 +0100, Michael Niedermayer encoded:
On Mon, Feb 21, 2011 at 10:22:00PM +0100, Stefano Sabatini wrote:
On date Monday 2011-02-21 18:06:50 +0100, Michael Niedermayer encoded: [...]
fade=in:10:20,fade=out:50:60 could be supported as: fade=in:10:20:50:60
and fade=out:10:20:50:60 to black a part out (currently not supported with individual filters easily)
and more than 2, that is N such fade in/outs in a single filter would also be usefull for example consider that someone concatenates videos from several scenes to make a movie. She might want to create fade out+fade in at the transitions
Uhm, so it may support a list: fade=out=S:D;in=S:D;out=S:D;...
fade=out=S:D:S:D:S:D:... doesnt need escaping and is shorter you cant have 2 out or 2 in after each other so this is not ambigous syntax
What about having two distinct fade and multifade filters?
iam against that
My problem with the multifade is that allowing #F and time format creates problems since it isn't possible to reliably predict the exact timing of a duration expressed using a number of frames, so you could have fade-in/fade-out intervals overlap or nesting.
If the user specifies inconsitant parameters thats his fault. we just should detect it and print an error. with mixing time in seconds and frames that can only be detected at runtime. Seems no big issue to me, if the user mixes these 2 he is asking for it. [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Observe your enemies, for they first find out your faults. -- Antisthenes
On date Tuesday 2011-03-08 13:01:20 +0100, Michael Niedermayer wrote:
On Tue, Mar 08, 2011 at 11:39:01AM +0100, Stefano Sabatini wrote:
On date Tuesday 2011-02-22 04:53:13 +0100, Michael Niedermayer encoded:
On Mon, Feb 21, 2011 at 10:22:00PM +0100, Stefano Sabatini wrote:
On date Monday 2011-02-21 18:06:50 +0100, Michael Niedermayer encoded: [...]
fade=in:10:20,fade=out:50:60 could be supported as: fade=in:10:20:50:60
and fade=out:10:20:50:60 to black a part out (currently not supported with individual filters easily)
and more than 2, that is N such fade in/outs in a single filter would also be usefull for example consider that someone concatenates videos from several scenes to make a movie. She might want to create fade out+fade in at the transitions
Uhm, so it may support a list: fade=out=S:D;in=S:D;out=S:D;...
fade=out=S:D:S:D:S:D:... doesnt need escaping and is shorter you cant have 2 out or 2 in after each other so this is not ambigous syntax
What about having two distinct fade and multifade filters?
iam against that
On the other hand changing the syntax will break scripts (especially now that the filter was part of a release and has been integrated since many months), so I'm going to implement a separate filter, which will extend the old fade syntax.
On date Monday 2011-02-21 15:58:17 +0100, Stefano Sabatini encoded:
On date Monday 2011-02-21 14:24:52 +0100, Michael Niedermayer encoded:
On Mon, Feb 21, 2011 at 12:02:57PM +0100, Stefano Sabatini wrote:
From: Brandon Mintern <bmintern at gmail.com>
Port fade filter from libavfilter soc repo, with minor fixes by Stefano. --- doc/filters.texi | 33 +++++++++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_fade.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 205 insertions(+), 0 deletions(-) create mode 100644 libavfilter/vf_fade.c
commited
ideas for future work:
allow multiple fade in / out per filter
Not sure about what you mean here.
allow times in seconds instead of frame numbers
I'm working on this, extending the syntax so that it will accept start time specified as an av_parse_time() string or #FRAME_NB, same for DURATION.
Check patch, only partially tested, only posted for showing the syntax. -- FFmpeg = Fierce and Fascinating Minimalistic Puritan Ermetic God
On Mon, Feb 21, 2011 at 06:07:09PM +0100, Stefano Sabatini wrote:
On date Monday 2011-02-21 15:58:17 +0100, Stefano Sabatini encoded:
On date Monday 2011-02-21 14:24:52 +0100, Michael Niedermayer encoded:
On Mon, Feb 21, 2011 at 12:02:57PM +0100, Stefano Sabatini wrote:
From: Brandon Mintern <bmintern at gmail.com>
Port fade filter from libavfilter soc repo, with minor fixes by Stefano. --- doc/filters.texi | 33 +++++++++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_fade.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 205 insertions(+), 0 deletions(-) create mode 100644 libavfilter/vf_fade.c
commited
ideas for future work:
allow multiple fade in / out per filter
Not sure about what you mean here.
allow times in seconds instead of frame numbers
I'm working on this, extending the syntax so that it will accept start time specified as an av_parse_time() string or #FRAME_NB, same for DURATION.
Check patch, only partially tested, only posted for showing the syntax. [...] # fade out last 45 frames of a 200-frame video -fade=out:155:45 +fade=out:#155:#45 + +# fade out last 10 seconds frames of a 5 minutes video +# the quotes are required, since the time specification includes ":" +fade=out:'00:04:50':10
I dont think syntax needing escaping is a good idea i suggest fade=out:00h04m50s:10s [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Complexity theory is the science of finding the exact solution to an approximation. Benchmarking OTOH is finding an approximation of the exact
On date Monday 2011-02-21 14:24:52 +0100, Michael Niedermayer encoded:
On Mon, Feb 21, 2011 at 12:02:57PM +0100, Stefano Sabatini wrote:
From: Brandon Mintern <bmintern at gmail.com>
Port fade filter from libavfilter soc repo, with minor fixes by Stefano. --- doc/filters.texi | 33 +++++++++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_fade.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 205 insertions(+), 0 deletions(-) create mode 100644 libavfilter/vf_fade.c
commited
ideas for future work: allow multiple fade in / out per filter allow times in seconds instead of frame numbers regression test
Ping (I'd like to avoid too much divertion between the two repos). Working on the other features. -- FFmpeg = Freak Fanciful Miracolous Power Enhanced God
On Mon, Feb 21, 2011 at 12:02:57PM +0100, Stefano Sabatini wrote:
Port fade filter from libavfilter soc repo, with minor fixes by Stefano.
--- a/doc/filters.texi +++ b/doc/filters.texi @@ -465,6 +465,39 @@ within the parameter list.
+ at section fade + +Apply fade-in/out effect to input video. + +It accepts the parameters:
As a rule of thumb, avoid "it". There are too many opportunities to make a text harder to understand with it, while more specific sentence subjects almost never hurt.
+ at var{type} specifies if the effect type, can be either "in" for +fade-in, or "out" for a fade-out effect.
s/if//?
+ at var{start_frame} specifies the number of the start frame for starting +to apply the fade effect.
var{start_frame} specifies the number of the frame at which to start applying the fade effect.
+A few usage examples follow, usable too as test scenarios.
A few usage examples that may also serve as test scenarios follow.
+ at example +# fade in first 30 frames of video
I'd properly capitalize here, same below. Diego
participants (4)
-
diego@biurrun.de -
michaelni@gmx.at -
Stefano Sabatini -
stefano.sabatini-lala@poste.it