will copy all the streams except the second video, which will be encoded with
libx264, and the 138th audio, which will be encoded with libvorbis.
-@item -t @var{duration} (@emph{output})
-Stop writing the output after its duration reaches @var{duration}.
+@item -t @var{duration} (@emph{input/output})
+When used as an input option (before @code{-i}), limit the @var{duration} of
+data read from the input file.
+
+When used as an output option (before an output filename), stop writing the
+output after its duration reaches @var{duration}.
+
@var{duration} may be a number in seconds, or in @code{hh:mm:ss[.xxx]} form.
-to and -t are mutually exclusive and -t has priority.
To set the language of the first audio stream:
@example
-ffmpeg -i INPUT -metadata:s:a:1 language=eng OUTPUT
+ffmpeg -i INPUT -metadata:s:a:0 language=eng OUTPUT
@end example
@item -target @var{type} (@emph{output})
As an input option, ignore any timestamps stored in the file and instead
generate timestamps assuming constant frame rate @var{fps}.
+This is not the same as the @option{-framerate} option used for some input formats
+like image2 or v4l2 (it used to be the same in older versions of FFmpeg).
+If in doubt use @option{-framerate} instead of the input option @option{-r}.
As an output option, duplicate or drop input frames to achieve constant output
frame rate @var{fps}.
This is an alias for @code{-filter:v}, see the @ref{filter_option,,-filter option}.
@end table
-@section Advanced Video Options
+@section Advanced Video options
@table @option
@item -pix_fmt[:@var{stream_specifier}] @var{format} (@emph{input/output,per-stream})
This is an alias for @code{-filter:a}, see the @ref{filter_option,,-filter option}.
@end table
-@section Advanced Audio options:
+@section Advanced Audio options
@table @option
@item -atag @var{fourcc/tag} (@emph{output})
0 to disable all guessing.
@end table
-@section Subtitle options:
+@section Subtitle options
@table @option
@item -scodec @var{codec} (@emph{input/output})
Deprecated, see -bsf
@end table
-@section Advanced Subtitle options:
+@section Advanced Subtitle options
@table @option
ffmpeg -i INPUT -map 0 -map -0:a:1 OUTPUT
@end example
+To pick the English audio stream:
+@example
+ffmpeg -i INPUT -map 0:m:language:eng OUTPUT
+@end example
+
Note that using this option disables the default mappings for this output file.
@item -map_channel [@var{input_file_id}.@var{stream_specifier}.@var{channel_id}|-1][:@var{output_file_id}.@var{stream_specifier}]
The option is intended for cases where features are needed that cannot be
specified to @command{ffserver} but can be to @command{ffmpeg}.
+@item -discard (@emph{input})
+Allows discarding specific streams or frames of streams at the demuxer.
+Not all demuxers support this.
+
+@table @option
+@item none
+Discard no frame.
+
+@item default
+Default, which discards no frames.
+
+@item noref
+Discard all non-reference frames.
+
+@item bidir
+Discard all bidirectional frames.
+
+@item nokey
+Discard all frames excepts keyframes.
+
+@item all
+Discard all frames.
+@end table
+
@end table
As a special exception, you can use a bitmap subtitle stream as input: it
You can put many streams of the same type in the output:
@example
-ffmpeg -i test1.avi -i test2.avi -map 0:3 -map 0:2 -map 0:1 -map 0:0 -c copy test12.nut
+ffmpeg -i test1.avi -i test2.avi -map 1:1 -map 1:0 -map 0:1 -map 0:0 -c copy -y test12.nut
@end example
-The resulting output file @file{test12.avi} will contain first four streams from
-the input file in reverse order.
+The resulting output file @file{test12.nut} will contain the first four streams
+from the input files in reverse order.
@item
To force CBR video output: