Commit 9409c381 authored by Stefano Sabatini's avatar Stefano Sabatini Committed by Janne Grunau

libavfilter: add video movie source

See thread:
Subject: [PATCH] movie video source
Date: 2010-12-31 15:35:30 GMT
Signed-off-by: 's avatarJanne Grunau <janne-ffmpeg@jannau.net>
parent 0cad24ce
......@@ -75,6 +75,7 @@ version <next>:
- ffmpeg -copytb option added
- IVF muxer added
- Wing Commander IV movies decoder added
- movie source added
version 0.6:
......
......@@ -1088,6 +1088,61 @@ to the pad with identifier "in".
"color=red@@0.2:qcif:10 [color]; [in][color] overlay [out]"
@end example
@section movie
Read a video stream from a movie container.
It accepts the syntax: @var{movie_name}[:@var{options}] where
@var{movie_name} is the name of the resource to read (not necessarily
a file but also a device or a stream accessed through some protocol),
and @var{options} is an optional sequence of @var{key}=@var{value}
pairs, separated by ":".
The description of the accepted options follows.
@table @option
@item format_name, f
Specifies the format assumed for the movie to read, and can be either
the name of a container or an input device. If not specified the
format is guessed from @var{movie_name} or by probing.
@item seek_point, sp
Specifies the seek point in seconds, the frames will be output
starting from this seek point, the parameter is evaluated with
@code{av_strtod} so the numerical value may be suffixed by an IS
postfix. Default value is "0".
@item stream_index, si
Specifies the index of the video stream to read. If the value is -1,
the best suited video stream will be automatically selected. Default
value is "-1".
@end table
This filter allows to overlay a second video on top of main input of
a filtergraph as shown in this graph:
@example
input -----------> deltapts0 --> overlay --> output
^
|
movie --> scale--> deltapts1 -------+
@end example
Some examples follow:
@example
# skip 3.2 seconds from the start of the avi file in.avi, and overlay it
# on top of the input labelled as "in".
movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [movie];
[in] setpts=PTS-STARTPTS, [movie] overlay=16:16 [out]
# read from a video4linux2 device, and overlay it on top of the input
# labelled as "in"
movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [movie];
[in] setpts=PTS-STARTPTS, [movie] overlay=16:16 [out]
@end example
@section nullsrc
Null video source, never return images. It is mainly useful as a
......
......@@ -2,6 +2,7 @@ include $(SUBDIR)../config.mak
NAME = avfilter
FFLIBS = avcore avutil
FFLIBS-$(CONFIG_MOVIE_FILTER) += avformat avcodec
FFLIBS-$(CONFIG_SCALE_FILTER) += swscale
HEADERS = avfilter.h avfiltergraph.h
......@@ -50,6 +51,7 @@ OBJS-$(CONFIG_YADIF_FILTER) += vf_yadif.o
OBJS-$(CONFIG_BUFFER_FILTER) += vsrc_buffer.o
OBJS-$(CONFIG_COLOR_FILTER) += vf_pad.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_NULLSINK_FILTER) += vsink_nullsink.o
......
......@@ -71,6 +71,7 @@ void avfilter_register_all(void)
REGISTER_FILTER (BUFFER, buffer, vsrc);
REGISTER_FILTER (COLOR, color, vsrc);
REGISTER_FILTER (FREI0R, frei0r_src, vsrc);
REGISTER_FILTER (MOVIE, movie, vsrc);
REGISTER_FILTER (NULLSRC, nullsrc, vsrc);
REGISTER_FILTER (NULLSINK, nullsink, vsink);
......
......@@ -27,7 +27,7 @@
#include "libavcore/samplefmt.h"
#define LIBAVFILTER_VERSION_MAJOR 1
#define LIBAVFILTER_VERSION_MINOR 74
#define LIBAVFILTER_VERSION_MINOR 75
#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