Commit a7ac05ce authored by Nicolas George's avatar Nicolas George

src_movie: implement multiple outputs.

The audio and video code paths were too different,
most of the decoding has been rewritten.
parent 05776119
...@@ -960,35 +960,8 @@ aevalsrc="0.1*sin(2*PI*(360-2.5/2)*t) : 0.1*sin(2*PI*(360+2.5/2)*t)" ...@@ -960,35 +960,8 @@ aevalsrc="0.1*sin(2*PI*(360-2.5/2)*t) : 0.1*sin(2*PI*(360+2.5/2)*t)"
@section amovie @section amovie
Read an audio stream from a movie container. This is the same as @ref{src_movie} source, except it selects an audio
stream by default.
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
Specify 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
Specify 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
Specify the index of the audio stream to read. If the value is -1,
the best suited audio stream will be automatically selected. Default
value is "-1".
@end table
@section anullsrc @section anullsrc
...@@ -3639,9 +3612,10 @@ to the pad with identifier "in". ...@@ -3639,9 +3612,10 @@ to the pad with identifier "in".
"color=c=red@@0.2:s=qcif:r=10 [color]; [in][color] overlay [out]" "color=c=red@@0.2:s=qcif:r=10 [color]; [in][color] overlay [out]"
@end example @end example
@anchor{src_movie}
@section movie @section movie
Read a video stream from a movie container. Read audio and/or video stream(s) from a movie container.
It accepts the syntax: @var{movie_name}[:@var{options}] where It accepts the syntax: @var{movie_name}[:@var{options}] where
@var{movie_name} is the name of the resource to read (not necessarily @var{movie_name} is the name of the resource to read (not necessarily
...@@ -3664,13 +3638,22 @@ starting from this seek point, the parameter is evaluated with ...@@ -3664,13 +3638,22 @@ starting from this seek point, the parameter is evaluated with
@code{av_strtod} so the numerical value may be suffixed by an IS @code{av_strtod} so the numerical value may be suffixed by an IS
postfix. Default value is "0". postfix. Default value is "0".
@item streams, s
Specifies the streams to read. Several streams can be specified, separated
by "+". The source will then have as many outputs, in the same order. The
syntax is explained in the @ref{Stream specifiers} chapter. Two special
names, "dv" and "da" specify respectively the default (best suited) video
and audio stream. Default is "dv", or "da" if the filter is called as
"amovie".
@item stream_index, si @item stream_index, si
Specifies the index of the video stream to read. If the value is -1, Specifies the index of the video stream to read. If the value is -1,
the best suited video stream will be automatically selected. Default the best suited video stream will be automatically selected. Default
value is "-1". value is "-1". Deprecated. If the filter is called "amovie", it will select
audio instead of video.
@item loop @item loop
Specifies how many times to read the video stream in sequence. Specifies how many times to read the stream in sequence.
If the value is less than 1, the stream will be read again and again. If the value is less than 1, the stream will be read again and again.
Default value is "1". Default value is "1".
...@@ -3699,6 +3682,10 @@ movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [movie]; ...@@ -3699,6 +3682,10 @@ movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [movie];
movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [movie]; movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [movie];
[in] setpts=PTS-STARTPTS, [movie] overlay=16:16 [out] [in] setpts=PTS-STARTPTS, [movie] overlay=16:16 [out]
# read the first video stream and the audio stream with id 0x81 from
# dvd.vob; the video is connected to the pad named "video" and the audio is
# connected to the pad named "audio":
movie=dvd.vob:s=v:0+#0x81 [video] [audio]
@end example @end example
@section mptestsrc @section mptestsrc
......
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