Commit 4c5f7207 authored by Diego Biurrun's avatar Diego Biurrun
Browse files

spelling/grammar/wording

Originally committed as revision 4492 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 804b0dac
......@@ -14,8 +14,9 @@ FFmpeg is a very fast video and audio converter. It can also grab from
a live audio/video source.
The command line interface is designed to be intuitive, in the sense
that ffmpeg tries to figure out all the parameters, when
possible. You have usually to give only the target bitrate you want.
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.
......@@ -33,18 +34,18 @@ ffmpeg /tmp/out.mpg
@end example
Note that you must activate the right video source and channel before
launching ffmpeg. You can use any TV viewer such as xawtv
(@url{http://bytesex.org/xawtv/}) by Gerd Knorr which I find very
good. You must also set correctly the audio recording levels with a
launching FFmpeg with any TV viewer such as xawtv
(@url{http://bytesex.org/xawtv/}) by Gerd Knorr. You also
have to set the audio recording levels correctly with a
standard mixer.
@section Video and Audio file format conversion
* ffmpeg can use any supported file format and protocol as input:
* FFmpeg can use any supported file format and protocol as input:
Examples:
* You can input from YUV files:
* You can use YUV files as input:
@example
ffmpeg -i /tmp/test%d.Y /tmp/out.mpg
......@@ -59,19 +60,19 @@ 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.
* You can input from a RAW YUV420P file:
* You can input from a raw YUV420P file:
@example
ffmpeg -i /tmp/test.yuv /tmp/out.avi
@end example
The RAW YUV420P is a file containing RAW YUV planar, for each frame first
come the Y plane followed by U and V planes, which are half vertical and
test.yuv is a file containing raw YUV planar data. Each frame is composed
of the Y plane followed by the U and V planes at half vertical and
horizontal resolution.
* You can output to a RAW YUV420P file:
* You can output to a raw YUV420P file:
@example
ffmpeg -i mydivx.avi -o hugefile.yuv
......@@ -83,8 +84,8 @@ ffmpeg -i mydivx.avi -o hugefile.yuv
ffmpeg -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg
@end example
Convert the audio file a.wav and the raw YUV video file a.yuv
to MPEG file a.mpg
Converts the audio file a.wav and the raw YUV video file a.yuv
to MPEG file a.mpg.
* You can also do audio and video conversions at the same time:
......@@ -92,7 +93,7 @@ to MPEG file a.mpg
ffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2
@end example
Convert the sample rate of a.wav to 22050 Hz and encode it to MPEG audio.
Converts a.wav to MPEG audio at 22050Hz sample rate.
* You can encode to several formats at the same time and define a
mapping from input stream to output streams:
......@@ -101,8 +102,8 @@ mapping from input stream to output streams:
ffmpeg -i /tmp/a.wav -ab 64 /tmp/a.mp2 -ab 128 /tmp/b.mp2 -map 0:0 -map 0:0
@end example
Convert a.wav to a.mp2 at 64 kbits and b.mp2 at 128 kbits. '-map
file:index' specify which input stream is used for each output
Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits. '-map
file:index' specifies which input stream is used for each output
stream, in the order of the definition of output streams.
* You can transcode decrypted VOBs
......@@ -111,16 +112,16 @@ stream, in the order of the definition of output streams.
ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800 -g 300 -bf 2 -acodec mp3 -ab 128 snatch.avi
@end example
This is a typical DVD ripper example, input from a VOB file, output
to an AVI file with MPEG-4 video and MP3 audio, note that in this
command we use B frames so the MPEG-4 stream is DivX5 compatible, GOP
size is 300 that means an INTRA frame every 10 seconds for 29.97 fps
input video. Also the audio stream is MP3 encoded so you need LAME
support which is enabled using @code{--enable-mp3lame} when
configuring. The mapping is particularly useful for DVD transcoding
This is a typical DVD ripping example; the input is a VOB file, the
output an AVI file with MPEG-4 video and MP3 audio. Note that in this
command we use B-frames so the MPEG-4 stream is DivX5 compatible, and
GOP size is 300 which means one intra frame every 10 seconds for 29.97fps
input video. Furthermore, the audio stream is MP3-encoded so you need
to enable LAME support by passing @code{--enable-mp3lame} to configure.
The mapping is particularly useful for DVD transcoding
to get the desired audio language.
NOTE: to see the supported input formats, use @code{ffmpeg -formats}.
NOTE: To see the supported input formats, use @code{ffmpeg -formats}.
@c man end
@chapter Invocation
......@@ -139,11 +140,11 @@ If no input file is given, audio/video grabbing is done.
As a general rule, options are applied to the next specified
file. For example, if you give the @option{-b 64} option, it sets the video
bitrate of the next file. Format option may be needed for raw input
bitrate of the next file. The format option may be needed for raw input
files.
By default, ffmpeg tries to convert as losslessly as possible: it
uses the same audio and video parameter for the outputs as the one
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.
@c man end
......@@ -152,68 +153,69 @@ specified for the inputs.
@table @option
@item -L
show license
Show license.
@item -h
show help
Show help.
@item -formats
show available formats, codecs, protocols, ...
Show available formats, codecs, protocols, ...
@item -f fmt
force format
Force format.
@item -i filename
input file name
input filename
@item -y
overwrite output files
Overwrite output files.
@item -t duration
set the recording time in seconds. @code{hh:mm:ss[.xxx]} syntax is also
supported.
Set the recording time in seconds.
@code{hh:mm:ss[.xxx]} syntax is also supported.
@item -ss position
seek to given time position. @code{hh:mm:ss[.xxx]} syntax is also
supported.
Seek to given time position in seconds.
@code{hh:mm:ss[.xxx]} syntax is also supported.
@item -title string
set the title
Set the title.
@item -author string
set the author
Set the author.
@item -copyright string
set the copyright
Set the copyright.
@item -comment string
set the comment
Set the comment.
@item -target type
specify target file type ("vcd", "svcd", "dvd", "dv", "pal-vcd", "ntsc-svcd", ... ). All the format
options (bitrate, codecs, buffer sizes) are automatically set by this
option. You can just type:
Specify target file type ("vcd", "svcd", "dvd", "dv", "pal-vcd",
"ntsc-svcd", ... ). All the format options (bitrate, codecs,
buffer sizes) are then set automatically. You can just type:
@example
ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg
@end example
Nevertheless you can specify additional options as long as you know they do not compromise the
standard, as in:
Nevertheless you can specify additional options as long as you know
they do not conflict with the standard, as in:
@example
ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
@end example
@item -hq
activate high quality settings
Activate high quality settings.
@item -itsoffset offset
set the input time offset in seconds. @code{[-]hh:mm:ss[.xxx]} syntax
is also supported. This option affects all the input files that
follow it. The offset is added to the input files' timestamps;
specifying a positive offset means that the corresponding streams are
delayed by 'offset' seconds.
Set the input time offset in seconds.
@code{[-]hh:mm:ss[.xxx]} syntax is also supported.
This option affects all the input files that follow it.
The offset is added to the timestamps of the input files.
Specifying a positive offset means that the corresponding
streams are delayed by 'offset' seconds.
@end table
......@@ -221,12 +223,12 @@ delayed by 'offset' seconds.
@table @option
@item -b bitrate
set the video bitrate in kbit/s (default = 200 kb/s)
Set the video bitrate in kbit/s (default = 200 kb/s).
@item -r fps
set frame rate (default = 25)
Set frame rate (default = 25).
@item -s size
set frame size. The format is @samp{WxH} (default 160x128). The
following abbreviations are recognized:
Set frame size. The format is @samp{wxh} (default = 160x128).
The following abbreviations are recognized:
@table @samp
@item sqcif
128x96
......@@ -239,51 +241,52 @@ following abbreviations are recognized:
@end table
@item -aspect aspect
set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777).
@item -croptop size
set top crop band size (in pixels)
Set top crop band size (in pixels).
@item -cropbottom size
set bottom crop band size (in pixels)
Set bottom crop band size (in pixels).
@item -cropleft size
set left crop band size (in pixels)
Set left crop band size (in pixels).
@item -cropright size
set right crop band size (in pixels)
Set right crop band size (in pixels).
@item -padtop size
set top pad band size (in pixels)
Set top pad band size (in pixels).
@item -padbottom size
set bottom pad band size (in pixels)
Set bottom pad band size (in pixels).
@item -padleft size
set left pad band size (in pixels)
Set left pad band size (in pixels).
@item -padright size
set right pad band size (in pixels)
Set right pad band size (in pixels).
@item -padcolor (hex color)
set color of padded bands. The value for pad color is expressed
as a six digit hexadecimal number where the first two digits represent red,
middle two digits green and last two digits blue. Defaults to 000000 (black)
Set color of padded bands. The value for padcolor is expressed
as a six digit hexadecimal number where the first two digits
represent red, the middle two digits green and last two digits
blue (default = 000000 (black)).
@item -vn
disable video recording
Disable video recording.
@item -bt tolerance
set video bitrate tolerance (in kbit/s)
Set video bitrate tolerance (in kbit/s).
@item -maxrate bitrate
set max video bitrate tolerance (in kbit/s)
Set max video bitrate tolerance (in kbit/s).
@item -minrate bitrate
set min video bitrate tolerance (in kbit/s)
Set min video bitrate tolerance (in kbit/s).
@item -bufsize size
set ratecontrol buffer size (in kbit)
Set rate control buffer size (in kbit).
@item -vcodec codec
force video codec to @var{codec}. Use the @code{copy} special value to
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 video quality as source (implies VBR).
@item -pass n
select the pass number (1 or 2). It is useful to do two pass
encoding. The statistics of the video are recorded in the first pass and
the video at the exact requested bit rate is generated in the second
pass.
Select the pass number (1 or 2). It is useful to do two pass
encoding. The statistics of the video are recorded in the first
pass and the video is generated at the exact requested bitrate
in the second pass.
@item -passlogfile file
select two pass log file name to @var{file}.
Set two pass logfile name to @var{file}.
@end table
......@@ -291,40 +294,40 @@ select two pass log file name to @var{file}.
@table @option
@item -g gop_size
set the group of picture size
Set the group of pictures size.
@item -intra
use only intra frames
Use only intra frames.
@item -qscale q
use fixed video quantiser scale (VBR)
Use fixed video quantiser scale (VBR).
@item -qmin q
min video quantiser scale (VBR)
minimum video quantiser scale (VBR)
@item -qmax q
max video quantiser scale (VBR)
maximum video quantiser scale (VBR)
@item -qdiff q
max difference between the quantiser scale (VBR)
maximum difference between the quantiser scales (VBR)
@item -qblur blur
video quantiser scale blur (VBR)
@item -qcomp compression
video quantiser scale compression (VBR)
@item -rc_init_cplx complexity
initial complexity for 1-pass encoding
initial complexity for single pass encoding
@item -b_qfactor factor
qp factor between p and b frames
qp factor between P- and B-frames
@item -i_qfactor factor
qp factor between p and i frames
qp factor between P- and I-frames
@item -b_qoffset offset
qp offset between p and b frames
qp offset between P- and B-frames
@item -i_qoffset offset
qp offset between p and i frames
qp offset between P- and I-frames
@item -rc_eq equation
set rate control equation (@pxref{FFmpeg formula
evaluator}). Default is @code{tex^qComp}.
Set rate control equation (@pxref{FFmpeg formula
evaluator}) (default = @code{tex^qComp}).
@item -rc_override override
rate control override for specific intervals
@item -me method
set motion estimation method to @var{method}. Available methods are
(from lower to best quality):
Set motion estimation method to @var{method}.
Available methods are (from lowest to best quality):
@table @samp
@item zero
Try just the (0, 0) vector.
......@@ -338,7 +341,7 @@ exhaustive search (slow and marginally better than epzs)
@end table
@item -dct_algo algo
set DCT algorithm to @var{algo}. Available values are:
Set DCT algorithm to @var{algo}. Available values are:
@table @samp
@item 0
FF_DCT_AUTO (default)
......@@ -355,7 +358,7 @@ FF_DCT_ALTIVEC
@end table
@item -idct_algo algo
set IDCT algorithm to @var{algo}. Available values are:
Set IDCT algorithm to @var{algo}. Available values are:
@table @samp
@item 0
FF_IDCT_AUTO (default)
......@@ -382,7 +385,7 @@ FF_IDCT_SIMPLEARM
@end table
@item -er n
set error resilience to @var{n}.
Set error resilience to @var{n}.
@table @samp
@item 1
FF_ER_CAREFULL (default)
......@@ -395,55 +398,55 @@ FF_ER_VERY_AGGRESSIVE
@end table
@item -ec bit_mask
set error concealment to @var{bit_mask}. @var{bit_mask} is a bit mask of
Set error concealment to @var{bit_mask}. @var{bit_mask} is a bit mask of
the following values:
@table @samp
@item 1
FF_EC_GUESS_MVS (default=enabled)
FF_EC_GUESS_MVS (default = enabled)
@item 2
FF_EC_DEBLOCK (default=enabled)
FF_EC_DEBLOCK (default = enabled)
@end table
@item -bf frames
use 'frames' B frames (supported for MPEG-1, MPEG-2 and MPEG-4)
Use 'frames' B-frames (supported for MPEG-1, MPEG-2 and MPEG-4).
@item -mbd mode
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: chooses the one which needs the fewest bits
FF_MB_DECISION_BITS: Choose the one which needs the fewest bits.
@item 2
FF_MB_DECISION_RD: rate distortion
@end table
@item -4mv
use four motion vector by macroblock (only MPEG-4)
Use four motion vector by macroblock (MPEG-4 only).
@item -part
use data partitioning (only MPEG-4)
Use data partitioning (MPEG-4 only).
@item -bug param
workaround not auto detected encoder bugs
Work around encoder bugs that are not auto-detected.
@item -strict strictness
how strictly to follow the standards
How strictly to follow the standards.
@item -aic
enable Advanced intra coding (h263+)
Enable Advanced intra coding (h263+).
@item -umv
enable Unlimited Motion Vector (h263+)
Enable Unlimited Motion Vector (h263+)
@item -deinterlace
deinterlace pictures
Deinterlace pictures.
@item -interlace
force interlacing support in encoder (only MPEG-2 and MPEG-4). Use this option
if your input file is interlaced and if you want to keep the interlaced
format for minimum losses. The alternative is to deinterlace the input
stream with @option{-deinterlace}, but deinterlacing introduces more
losses.
Force interlacing support in encoder (MPEG-2 and MPEG-4 only).
Use this option if your input file is interlaced and you want
to keep the interlaced format for minimum losses.
The alternative is to deinterlace the input stream with
@option{-deinterlace}, but deinterlacing introduces losses.
@item -psnr
calculate PSNR of compressed frames
Calculate PSNR of compressed frames.
@item -vstats
dump video coding statistics to @file{vstats_HHMMSS.log}.
Dump video coding statistics to @file{vstats_HHMMSS.log}.
@item -vhook module
insert video processing @var{module}. @var{module} contains the module
Insert video processing @var{module}. @var{module} contains the module
name and its parameters separated by spaces.
@end table
......@@ -451,56 +454,56 @@ name and its parameters separated by spaces.
@table @option
@item -ar freq
set the audio sampling frequency (default = 44100 Hz)
Set the audio sampling frequency (default = 44100 Hz).
@item -ab bitrate
set the audio bitrate in kbit/s (default = 64)
Set the audio bitrate in kbit/s (default = 64).
@item -ac channels
set the number of audio channels (default = 1)
Set the number of audio channels (default = 1).
@item -an
disable audio recording
Disable audio recording.
@item -acodec codec
force audio codec to @var{codec}. Use the @code{copy} special value to
tell that the raw codec data must be copied as is.
Force audio codec to @var{codec}. Use the @code{copy} special value to
specify that the raw codec data must be copied as is.
@end table
@section Audio/Video grab options
@table @option
@item -vd device
set video grab device (e.g. @file{/dev/video0})
sEt video grab device (e.g. @file{/dev/video0}).
@item -vc channel
set video grab channel (DV1394 only)
Set video grab channel (DV1394 only).
@item -tvstd standard
set television standard (NTSC, PAL (SECAM))
Set television standard (NTSC, PAL (SECAM)).
@item -dv1394
set DV1394 grab
Set DV1394 grab.
@item -ad device
set audio device (e.g. @file{/dev/dsp})
Set audio device (e.g. @file{/dev/dsp}).
@end table
@section Advanced options
@table @option
@item -map file:stream
set input stream mapping
Set input stream mapping.
@item -debug
print specific debug info
Print specific debug info.
@item -benchmark
add timings for benchmarking
Add timings for benchmarking.
@item -hex
dump each input packet
Dump each input packet.
@item -bitexact
only use bit exact algorithms (for codec testing)
Only use bit exact algorithms (for codec testing).
@item -ps size
set packet size in bits
Set packet size in bits.
@item -re
read input at native frame rate. Mainly used to simulate a grab device.
Read input at native frame rate. Mainly used to simulate a grab device.
@item -loop
loop over the input stream. Currently it works only for image
streams. This option is used for ffserver automatic testing.
Loop over the input stream. Currently it works only for image
streams. This option is used for automatic FFserver testing.
@item -loop_output number_of_times
Repeatedly loop output for formats that support looping such as animated GIF
(Zero will loop the output infinitely)
(0 will loop the output infinitely).
@end table
@node FFmpeg formula evaluator
......@@ -580,22 +583,22 @@ Fabrice Bellard
@section Protocols
The filename can be @file{-} to read from the standard input or to write
to the standard output.
The filename can be @file{-} to read from standard input or to write
to standard output.
ffmpeg handles also many protocols specified with the URL syntax.
FFmpeg also handles many protocols specified with an URL syntax.
Use 'ffmpeg -formats' to have a list of the supported protocols.
Use 'ffmpeg -formats' to see a list of the supported protocols.
The protocol @code{http:} is currently used only to communicate with
ffserver (see the ffserver documentation). When ffmpeg will be a
FFserver (see the FFserver documentation). When FFmpeg will be a
video player it will also be used for streaming :-)
@chapter Tips
@itemize
@item For streaming at very low bit rate application, use a low frame rate
and a small GOP size. This is especially true for real video where
@item For streaming at very low bitrate application, use a low frame rate
and a small GOP size. This is especially true for RealVideo where
the Linux player does not seem to be very fast, so it can miss
frames. An example is:
......@@ -604,19 +607,19 @@ ffmpeg -g 3 -r 3 -t 10 -b 50 -s qcif -f rv10 /tmp/b.rm
@end example
@item The parameter 'q' which is displayed while encoding is the current
quantizer. The value of 1 indicates that a very good quality could
be achieved. The value of 31 indicates the worst quality. If q=31
quantizer. The value 1 indicates that a very good quality could
be achieved. The value 31 indicates the worst quality. If q=31 appears
too often, it means that the encoder cannot compress enough to meet
your bit rate. You must either increase the bit rate, decrease the
your bitrate. You must either increase the bitrate, decrease the
frame rate or decrease the frame size.
@item If your computer is not fast enough, you can speed up the
compression at the expense of the compression ratio. You can use
'-me zero' to speed up motion estimation, and '-intra' to disable
completely motion estimation (you have only I frames, which means it
motion estimation completely (you have only I-frames, which means it
is about as good as JPEG compression).
@item To have very low bitrates in audio, reduce the sampling frequency
@item To have very low audio bitrates, reduce the sampling frequency
(down to 22050 kHz for MPEG audio, 22050 or 11025 for AC3).
@item To have a constant quality (but a variable bitrate), use the option
......@@ -624,8 +627,8 @@ is about as good as JPEG compression).
quality).
@item When converting video files, you can use the '-sameq' option which
uses in the encoder the same quality factor than in the decoder. It
allows to be almost lossless in encoding.
uses the same quality factor in the encoder as in the decoder.
It allows almost lossless encoding.
@end itemize
......@@ -641,17 +644,17 @@ library:
@multitable @columnfractions .4 .1 .1
@item Supported File Format @tab Encoding @tab Decoding @tab Comments
@item MPEG audio @tab X @tab X
@item MPEG1 systems @tab X @tab X
@item MPEG-1 systems @tab X @tab X
@tab muxed audio and video
@item MPEG2 PS @tab X @tab X
@item MPEG-2 PS @tab X @tab X
@tab also known as @code{VOB} file
@item MPEG2 TS @tab @tab X
@item MPEG-2 TS @tab @tab X
@tab also known as DVB Transport Stream
@item ASF@tab X @tab X
@item AVI@tab X @tab X
@item WAV@tab X @tab X
@item Macromedia Flash@tab X @tab X
@tab Only embedded audio is decoded
@tab Only embedded audio is decoded.
@item FLV @tab X @tab X
@tab Macromedia Flash video files
@item Real Audio and Video @tab X @tab X
......@@ -664,38 +667,38 @@ library:
@item SUN AU format @tab X @tab X
@item NUT @tab X @tab X @tab NUT Open Container Format
@item QuickTime @tab X @tab X
@item MPEG4 @tab X @tab X
@tab MPEG4 is a variant of QuickTime
@item MPEG-4 @tab X @tab X
@tab MPEG-4 is a variant of QuickTime.
@item Raw MPEG4 video @tab X @tab X
@item DV @tab X @tab X
@item 4xm @tab @tab X
@tab 4X Technologies format, used in some games
@tab 4X Technologies format, used in some games.
@item Playstation STR @tab @tab X
@item Id RoQ @tab @tab X
@tab used in Quake III, Jedi Knight 2, other computer games
@tab Used in Quake III, Jedi Knight 2, other computer games.
@item Interplay MVE @tab @tab X
@tab format used in various Interplay computer games
@tab Format used in various Interplay computer games.
@item WC3 Movie @tab @tab X
@tab multimedia format used in Origin's Wing Commander III computer game
@tab Multimedia format used in Origin's Wing Commander III computer game.
@item Sega FILM/CPK @tab @tab X