]> git.sesse.net Git - ffmpeg/blob - doc/syntax.texi
examples: add scaling_video example
[ffmpeg] / doc / syntax.texi
1 @chapter Syntax
2 @c man begin SYNTAX
3
4 When evaluating specific formats, FFmpeg uses internal library parsing
5 functions, shared by the tools. This section documents the syntax of
6 some of these formats.
7
8 @anchor{date syntax}
9 @section Date
10
11 The accepted syntax is:
12 @example
13 [(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]
14 now
15 @end example
16
17 If the value is "now" it takes the current time.
18
19 Time is local time unless Z is appended, in which case it is
20 interpreted as UTC.
21 If the year-month-day part is not specified it takes the current
22 year-month-day.
23
24 @anchor{time duration syntax}
25 @section Time duration
26
27 The accepted syntax is:
28 @example
29 [-]HH:MM:SS[.m...]
30 [-]S+[.m...]
31 @end example
32
33 @var{HH} expresses the number of hours, @var{MM} the number a of minutes
34 and @var{SS} the number of seconds.
35
36 @anchor{video size syntax}
37 @section Video size
38 Specify the size of the sourced video, it may be a string of the form
39 @var{width}x@var{height}, or the name of a size abbreviation.
40
41 The following abbreviations are recognized:
42 @table @samp
43 @item sqcif
44 128x96
45 @item qcif
46 176x144
47 @item cif
48 352x288
49 @item 4cif
50 704x576
51 @item 16cif
52 1408x1152
53 @item qqvga
54 160x120
55 @item qvga
56 320x240
57 @item vga
58 640x480
59 @item svga
60 800x600
61 @item xga
62 1024x768
63 @item uxga
64 1600x1200
65 @item qxga
66 2048x1536
67 @item sxga
68 1280x1024
69 @item qsxga
70 2560x2048
71 @item hsxga
72 5120x4096
73 @item wvga
74 852x480
75 @item wxga
76 1366x768
77 @item wsxga
78 1600x1024
79 @item wuxga
80 1920x1200
81 @item woxga
82 2560x1600
83 @item wqsxga
84 3200x2048
85 @item wquxga
86 3840x2400
87 @item whsxga
88 6400x4096
89 @item whuxga
90 7680x4800
91 @item cga
92 320x200
93 @item ega
94 640x350
95 @item hd480
96 852x480
97 @item hd720
98 1280x720
99 @item hd1080
100 1920x1080
101 @end table
102
103 @anchor{video rate syntax}
104 @section Video rate
105
106 Specify the frame rate of a video, expressed as the number of frames
107 generated per second. It has to be a string in the format
108 @var{frame_rate_num}/@var{frame_rate_den}, an integer number, a float
109 number or a valid video frame rate abbreviation.
110
111 The following abbreviations are recognized:
112 @table @samp
113 @item ntsc
114 30000/1001
115 @item pal
116 25/1
117 @item qntsc
118 30000/1
119 @item qpal
120 25/1
121 @item sntsc
122 30000/1
123 @item spal
124 25/1
125 @item film
126 24/1
127 @item ntsc-film
128 24000/1
129 @end table
130
131 @anchor{ratio syntax}
132 @section Ratio
133
134 A ratio can be expressed as an expression, or in the form
135 @var{numerator}:@var{denominator}.
136
137 Note that a ratio with infinite (1/0) or negative value is
138 considered valid, so you should check on the returned value if you
139 want to exclude those values.
140
141 The undefined value can be expressed using the "0:0" string.
142
143 @anchor{color syntax}
144 @section Color
145
146 It can be the name of a color (case insensitive match) or a
147 [0x|#]RRGGBB[AA] sequence, possibly followed by "@@" and a string
148 representing the alpha component.
149
150 The alpha component may be a string composed by "0x" followed by an
151 hexadecimal number or a decimal number between 0.0 and 1.0, which
152 represents the opacity value (0x00/0.0 means completely transparent,
153 0xff/1.0 completely opaque).
154 If the alpha component is not specified then 0xff is assumed.
155
156 The string "random" will result in a random color.
157
158 @c man end SYNTAX