Commit 15f4b3db authored by Paul B Mahol's avatar Paul B Mahol

avfilter: add framerate video filter

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 57cd2f77
...@@ -37,6 +37,7 @@ version <next>: ...@@ -37,6 +37,7 @@ version <next>:
- hstack and vstack filter - hstack and vstack filter
- Support DNx100 (1440x1080@8) - Support DNx100 (1440x1080@8)
- VAAPI hevc hwaccel - VAAPI hevc hwaccel
- framerate filter
version 2.7: version 2.7:
......
...@@ -6015,6 +6015,51 @@ ffmpeg -i LEFT -i RIGHT -filter_complex framepack=frameseq OUTPUT ...@@ -6015,6 +6015,51 @@ ffmpeg -i LEFT -i RIGHT -filter_complex framepack=frameseq OUTPUT
ffmpeg -i LEFT -i RIGHT -filter_complex [0:v]scale=w=iw/2[left],[1:v]scale=w=iw/2[right],[left][right]framepack=sbs OUTPUT ffmpeg -i LEFT -i RIGHT -filter_complex [0:v]scale=w=iw/2[left],[1:v]scale=w=iw/2[right],[left][right]framepack=sbs OUTPUT
@end example @end example
@section framerate
Change the frame rate by interpolating new video output frames from the source
frames.
This filter is not designed to function correctly with interlaced media. If
you wish to change the frame rate of interlaced media then you are required
to deinterlace before this filter and re-interlace after this filter.
A description of the accepted options follows.
@table @option
@item fps
Specify the output frames per second. This option can also be specified
as a value alone. The default is @code{50}.
@item interp_start
Specify the start of a range where the output frame will be created as a
linear interpolation of two frames. The range is [@code{0}-@code{255}],
the default is @code{15}.
@item interp_end
Specify the end of a range where the output frame will be created as a
linear interpolation of two frames. The range is [@code{0}-@code{255}],
the default is @code{240}.
@item scene
Specify the level at which a scene change is detected as a value between
0 and 100 to indicate a new scene; a low value reflects a low
probability for the current frame to introduce a new scene, while a higher
value means the current frame is more likely to be one.
The default is @code{7}.
@item flags
Specify flags influencing the filter process.
Available value for @var{flags} is:
@table @option
@item scene_change_detect, scd
Enable scene change detection using the value of the option @var{scene}.
This flag is enabled by default.
@end table
@end table
@section framestep @section framestep
Select one frame every N-th frame. Select one frame every N-th frame.
......
...@@ -142,6 +142,7 @@ OBJS-$(CONFIG_FIND_RECT_FILTER) += vf_find_rect.o lavfutils.o ...@@ -142,6 +142,7 @@ OBJS-$(CONFIG_FIND_RECT_FILTER) += vf_find_rect.o lavfutils.o
OBJS-$(CONFIG_FORMAT_FILTER) += vf_format.o OBJS-$(CONFIG_FORMAT_FILTER) += vf_format.o
OBJS-$(CONFIG_FPS_FILTER) += vf_fps.o OBJS-$(CONFIG_FPS_FILTER) += vf_fps.o
OBJS-$(CONFIG_FRAMEPACK_FILTER) += vf_framepack.o OBJS-$(CONFIG_FRAMEPACK_FILTER) += vf_framepack.o
OBJS-$(CONFIG_FRAMERATE_FILTER) += vf_framerate.o
OBJS-$(CONFIG_FRAMESTEP_FILTER) += vf_framestep.o OBJS-$(CONFIG_FRAMESTEP_FILTER) += vf_framestep.o
OBJS-$(CONFIG_FREI0R_FILTER) += vf_frei0r.o OBJS-$(CONFIG_FREI0R_FILTER) += vf_frei0r.o
OBJS-$(CONFIG_FSPP_FILTER) += vf_fspp.o OBJS-$(CONFIG_FSPP_FILTER) += vf_fspp.o
......
...@@ -158,6 +158,7 @@ void avfilter_register_all(void) ...@@ -158,6 +158,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(FORMAT, format, vf); REGISTER_FILTER(FORMAT, format, vf);
REGISTER_FILTER(FPS, fps, vf); REGISTER_FILTER(FPS, fps, vf);
REGISTER_FILTER(FRAMEPACK, framepack, vf); REGISTER_FILTER(FRAMEPACK, framepack, vf);
REGISTER_FILTER(FRAMERATE, framerate, vf);
REGISTER_FILTER(FRAMESTEP, framestep, vf); REGISTER_FILTER(FRAMESTEP, framestep, vf);
REGISTER_FILTER(FREI0R, frei0r, vf); REGISTER_FILTER(FREI0R, frei0r, vf);
REGISTER_FILTER(FSPP, fspp, vf); REGISTER_FILTER(FSPP, fspp, vf);
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "libavutil/version.h" #include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 5 #define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR 38 #define LIBAVFILTER_VERSION_MINOR 39
#define LIBAVFILTER_VERSION_MICRO 100 #define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment