[FFmpeg-devel] [PATCH] doc: add syntax.texi file

Stefano Sabatini stefasab at gmail.com
Thu May 17 14:07:04 CEST 2012


---
 doc/Makefile     |    1 +
 doc/ffmpeg.texi  |   62 +---------------------
 doc/ffplay.texi  |    1 +
 doc/ffprobe.texi |    1 +
 doc/syntax.texi  |  158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 162 insertions(+), 61 deletions(-)
 create mode 100644 doc/syntax.texi

diff --git a/doc/Makefile b/doc/Makefile
index a972182..277f38e 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -8,6 +8,7 @@ HTMLPAGES   = $(PROGS-yes:%=doc/%.html)                                 \
               doc/git-howto.html                                        \
               doc/libavfilter.html                                      \
               doc/platform.html                                         \
+              doc/syntax.html
 
 TXTPAGES    = doc/fate.txt                                              \
 
diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index 5e2f33a..44c2ad4 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -286,67 +286,6 @@ Set frame rate (Hz value, fraction or abbreviation), (default = 25). For output
 streams implies @code{-vsync cfr}.
 @item -s[:@var{stream_specifier}] @var{size} (@emph{input/output,per-stream})
 Set frame size. The format is @samp{wxh} (default - same as source).
-The following abbreviations are recognized:
- at table @samp
- at item sqcif
-128x96
- at item qcif
-176x144
- at item cif
-352x288
- at item 4cif
-704x576
- at item 16cif
-1408x1152
- at item qqvga
-160x120
- at item qvga
-320x240
- at item vga
-640x480
- at item svga
-800x600
- at item xga
-1024x768
- at item uxga
-1600x1200
- at item qxga
-2048x1536
- at item sxga
-1280x1024
- at item qsxga
-2560x2048
- at item hsxga
-5120x4096
- at item wvga
-852x480
- at item wxga
-1366x768
- at item wsxga
-1600x1024
- at item wuxga
-1920x1200
- at item woxga
-2560x1600
- at item wqsxga
-3200x2048
- at item wquxga
-3840x2400
- at item whsxga
-6400x4096
- at item whuxga
-7680x4800
- at item cga
-320x200
- at item ega
-640x350
- at item hd480
-852x480
- at item hd720
-1280x720
- at item hd1080
-1920x1080
- at end table
 
 @item -aspect[:@var{stream_specifier}] @var{aspect} (@emph{output,per-stream})
 Set the video display aspect ratio specified by @var{aspect}.
@@ -1179,6 +1118,7 @@ ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
 @end itemize
 @c man end EXAMPLES
 
+ at include syntax.texi
 @include eval.texi
 @include decoders.texi
 @include encoders.texi
diff --git a/doc/ffplay.texi b/doc/ffplay.texi
index 06666f6..e2bded7 100644
--- a/doc/ffplay.texi
+++ b/doc/ffplay.texi
@@ -178,6 +178,7 @@ Seek to percentage in file corresponding to fraction of width.
 
 @c man end
 
+ at include syntax.texi
 @include eval.texi
 @include decoders.texi
 @include demuxers.texi
diff --git a/doc/ffprobe.texi b/doc/ffprobe.texi
index 5d3e53f..05844d3 100644
--- a/doc/ffprobe.texi
+++ b/doc/ffprobe.texi
@@ -344,6 +344,7 @@ DV and GXF timecodes are available in format metadata
 @end itemize
 @c man end TIMECODE
 
+ at include syntax.texi
 @include decoders.texi
 @include demuxers.texi
 @include protocols.texi
diff --git a/doc/syntax.texi b/doc/syntax.texi
new file mode 100644
index 0000000..f52e763
--- /dev/null
+++ b/doc/syntax.texi
@@ -0,0 +1,158 @@
+ at chapter Syntax
+ at c man begin SYNTAX
+
+When evaluating specific formats, FFmpeg uses internal library parsing
+functions, shared by the tools. This section documents the syntax of
+some of these formats.
+
+ at anchor{date syntax}
+ at section Date
+
+The accepted syntax is:
+ at example
+[(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]
+now
+ at end example
+
+If the value is "now" it takes the current time.
+
+Time is local time unless Z is appended, in which case it is
+interpreted as UTC.
+If the year-month-day part is not specified it takes the current
+year-month-day.
+
+ at anchor{time duration syntax}
+ at section Time duration
+
+The accepted syntax is:
+ at example
+[-]HH:MM:SS[.m...]
+[-]S+[.m...]
+ at end example
+
+ at var{HH} expresses the number of hours, @var{MM} the number a of minutes
+and @var{SS} the number of seconds.
+
+ at anchor{video size syntax}
+ at section Video size
+Specify the size of the sourced video, it may be a string of the form
+ at var{width}x at var{height}, or the name of a size abbreviation.
+
+The following abbreviations are recognized:
+ at table @samp
+ at item sqcif
+128x96
+ at item qcif
+176x144
+ at item cif
+352x288
+ at item 4cif
+704x576
+ at item 16cif
+1408x1152
+ at item qqvga
+160x120
+ at item qvga
+320x240
+ at item vga
+640x480
+ at item svga
+800x600
+ at item xga
+1024x768
+ at item uxga
+1600x1200
+ at item qxga
+2048x1536
+ at item sxga
+1280x1024
+ at item qsxga
+2560x2048
+ at item hsxga
+5120x4096
+ at item wvga
+852x480
+ at item wxga
+1366x768
+ at item wsxga
+1600x1024
+ at item wuxga
+1920x1200
+ at item woxga
+2560x1600
+ at item wqsxga
+3200x2048
+ at item wquxga
+3840x2400
+ at item whsxga
+6400x4096
+ at item whuxga
+7680x4800
+ at item cga
+320x200
+ at item ega
+640x350
+ at item hd480
+852x480
+ at item hd720
+1280x720
+ at item hd1080
+1920x1080
+ at end table
+
+ at anchor{video rate syntax}
+ at section Video rate
+
+Specify the frame rate of a video, expressed as the number of frames
+generated per second. It has to be a string in the format
+ at var{frame_rate_num}/@var{frame_rate_den}, an integer number, a float
+number or a valid video frame rate abbreviation.
+
+The following abbreviations are recognized:
+ at table @samp
+ at item ntsc
+30000/1001
+ at item pal
+25/1
+ at item qntsc
+30000/1
+ at item qpal
+25/1
+ at item sntsc
+30000/1
+ at item spal
+25/1
+ at item film
+24/1
+ at item ntsc-film
+24000/1
+ at end table
+
+ at anchor{ratio syntax}
+ at section Ratio
+
+A ratio can be expressed as an expression, or in the form
+ at var{numerator}:@var{denominator}.
+
+Note that a ratio with infinite (1/0) or negative value is
+considered valid, so you should check on the returned value if you
+want to exclude those values.
+
+The undefined value can be expressed using the "0:0" string.
+
+ at anchor{color syntax}
+ at section Color
+
+It can be the name of a color (case insensitive match) or a
+[0x|#]RRGGBB[AA] sequence, possibly followed by "@" and a string
+representing the alpha component.
+
+The alpha component may be a string composed by "0x" followed by an
+hexadecimal number or a decimal number between 0.0 and 1.0, which
+represents the opacity value (0x00/0.0 means completely transparent,
+0xff/1.0 completely opaque).
+If the alpha component is not specified then 0xff is assumed.
+
+The string "random" will result in a random color.
+
+ at c man end SYNTAX
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list