Commit 0244879f authored by Stefano Sabatini's avatar Stefano Sabatini Committed by Anton Khirnov

lavfi: add testsrc source

Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 4e64c4d5
......@@ -1974,6 +1974,52 @@ Some examples follow:
frei0r_src=200x200:10:partik0l=1234 [overlay]; [in][overlay] overlay
@end example
@section testsrc
Generate a test video pattern, showing a color pattern, a scrolling
gradient and a timestamp. This is mainly intended for testing
purposes.
It accepts an optional sequence of @var{key}=@var{value} pairs,
separated by ":". The description of the accepted options follows.
@table @option
@item size, s
Specify the size of the sourced video, it may be a string of the form
@var{width}x@var{heigth}, or the name of a size abbreviation. The
default value is "320x240".
@item rate, r
Specify the frame rate of the sourced video, as the number of frames
generated per second. It has to be a string in the format
@var{frame_rate_num}/@var{frame_rate_den}, an integer number, a float
number or a valid video frame rate abbreviation. The default value is
"25".
@item sar
Set the sample aspect ratio of the sourced video.
@item duration
Set the video duration of the sourced video. The accepted syntax is:
@example
[-]HH[:MM[:SS[.m...]]]
[-]S+[.m...]
@end example
See also the function @code{av_parse_time()}.
If not specified, or the expressed duration is negative, the video is
supposed to be generated forever.
@end table
For example the following:
@example
testsrc=duration=5.3:size=qcif:rate=10
@end example
will generate a video with a duration of 5.3 seconds, with size
176x144 and a framerate of 10 frames per second.
@c man end VIDEO SOURCES
@chapter Video Sinks
......
......@@ -64,6 +64,7 @@ OBJS-$(CONFIG_COLOR_FILTER) += vsrc_color.o
OBJS-$(CONFIG_FREI0R_SRC_FILTER) += vf_frei0r.o
OBJS-$(CONFIG_MOVIE_FILTER) += vsrc_movie.o
OBJS-$(CONFIG_NULLSRC_FILTER) += vsrc_nullsrc.o
OBJS-$(CONFIG_TESTSRC_FILTER) += vsrc_testsrc.o
OBJS-$(CONFIG_NULLSINK_FILTER) += vsink_nullsink.o
......
......@@ -85,6 +85,7 @@ void avfilter_register_all(void)
REGISTER_FILTER (FREI0R, frei0r_src, vsrc);
REGISTER_FILTER (MOVIE, movie, vsrc);
REGISTER_FILTER (NULLSRC, nullsrc, vsrc);
REGISTER_FILTER (TESTSRC, testsrc, vsrc);
REGISTER_FILTER (NULLSINK, nullsink, vsink);
}
......@@ -29,7 +29,7 @@
#include "libavutil/rational.h"
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 11
#define LIBAVFILTER_VERSION_MINOR 12
#define LIBAVFILTER_VERSION_MICRO 0
#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