aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-21 00:15:18 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-21 01:33:53 +0100
commit0ebd83617fe008b7e9766f659cc3d9618b2d80d2 (patch)
tree23bc388bf6b66cf58d7a90c0d2529e53ed984561 /doc
parent745a33a44318ad6d6f74835a417397cdd9dda9a9 (diff)
parentc9594fe0fb6dd123fa25cb27fe5bc976ff3a9051 (diff)
downloadffmpeg-0ebd83617fe008b7e9766f659cc3d9618b2d80d2.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits) avconv: free packet in write_frame() when discarding due to frame number limit FATE: use +/- flag option syntax for vp8 emu-edge tests lavf: make av_interleave_packet_per_dts() private. lavf: deprecate av_read_packet(). oggdec: output correct timestamps for Vorbis avconv: pass input stream timestamps to audio encoders lavc: shrink encoded audio packet size after encoding. xa: set correct bit rate xa: do not set bit_rate, block_align, or bits_per_coded_sample xa: fix end-of-file handling xa: fix timestamp calculation bink: fix typo in FFALIGN() argument bink: align plane width to 8 when calculating bundle sizes doc: pass -Idoc texi2html and texi2pod doc: texi2pod: add -I flag movenc: Add a min_frag_duration option rtsp: Set the default delay to 0.1 s for the RTSP/SDP/RTP demuxers libavformat: Set the default for the max_delay option to -1 Generate manpages for AV{Format,Codec}Context AVOptions. doc/avconv: remove entries for AVOptions. ... Conflicts: doc/Makefile doc/ffmpeg.texi doc/muxers.texi ffmpeg.c libavcodec/Makefile libavcodec/options.c libavcodec/vp8.c libavformat/options.c tests/fate/demux.mak tests/ref/fate/truemotion1-15 tests/ref/fate/truemotion1-24 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile21
-rw-r--r--doc/avtools-common-opts.texi3
-rw-r--r--doc/ffmpeg.texi242
-rw-r--r--doc/muxers.texi7
-rw-r--r--doc/print_options.c123
-rw-r--r--doc/protocols.texi6
-rwxr-xr-xdoc/texi2pod.pl19
7 files changed, 176 insertions, 245 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 2dbf30a0db..ed1425fc3e 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -28,18 +28,27 @@ doc/%.txt: doc/%.texi
$(Q)$(TEXIDEP)
$(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
+doc/print_options.o: libavformat/options_table.h libavcodec/options_table.h
+
+GENTEXI = format codec
+GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
+
+$(GENTEXI): TAG = GENTEXI
+$(GENTEXI): doc/avoptions_%.texi: doc/print_options
+ $(M)doc/print_options $* > $@
+
doc/%.html: TAG = HTML
-doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init
+doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
$(Q)$(TEXIDEP)
- $(M)texi2html -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
+ $(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
doc/%.pod: TAG = POD
-doc/%.pod: doc/%.texi
+doc/%.pod: doc/%.texi $(GENTEXI)
$(Q)$(TEXIDEP)
- $(M)$(SRC_PATH)/doc/texi2pod.pl $< $@
+ $(M)$(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
doc/%.1: TAG = MAN
-doc/%.1: doc/%.pod
+doc/%.1: doc/%.pod $(GENTEXI)
$(M)pod2man --section=1 --center=" " --release=" " $< > $@
$(DOCS): | doc
@@ -57,7 +66,7 @@ uninstall-man:
$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
clean::
- $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%)
+ $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
-include $(wildcard $(DOCS:%=%.d))
diff --git a/doc/avtools-common-opts.texi b/doc/avtools-common-opts.texi
index c891016f41..c25b535a9d 100644
--- a/doc/avtools-common-opts.texi
+++ b/doc/avtools-common-opts.texi
@@ -175,3 +175,6 @@ use @option{-option 0}/@option{-option 1}.
Note2 old undocumented way of specifying per-stream AVOptions by prepending
v/a/s to the options name is now obsolete and will be removed soon.
+
+@include avoptions_codec.texi
+@include avoptions_format.texi
diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index 2cb1050b8e..402a4ae3fb 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -370,25 +370,7 @@ pad=width:height:x:y:color instead.
@item -vn (@emph{output})
Disable video recording.
-@item -bt @var{tolerance}
-Set video bitrate tolerance (in bits, default 4000k).
-Has a minimum value of: (target_bitrate/target_framerate).
-In 1-pass mode, bitrate tolerance specifies how far ratecontrol is
-willing to deviate from the target average bitrate value. This is
-not related to min/max bitrate. Lowering tolerance too much has
-an adverse effect on quality.
-@item -maxrate @var{bitrate}
-Set max video bitrate (in bit/s).
-Requires -bufsize to be set.
-@item -minrate @var{bitrate}
-Set min video bitrate (in bit/s).
-Most useful in setting up a CBR encode:
-@example
-ffmpeg -i myfile.avi -b:v 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
-@end example
-It is of little use elsewise.
-@item -bufsize @var{size}
-Set video buffer verifier buffer size (in bits).
+
@item -vcodec @var{codec} (@emph{output})
Set the video codec. This is an alias for @code{-codec:v}.
@item -same_quant
@@ -435,197 +417,14 @@ Set pixel format. Use @code{-pix_fmts} to show all the supported
pixel formats.
@item -sws_flags @var{flags} (@emph{input/output})
Set SwScaler flags.
-@item -g @var{gop_size}
-Set the group of pictures size.
-@item -intra
-deprecated, use -g 1
@item -vdt @var{n}
Discard threshold.
-@item -qmin @var{q}
-minimum video quantizer scale (VBR)
-@item -qmax @var{q}
-maximum video quantizer scale (VBR)
-@item -qdiff @var{q}
-maximum difference between the quantizer scales (VBR)
-@item -qblur @var{blur}
-video quantizer scale blur (VBR) (range 0.0 - 1.0)
-@item -qcomp @var{compression}
-video quantizer scale compression (VBR) (default 0.5).
-Constant of ratecontrol equation. Recommended range for default rc_eq: 0.0-1.0
-
-@item -lmin @var{lambda}
-minimum video lagrange factor (VBR)
-@item -lmax @var{lambda}
-max video lagrange factor (VBR)
-@item -mblmin @var{lambda}
-minimum macroblock quantizer scale (VBR)
-@item -mblmax @var{lambda}
-maximum macroblock quantizer scale (VBR)
-
-These four options (lmin, lmax, mblmin, mblmax) use 'lambda' units,
-but you may use the QP2LAMBDA constant to easily convert from 'q' units:
-@example
-ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
-@end example
-
-@item -rc_init_cplx @var{complexity}
-initial complexity for single pass encoding
-@item -b_qfactor @var{factor}
-qp factor between P- and B-frames
-@item -i_qfactor @var{factor}
-qp factor between P- and I-frames
-@item -b_qoffset @var{offset}
-qp offset between P- and B-frames
-@item -i_qoffset @var{offset}
-qp offset between P- and I-frames
-@item -rc_eq @var{equation}
-Set rate control equation (see section "Expression Evaluation")
-(default = @code{tex^qComp}).
-
-When computing the rate control equation expression, besides the
-standard functions defined in the section "Expression Evaluation", the
-following functions are available:
-@table @var
-@item bits2qp(bits)
-@item qp2bits(qp)
-@end table
-
-and the following constants are available:
-@table @var
-@item iTex
-@item pTex
-@item tex
-@item mv
-@item fCode
-@item iCount
-@item mcVar
-@item var
-@item isI
-@item isP
-@item isB
-@item avgQP
-@item qComp
-@item avgIITex
-@item avgPITex
-@item avgPPTex
-@item avgBPTex
-@item avgTex
-@end table
@item -rc_override[:@var{stream_specifier}] @var{override} (@emph{output,per-stream})
Rate control override for specific intervals, formatted as "int,int,int"
list separated with slashes. Two first values are the beginning and
end frame numbers, last one is quantizer to use if positive, or quality
factor if negative.
-@item -me_method @var{method}
-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.
-@item phods
-@item log
-@item x1
-@item hex
-@item umh
-@item epzs
-(default method)
-@item full
-exhaustive search (slow and marginally better than epzs)
-@end table
-
-@item -dct_algo @var{algo}
-Set DCT algorithm to @var{algo}. Available values are:
-@table @samp
-@item 0
-FF_DCT_AUTO (default)
-@item 1
-FF_DCT_FASTINT
-@item 2
-FF_DCT_INT
-@item 3
-FF_DCT_MMX
-@item 4
-FF_DCT_MLIB
-@item 5
-FF_DCT_ALTIVEC
-@end table
-
-@item -idct_algo @var{algo}
-Set IDCT algorithm to @var{algo}. Available values are:
-@table @samp
-@item 0
-FF_IDCT_AUTO (default)
-@item 1
-FF_IDCT_INT
-@item 2
-FF_IDCT_SIMPLE
-@item 3
-FF_IDCT_SIMPLEMMX
-@item 4
-FF_IDCT_LIBMPEG2MMX
-@item 5
-FF_IDCT_PS2
-@item 6
-FF_IDCT_MLIB
-@item 7
-FF_IDCT_ARM
-@item 8
-FF_IDCT_ALTIVEC
-@item 9
-FF_IDCT_SH4
-@item 10
-FF_IDCT_SIMPLEARM
-@end table
-
-@item -er @var{n}
-Set error resilience to @var{n}.
-@table @samp
-@item 1
-FF_ER_CAREFUL (default)
-@item 2
-FF_ER_COMPLIANT
-@item 3
-FF_ER_AGGRESSIVE
-@item 4
-FF_ER_VERY_AGGRESSIVE
-@end table
-
-@item -ec @var{bit_mask}
-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)
-@item 2
-FF_EC_DEBLOCK (default = enabled)
-@end table
-
-@item -bf @var{frames}
-Use 'frames' B-frames (supported for MPEG-1, MPEG-2 and MPEG-4).
-@item -mbd @var{mode}
-macroblock decision
-@table @samp
-@item 0
-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
-FF_MB_DECISION_RD: rate distortion
-@end table
-
-@item -4mv
-Use four motion vector by macroblock (MPEG-4 only).
-@item -part
-Use data partitioning (MPEG-4 only).
-@item -bug @var{param}
-Work around encoder bugs that are not auto-detected.
-@item -strict @var{strictness}
-How strictly to follow the standards.
-@item -aic
-Enable Advanced intra coding (h263+).
-@item -umv
-Enable Unlimited Motion Vector (h263+)
@item -deinterlace
Deinterlace pictures.
@@ -696,28 +495,6 @@ of supported sample formats.
@table @option
@item -atag @var{fourcc/tag} (@emph{output})
Force audio tag/fourcc. This is an alias for @code{-tag:a}.
-@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}
Deprecated, see -bsf
@end table
@@ -945,8 +722,6 @@ Exit after ffmpeg has been running for @var{duration} seconds.
Dump each input packet to stderr.
@item -hex (@emph{global})
When dumping packets, also dump the payload.
-@item -ps @var{size}
-Set RTP payload size in bytes.
@item -re (@emph{input})
Read input at native frame rate. Mainly used to simulate a grab device.
@item -loop_input
@@ -957,8 +732,6 @@ This option is deprecated, use -loop 1.
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}
Video sync method.
For compatibility reasons old values can be specified as numbers.
@@ -1294,6 +1067,19 @@ ffmpeg -i test1.avi -i test2.avi -map 0.3 -map 0.2 -map 0.1 -map 0.0 -c copy tes
The resulting output file @file{test12.avi} will contain first four streams from
the input file in reverse order.
+@item
+To force CBR video output:
+@example
+ffmpeg -i myfile.avi -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
+@end example
+
+@item
+The four options lmin, lmax, mblmin and mblmax use 'lambda' units,
+but you may use the QP2LAMBDA constant to easily convert from 'q' units:
+@example
+ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
+@end example
+
@end itemize
@c man end EXAMPLES
diff --git a/doc/muxers.texi b/doc/muxers.texi
index f500f0ab0e..7d64482bc7 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -181,8 +181,15 @@ Allow the caller to manually choose when to cut fragments, by
calling @code{av_write_frame(ctx, NULL)} to write a fragment with
the packets written so far. (This is only useful with other
applications integrating libavformat, not from @command{ffmpeg}.)
+@item -min_frag_duration @var{duration}
+Don't create fragments that are shorter than @var{duration} microseconds long.
@end table
+If more than one condition is specified, fragments are cut when
+one of the specified conditions is fulfilled. The exception to this is
+@code{-min_frag_duration}, which has to be fulfilled for any of the other
+conditions to apply.
+
Additionally, the way the output file is written can be adjusted
through a few other options:
diff --git a/doc/print_options.c b/doc/print_options.c
new file mode 100644
index 0000000000..4283e6a86d
--- /dev/null
+++ b/doc/print_options.c
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2012 Anton Khirnov
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * generate texinfo manpages for avoptions
+ */
+
+#include <stddef.h>
+#include <string.h>
+#include <float.h>
+
+#include "libavformat/avformat.h"
+#include "libavcodec/avcodec.h"
+#include "libavutil/opt.h"
+
+static void print_usage(void)
+{
+ fprintf(stderr, "Usage: enum_options type\n"
+ "type: format codec\n");
+ exit(1);
+}
+
+static void print_option(const AVOption *opts, const AVOption *o, int per_stream)
+{
+ printf("@item -%s%s @var{", o->name, per_stream ? "[:stream_specifier]" : "");
+ switch (o->type) {
+ case AV_OPT_TYPE_BINARY: printf("hexadecimal string"); break;
+ case AV_OPT_TYPE_STRING: printf("string"); break;
+ case AV_OPT_TYPE_INT:
+ case AV_OPT_TYPE_INT64: printf("integer"); break;
+ case AV_OPT_TYPE_FLOAT:
+ case AV_OPT_TYPE_DOUBLE: printf("float"); break;
+ case AV_OPT_TYPE_RATIONAL: printf("rational number"); break;
+ case AV_OPT_TYPE_FLAGS: printf("flags"); break;
+ default: printf("value"); break;
+ }
+ printf("} (@emph{");
+
+ if (o->flags & AV_OPT_FLAG_DECODING_PARAM) {
+ printf("input");
+ if (o->flags & AV_OPT_FLAG_ENCODING_PARAM)
+ printf("/");
+ }
+ if (o->flags & AV_OPT_FLAG_ENCODING_PARAM) printf("output");
+ if (o->flags & AV_OPT_FLAG_AUDIO_PARAM) printf(",audio");
+ if (o->flags & AV_OPT_FLAG_VIDEO_PARAM) printf(",video");
+ if (o->flags & AV_OPT_FLAG_SUBTITLE_PARAM) printf(",subtitles");
+
+ printf("})\n");
+ if (o->help)
+ printf("%s\n", o->help);
+
+ if (o->unit) {
+ const AVOption *u;
+ printf("\nPossible values:\n@table @samp\n");
+
+ for (u = opts; u->name; u++) {
+ if (u->type == AV_OPT_TYPE_CONST && u->unit && !strcmp(u->unit, o->unit))
+ printf("@item %s\n%s\n", u->name, u->help ? u->help : "");
+ }
+ printf("@end table\n");
+ }
+}
+
+static void show_opts(const AVOption *opts, int per_stream)
+{
+ const AVOption *o;
+
+ printf("@table @option\n");
+ for (o = opts; o->name; o++) {
+ if (o->type != AV_OPT_TYPE_CONST)
+ print_option(opts, o, per_stream);
+ }
+ printf("@end table\n");
+}
+
+static void show_format_opts(void)
+{
+#include "libavformat/options_table.h"
+
+ printf("@section Format AVOptions\n");
+ show_opts(options, 0);
+}
+
+static void show_codec_opts(void)
+{
+#include "libavcodec/options_table.h"
+
+ printf("@section Codec AVOptions\n");
+ show_opts(options, 1);
+}
+
+int main(int argc, char **argv)
+{
+ if (argc < 2)
+ print_usage();
+
+ if (!strcmp(argv[1], "format"))
+ show_format_opts();
+ else if (!strcmp(argv[1], "codec"))
+ show_codec_opts();
+ else
+ print_usage();
+
+ return 0;
+}
diff --git a/doc/protocols.texi b/doc/protocols.texi
index 782e2b069b..ae1c9b84e6 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -318,9 +318,9 @@ Accept packets only from negotiated peer address and port.
@end table
When receiving data over UDP, the demuxer tries to reorder received packets
-(since they may arrive out of order, or packets may get lost totally). In
-order for this to be enabled, a maximum delay must be specified in the
-@code{max_delay} field of AVFormatContext.
+(since they may arrive out of order, or packets may get lost totally). This
+can be disabled by setting the maximum demuxing delay to zero (via
+the @code{max_delay} field of AVFormatContext).
When watching multi-bitrate Real-RTSP streams with @command{ffplay}, the
streams to display can be chosen with @code{-vst} @var{n} and
diff --git a/doc/texi2pod.pl b/doc/texi2pod.pl
index 0eb5e8d9fe..94323be340 100755
--- a/doc/texi2pod.pl
+++ b/doc/texi2pod.pl
@@ -36,7 +36,7 @@ $shift = "";
%defs = ();
$fnno = 1;
$inf = "";
-$ibase = "";
+@ibase = ();
while ($_ = shift) {
if (/^-D(.*)$/) {
@@ -52,6 +52,8 @@ while ($_ = shift) {
die "flags may only contain letters, digits, hyphens, dashes and underscores\n"
unless $flag =~ /^[a-zA-Z0-9_-]+$/;
$defs{$flag} = $value;
+ } elsif (/^-I(.*)$/) {
+ push @ibase, $1 ne "" ? $1 : shift;
} elsif (/^-/) {
usage();
} else {
@@ -61,10 +63,12 @@ while ($_ = shift) {
}
}
+push @ibase, ".";
+
if (defined $in) {
$inf = gensym();
open($inf, "<$in") or die "opening \"$in\": $!\n";
- $ibase = $1 if $in =~ m|^(.+)/[^/]+$|;
+ push @ibase, $1 if $in =~ m|^(.+)/[^/]+$|;
} else {
$inf = \*STDIN;
}
@@ -74,7 +78,7 @@ if (defined $out) {
}
while(defined $inf) {
-while(<$inf>) {
+INF: while(<$inf>) {
# Certain commands are discarded without further processing.
/^\@(?:
[a-z]+index # @*index: useful only in complete manual
@@ -104,11 +108,10 @@ while(<$inf>) {
push @instack, $inf;
$inf = gensym();
- # Try cwd and $ibase.
- open($inf, "<" . $1)
- or open($inf, "<" . $ibase . "/" . $1)
- or die "cannot open $1 or $ibase/$1: $!\n";
- next;
+ for (@ibase) {
+ open($inf, "<" . $_ . "/" . $1) and next INF;
+ }
+ die "cannot open $1: $!\n";
};
# Look for blocks surrounded by @c man begin SECTION ... @c man end.