]> git.sesse.net Git - ffmpeg/blobdiff - doc/ffmpeg.texi
ape: adjust some printf format strings to correctly match argument types
[ffmpeg] / doc / ffmpeg.texi
index f0f3b650845bb849462e14002b2248a23643082b..5a783e3c150c049a8816e7fac7634f7e6d9d09a3 100644 (file)
@@ -1,8 +1,8 @@
 \input texinfo @c -*- texinfo -*-
 
-@settitle FFmpeg Documentation
+@settitle ffmpeg Documentation
 @titlepage
-@center @titlefont{FFmpeg Documentation}
+@center @titlefont{ffmpeg Documentation}
 @end titlepage
 
 @top
@@ -22,17 +22,15 @@ ffmpeg [[infile options][@option{-i} @var{infile}]]... @{[outfile options] @var{
 @chapter Description
 @c man begin DESCRIPTION
 
-FFmpeg is a very fast video and audio converter. It can also grab from
-a live audio/video source.
+ffmpeg is a very fast video and audio converter that can also grab from
+a live audio/video source. It can also convert between arbitrary sample
+rates and resize video on the fly with a high quality polyphase filter.
 
 The command line interface is designed to be intuitive, in the sense
-that FFmpeg tries to figure out all parameters that can possibly be
+that ffmpeg tries to figure out all parameters that can possibly be
 derived automatically. You usually only have to specify the target
 bitrate you want.
 
-FFmpeg can also convert from any sample rate to any other, and resize
-video on the fly with a high quality polyphase filter.
-
 As a general rule, options are applied to the next specified
 file. Therefore, order is important, and you can have the same
 option on the command line multiple times. Each occurrence is
@@ -61,7 +59,7 @@ ffmpeg -r 1 -i input.m2v -r 24 output.avi
 
 The format option may be needed for raw input files.
 
-By default, FFmpeg tries to convert as losslessly as possible: It
+By default ffmpeg tries to convert as losslessly as possible: It
 uses the same audio and video parameters for the outputs as the one
 specified for the inputs.
 
@@ -161,8 +159,6 @@ Set the ISO 639 language code (3 letters) of the current subtitle stream.
 @section Video Options
 
 @table @option
-@item -b @var{bitrate}
-Set the video bitrate in bit/s (default = 200 kb/s).
 @item -vframes @var{number}
 Set the number of video frames to record.
 @item -r @var{fps}
@@ -232,7 +228,13 @@ The following abbreviations are recognized:
 @end table
 
 @item -aspect @var{aspect}
-Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777).
+Set the video display aspect ratio specified by @var{aspect}.
+
+@var{aspect} can be a floating point number string, or a string of the
+form @var{num}:@var{den}, where @var{num} and @var{den} are the
+numerator and denominator of the aspect ratio. For example "4:3",
+"16:9", "1.3333", and "1.7777" are valid argument values.
+
 @item -croptop @var{size}
 @item -cropbottom @var{size}
 @item -cropleft @var{size}
@@ -272,7 +274,7 @@ Set video buffer verifier buffer size (in bits).
 Force video codec to @var{codec}. Use the @code{copy} special value to
 tell that the raw codec data must be copied as is.
 @item -sameq
-Use same video quality as source (implies VBR).
+Use same quantizer as source (implies VBR).
 
 @item -pass @var{n}
 Select the pass number (1 or 2). It is used to do two-pass
@@ -486,7 +488,7 @@ Use 'frames' B-frames (supported for MPEG-1, MPEG-2 and MPEG-4).
 macroblock decision
 @table @samp
 @item 0
-FF_MB_DECISION_SIMPLE: Use mb_cmp (cannot change it yet in FFmpeg).
+FF_MB_DECISION_SIMPLE: Use mb_cmp (cannot change it yet in ffmpeg).
 @item 1
 FF_MB_DECISION_BITS: Choose the one which needs the fewest bits.
 @item 2
@@ -547,19 +549,17 @@ The timestamps must be specified in ascending order.
 @item -aframes @var{number}
 Set the number of audio frames to record.
 @item -ar @var{freq}
-Set the audio sampling frequency. For input streams it is set by
-default to 44100 Hz, for output streams it is set by default to the
-frequency of the input stream. If the input file has audio streams
-with different frequencies, the behaviour is undefined.
-@item -ab @var{bitrate}
-Set the audio bitrate in bit/s (default = 64k).
+Set the audio sampling frequency. For output streams it is set by
+default to the frequency of the corresponding input stream. For input
+streams this option only makes sense for audio grabbing devices and raw
+demuxers and is mapped to the corresponding demuxer options.
 @item -aq @var{q}
 Set the audio quality (codec-specific, VBR).
 @item -ac @var{channels}
-Set the number of audio channels. For input streams it is set by
-default to 1, for output streams it is set by default to the same
-number of audio channels in input. If the input file has audio streams
-with different channel count, the behaviour is undefined.
+Set the number of audio channels. For output streams it is set by
+default to the number of input audio channels. For input streams
+this option only makes sense for audio grabbing devices and raw demuxers
+and is mapped to the corresponding demuxer options.
 @item -an
 Disable audio recording.
 @item -acodec @var{codec}
@@ -586,6 +586,28 @@ Set the ISO 639 language code (3 letters) of the current audio stream.
 @table @option
 @item -atag @var{fourcc/tag}
 Force audio tag/fourcc.
+@item -audio_service_type @var{type}
+Set the type of service that the audio stream contains.
+@table @option
+@item ma
+Main Audio Service (default)
+@item ef
+Effects
+@item vi
+Visually Impaired
+@item hi
+Hearing Impaired
+@item di
+Dialogue
+@item co
+Commentary
+@item em
+Emergency
+@item vo
+Voice Over
+@item ka
+Karaoke
+@end table
 @item -absf @var{bitstream_filter}
 Bitstream filters available are "dump_extra", "remove_extra", "noise", "mp3comp", "mp3decomp".
 @end table
@@ -622,11 +644,43 @@ Synchronize read on input.
 @section Advanced options
 
 @table @option
-@item -map @var{input_stream_id}[:@var{sync_stream_id}]
-Set stream mapping from input streams to output streams.
-Just enumerate the input streams in the order you want them in the output.
-@var{sync_stream_id} if specified sets the input stream to sync
-against.
+@item -map @var{input_file_id}.@var{input_stream_id}[:@var{sync_file_id}.@var{sync_stream_id}]
+
+Designate an input stream as a source for the output file. Each input
+stream is identified by the input file index @var{input_file_id} and
+the input stream index @var{input_stream_id} within the input
+file. Both indexes start at 0. If specified,
+@var{sync_file_id}.@var{sync_stream_id} sets which input stream
+is used as a presentation sync reference.
+
+The @code{-map} options must be specified just after the output file.
+If any @code{-map} options are used, the number of @code{-map} options
+on the command line must match the number of streams in the output
+file. The first @code{-map} option on the command line specifies the
+source for output stream 0, the second @code{-map} option specifies
+the source for output stream 1, etc.
+
+For example, if you have two audio streams in the first input file,
+these streams are identified by "0.0" and "0.1". You can use
+@code{-map} to select which stream to place in an output file. For
+example:
+@example
+ffmpeg -i INPUT out.wav -map 0.1
+@end example
+will map the input stream in @file{INPUT} identified by "0.1" to
+the (single) output stream in @file{out.wav}.
+
+For example, to select the stream with index 2 from input file
+@file{a.mov} (specified by the identifier "0.2"), and stream with
+index 6 from input @file{b.mov} (specified by the identifier "1.6"),
+and copy them to the output file @file{out.mov}:
+@example
+ffmpeg -i a.mov -i b.mov -vcodec copy -acodec copy out.mov -map 0.2 -map 1.6
+@end example
+
+To add more streams to the output file, you can use the
+@code{-newaudio}, @code{-newvideo}, @code{-newsubtitle} options.
+
 @item -map_meta_data @var{outfile}[,@var{metadata}]:@var{infile}[,@var{metadata}]
 Deprecated, use @var{-map_metadata} instead.
 
@@ -673,9 +727,11 @@ Read input at native frame rate. Mainly used to simulate a grab device.
 @item -loop_input
 Loop over the input stream. Currently it works only for image
 streams. This option is used for automatic FFserver testing.
+This option is deprecated, use -loop.
 @item -loop_output @var{number_of_times}
 Repeatedly loop output for formats that support looping such as animated GIF
 (0 will loop the output infinitely).
+This option is deprecated, use -loop.
 @item -threads @var{count}
 Thread count.
 @item -vsync @var{parameter}
@@ -735,7 +791,7 @@ A preset file contains a sequence of @var{option}=@var{value} pairs,
 one for each line, specifying a sequence of options which would be
 awkward to specify on the command line. Lines starting with the hash
 ('#') character are ignored and are used to provide comments. Check
-the @file{ffpresets} directory in the FFmpeg source tree for examples.
+the @file{ffpresets} directory in the Libav source tree for examples.
 
 Preset files are specified with the @code{vpre}, @code{apre},
 @code{spre}, and @code{fpre} options. The @code{fpre} option takes the
@@ -814,22 +870,22 @@ It allows almost lossless encoding.
 
 @section Video and Audio grabbing
 
-FFmpeg can grab video and audio from devices given that you specify the input
-format and device.
+If you specify the input format and device then ffmpeg can grab video
+and audio directly.
 
 @example
 ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpg
 @end example
 
 Note that you must activate the right video source and channel before
-launching FFmpeg with any TV viewer such as xawtv
-(@url{http://linux.bytesex.org/xawtv/}) by Gerd Knorr. You also
+launching ffmpeg with any TV viewer such as
+@uref{http://linux.bytesex.org/xawtv/, xawtv} by Gerd Knorr. You also
 have to set the audio recording levels correctly with a
 standard mixer.
 
 @section X11 grabbing
 
-FFmpeg can grab the X11 display.
+Grab the X11 display with ffmpeg via
 
 @example
 ffmpeg -f x11grab -s cif -r 25 -i :0.0 /tmp/out.mpg
@@ -847,7 +903,7 @@ variable. 10 is the x-offset and 20 the y-offset for the grabbing.
 
 @section Video and Audio file format conversion
 
-FFmpeg can use any supported file format and protocol as input:
+Any supported file format and protocol can serve as input to ffmpeg:
 
 Examples:
 @itemize
@@ -867,7 +923,7 @@ It will use the files:
 The Y files use twice the resolution of the U and V files. They are
 raw files, without header. They can be generated by all decent video
 decoders. You must specify the size of the image with the @option{-s} option
-if FFmpeg cannot guess it.
+if ffmpeg cannot guess it.
 
 @item
 You can input from a raw YUV420P file:
@@ -994,14 +1050,14 @@ file to which you want to add them.
 @ignore
 
 @setfilename ffmpeg
-@settitle FFmpeg video converter
+@settitle ffmpeg video converter
 
 @c man begin SEEALSO
-ffplay(1), ffprobe(1), ffserver(1) and the FFmpeg HTML documentation
+ffplay(1), ffprobe(1), ffserver(1) and the Libav HTML documentation
 @c man end
 
 @c man begin AUTHORS
-The FFmpeg developers
+The Libav developers
 @c man end
 
 @end ignore