1129 lines · 23.3 KB · Text
RawDownload
@chapter Syntax@c man begin SYNTAX This section documents the syntax and formats employed by the FFmpeglibraries and tools. @anchor{quoting_and_escaping}@section Quoting and escaping FFmpeg adopts the following quoting and escaping mechanism, unlessexplicitly specified. The following rules are applied: @itemize@item@samp{'} and @samp{\} are special characters (respectively used forquoting and escaping). In addition to them, there might be otherspecial characters depending on the specific syntax where the escapingand quoting are employed. @itemA special character is escaped by prefixing it with a @samp{\}. @itemAll characters enclosed between @samp{''} are included literally in theparsed string. The quote character @samp{'} itself cannot be quoted,so you may need to close the quote and escape it. @itemLeading and trailing whitespaces, unless escaped or quoted, areremoved from the parsed string.@end itemize Note that you may need to add a second level of escaping when usingthe command line or a script, which depends on the syntax of theadopted shell language. The function @code{av_get_token} defined in@file{libavutil/avstring.h} can be used to parse a token quoted orescaped according to the rules defined above. The tool @file{tools/ffescape} in the FFmpeg source tree can be usedto automatically quote or escape a string in a script. @subsection Examples @itemize@itemEscape the string @code{Crime d'Amour} containing the @code{'} specialcharacter:@exampleCrime d\'Amour@end example @itemThe string above contains a quote, so the @code{'} needs to be escapedwhen quoting it:@example'Crime d'\''Amour'@end example @itemInclude leading or trailing whitespaces using quoting:@example'  this string starts and ends with whitespaces  '@end example @itemEscaping and quoting can be mixed together:@example' The string '\'string\'' is a string '@end example @itemTo include a literal @samp{\} you can use either escaping or quoting:@example'c:\foo' can be written as c:\\foo@end example@end itemize @anchor{date syntax}@section Date The accepted syntax is:@example[(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]now@end example If the value is "now" it takes the current time. Time is local time unless Z is appended, in which case it isinterpreted as UTC.If the year-month-day part is not specified it takes the currentyear-month-day. @anchor{time duration syntax}@section Time duration There are two accepted syntaxes for expressing time duration. @example[-][@var{HH}:]@var{MM}:@var{SS}[.@var{m}...]@end example @var{HH} expresses the number of hours, @var{MM} the number of minutesfor a maximum of 2 digits, and @var{SS} the number of seconds for amaximum of 2 digits. The @var{m} at the end expresses decimal value for@var{SS}. @emph{or} @example[-]@var{S}+[.@var{m}...][s|ms|us]@end example @var{S} expresses the number of seconds, with the optional decimal part@var{m}.  The optional literal suffixes @samp{s}, @samp{ms} or @samp{us}indicate to interpret the value as seconds, milliseconds or microseconds,respectively. In both expressions, the optional @samp{-} indicates negative duration. @subsection Examples The following examples are all valid time duration: @table @samp@item 5555 seconds @item 0.20.2 seconds @item 200ms200 milliseconds, that's 0.2s @item 200000us200000 microseconds, that's 0.2s @item 12:03:4512 hours, 03 minutes and 45 seconds @item 23.18923.189 seconds@end table @anchor{video size syntax}@section Video sizeSpecify the size of the sourced video, it may be a string of the form@var{width}x@var{height}, or the name of a size abbreviation. The following abbreviations are recognized:@table @samp@item ntsc720x480@item pal720x576@item qntsc352x240@item qpal352x288@item sntsc640x480@item spal768x576@item film352x240@item ntsc-film352x240@item sqcif128x96@item qcif176x144@item cif352x288@item 4cif704x576@item 16cif1408x1152@item qqvga160x120@item qvga320x240@item vga640x480@item svga800x600@item xga1024x768@item uxga1600x1200@item qxga2048x1536@item sxga1280x1024@item qsxga2560x2048@item hsxga5120x4096@item wvga852x480@item wxga1366x768@item wsxga1600x1024@item wuxga1920x1200@item woxga2560x1600@item wqsxga3200x2048@item wquxga3840x2400@item whsxga6400x4096@item whuxga7680x4800@item cga320x200@item ega640x350@item hd480852x480@item hd7201280x720@item hd10801920x1080@item 2k2048x1080@item 2kflat1998x1080@item 2kscope2048x858@item 4k4096x2160@item 4kflat3996x2160@item 4kscope4096x1716@item nhd640x360@item hqvga240x160@item wqvga400x240@item fwqvga432x240@item hvga480x320@item qhd960x540@item 2kdci2048x1080@item 4kdci4096x2160@item uhd21603840x2160@item uhd43207680x4320@end table @anchor{video rate syntax}@section Video rate Specify the frame rate of a video, expressed as the number of framesgenerated per second. It has to be a string in the format@var{frame_rate_num}/@var{frame_rate_den}, an integer number, a floatnumber or a valid video frame rate abbreviation. The following abbreviations are recognized:@table @samp@item ntsc30000/1001@item pal25/1@item qntsc30000/1001@item qpal25/1@item sntsc30000/1001@item spal25/1@item film24/1@item ntsc-film24000/1001@end table @anchor{ratio syntax}@section Ratio A ratio can be expressed as an expression, or in the form@var{numerator}:@var{denominator}. Note that a ratio with infinite (1/0) or negative value isconsidered valid, so you should check on the returned value if youwant to exclude those values. The undefined value can be expressed using the "0:0" string. @anchor{color syntax}@section Color It can be the name of a color as defined below (case insensitive match) or a@code{[0x|#]RRGGBB[AA]} sequence, possibly followed by @@ and a stringrepresenting the alpha component. The alpha component may be a string composed by "0x" followed by anhexadecimal number or a decimal number between 0.0 and 1.0, whichrepresents the opacity value (@samp{0x00} or @samp{0.0} means completelytransparent, @samp{0xff} or @samp{1.0} completely opaque). If the alphacomponent is not specified then @samp{0xff} is assumed. The string @samp{random} will result in a random color. The following names of colors are recognized:@table @samp@item AliceBlue0xF0F8FF@item AntiqueWhite0xFAEBD7@item Aqua0x00FFFF@item Aquamarine0x7FFFD4@item Azure0xF0FFFF@item Beige0xF5F5DC@item Bisque0xFFE4C4@item Black0x000000@item BlanchedAlmond0xFFEBCD@item Blue0x0000FF@item BlueViolet0x8A2BE2@item Brown0xA52A2A@item BurlyWood0xDEB887@item CadetBlue0x5F9EA0@item Chartreuse0x7FFF00@item Chocolate0xD2691E@item Coral0xFF7F50@item CornflowerBlue0x6495ED@item Cornsilk0xFFF8DC@item Crimson0xDC143C@item Cyan0x00FFFF@item DarkBlue0x00008B@item DarkCyan0x008B8B@item DarkGoldenRod0xB8860B@item DarkGray0xA9A9A9@item DarkGreen0x006400@item DarkKhaki0xBDB76B@item DarkMagenta0x8B008B@item DarkOliveGreen0x556B2F@item Darkorange0xFF8C00@item DarkOrchid0x9932CC@item DarkRed0x8B0000@item DarkSalmon0xE9967A@item DarkSeaGreen0x8FBC8F@item DarkSlateBlue0x483D8B@item DarkSlateGray0x2F4F4F@item DarkTurquoise0x00CED1@item DarkViolet0x9400D3@item DeepPink0xFF1493@item DeepSkyBlue0x00BFFF@item DimGray0x696969@item DodgerBlue0x1E90FF@item FireBrick0xB22222@item FloralWhite0xFFFAF0@item ForestGreen0x228B22@item Fuchsia0xFF00FF@item Gainsboro0xDCDCDC@item GhostWhite0xF8F8FF@item Gold0xFFD700@item GoldenRod0xDAA520@item Gray0x808080@item Green0x008000@item GreenYellow0xADFF2F@item HoneyDew0xF0FFF0@item HotPink0xFF69B4@item IndianRed0xCD5C5C@item Indigo0x4B0082@item Ivory0xFFFFF0@item Khaki0xF0E68C@item Lavender0xE6E6FA@item LavenderBlush0xFFF0F5@item LawnGreen0x7CFC00@item LemonChiffon0xFFFACD@item LightBlue0xADD8E6@item LightCoral0xF08080@item LightCyan0xE0FFFF@item LightGoldenRodYellow0xFAFAD2@item LightGreen0x90EE90@item LightGrey0xD3D3D3@item LightPink0xFFB6C1@item LightSalmon0xFFA07A@item LightSeaGreen0x20B2AA@item LightSkyBlue0x87CEFA@item LightSlateGray0x778899@item LightSteelBlue0xB0C4DE@item LightYellow0xFFFFE0@item Lime0x00FF00@item LimeGreen0x32CD32@item Linen0xFAF0E6@item Magenta0xFF00FF@item Maroon0x800000@item MediumAquaMarine0x66CDAA@item MediumBlue0x0000CD@item MediumOrchid0xBA55D3@item MediumPurple0x9370D8@item MediumSeaGreen0x3CB371@item MediumSlateBlue0x7B68EE@item MediumSpringGreen0x00FA9A@item MediumTurquoise0x48D1CC@item MediumVioletRed0xC71585@item MidnightBlue0x191970

Lines 1–500 of 1129.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t