FFMPEG-UTILS(1) FFMPEG-UTILS(1) NNAAMMEE ffmpeg-utils - FFmpeg utilities DDEESSCCRRIIPPTTIIOONN This document describes some generic features and utilities provided by the libavutil library. SSYYNNTTAAXX This section documents the syntax and formats employed by the FFmpeg libraries and tools. QQuuoottiinngg aanndd eessccaappiinngg FFmpeg adopts the following quoting and escaping mechanism, unless explicitly specified. The following rules are applied: +o '' and \\ are special characters (respectively used for quoting and escaping). In addition to them, there might be other special char- acters depending on the specific syntax where the escaping and quoting are employed. +o A special character is escaped by prefixing it with a \\. +o All characters enclosed between '''' are included literally in the parsed string. The quote character '' itself cannot be quoted, so you may need to close the quote and escape it. +o Leading and trailing whitespaces, unless escaped or quoted, are removed from the parsed string. Note that you may need to add a second level of escaping when using the command line or a script, which depends on the syntax of the adopted shell language. The function "av_get_token" defined in _l_i_b_a_v_u_t_i_l_/_a_v_s_t_r_i_n_g_._h can be used to parse a token quoted or escaped according to the rules defined above. The tool _t_o_o_l_s_/_f_f_e_s_c_a_p_e in the FFmpeg source tree can be used to auto- matically quote or escape a string in a script. _E_x_a_m_p_l_e_s +o Escape the string "Crime d'Amour" containing the "'" special char- acter: Crime d\'Amour +o The string above contains a quote, so the "'" needs to be escaped when quoting it: 'Crime d'\''Amour' +o Include leading or trailing whitespaces using quoting: ' this string starts and ends with whitespaces ' +o Escaping and quoting can be mixed together: ' The string '\'string\'' is a string ' +o To include a literal \\ you can use either escaping or quoting: 'c:\foo' can be written as c:\\foo DDaattee The accepted syntax is: [(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z] now If the value is "now" it takes the current time. Time is local time unless Z is appended, in which case it is inter- preted as UTC. If the year-month-day part is not specified it takes the current year-month-day. TTiimmee dduurraattiioonn There are two accepted syntaxes for expressing time duration. [-][:]:[....] _H_H expresses the number of hours, _M_M the number of minutes for a maxi- mum of 2 digits, and _S_S the number of seconds for a maximum of 2 dig- its. The _m at the end expresses decimal value for _S_S. _o_r [-]+[....][s|ms|us] _S expresses the number of seconds, with the optional decimal part _m. The optional literal suffixes ss, mmss or uuss indicate to interpret the value as seconds, milliseconds or microseconds, respectively. In both expressions, the optional -- indicates negative duration. _E_x_a_m_p_l_e_s The following examples are all valid time duration: 5555 55 seconds 00..22 0.2 seconds 220000mmss 200 milliseconds, that's 0.2s 220000000000uuss 200000 microseconds, that's 0.2s 1122::0033::4455 12 hours, 03 minutes and 45 seconds 2233..118899 23.189 seconds VViiddeeoo ssiizzee Specify the size of the sourced video, it may be a string of the form _w_i_d_t_hx_h_e_i_g_h_t, or the name of a size abbreviation. The following abbreviations are recognized: nnttsscc 720x480 ppaall 720x576 qqnnttsscc 352x240 qqppaall 352x288 ssnnttsscc 640x480 ssppaall 768x576 ffiillmm 352x240 nnttsscc--ffiillmm 352x240 ssqqcciiff 128x96 qqcciiff 176x144 cciiff 352x288 44cciiff 704x576 1166cciiff 1408x1152 qqqqvvggaa 160x120 qqvvggaa 320x240 vvggaa 640x480 ssvvggaa 800x600 xxggaa 1024x768 uuxxggaa 1600x1200 qqxxggaa 2048x1536 ssxxggaa 1280x1024 qqssxxggaa 2560x2048 hhssxxggaa 5120x4096 wwvvggaa 852x480 wwxxggaa 1366x768 wwssxxggaa 1600x1024 wwuuxxggaa 1920x1200 wwooxxggaa 2560x1600 wwqqssxxggaa 3200x2048 wwqquuxxggaa 3840x2400 wwhhssxxggaa 6400x4096 wwhhuuxxggaa 7680x4800 ccggaa 320x200 eeggaa 640x350 hhdd448800 852x480 hhdd772200 1280x720 hhdd11008800 1920x1080 22kk 2048x1080 22kkffllaatt 1998x1080 22kkssccooppee 2048x858 44kk 4096x2160 44kkffllaatt 3996x2160 44kkssccooppee 4096x1716 nnhhdd 640x360 hhqqvvggaa 240x160 wwqqvvggaa 400x240 ffwwqqvvggaa 432x240 hhvvggaa 480x320 qqhhdd 960x540 22kkddccii 2048x1080 44kkddccii 4096x2160 uuhhdd22116600 3840x2160 uuhhdd44332200 7680x4320 VViiddeeoo rraattee 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 _f_r_a_m_e___r_a_t_e___n_u_m/_f_r_a_m_e___r_a_t_e___d_e_n, an integer number, a float number or a valid video frame rate abbreviation. The following abbreviations are recognized: nnttsscc 30000/1001 ppaall 25/1 qqnnttsscc 30000/1001 qqppaall 25/1 ssnnttsscc 30000/1001 ssppaall 25/1 ffiillmm 24/1 nnttsscc--ffiillmm 24000/1001 RRaattiioo A ratio can be expressed as an expression, or in the form _n_u_m_e_r_a_- _t_o_r:_d_e_n_o_m_i_n_a_t_o_r. 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. CCoolloorr It can be the name of a color as defined below (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 rep- resents the opacity value (00xx0000 or 00..00 means completely transparent, 00xxffff or 11..00 completely opaque). If the alpha component is not specified then 00xxffff is assumed. The string rraannddoomm will result in a random color. The following names of colors are recognized: AAlliicceeBBlluuee 0xF0F8FF AAnnttiiqquueeWWhhiittee 0xFAEBD7 AAqquuaa 0x00FFFF AAqquuaammaarriinnee 0x7FFFD4 AAzzuurree 0xF0FFFF BBeeiiggee 0xF5F5DC BBiissqquuee 0xFFE4C4 BBllaacckk 0x000000 BBllaanncchheeddAAllmmoonndd 0xFFEBCD BBlluuee 0x0000FF BBlluueeVViioolleett 0x8A2BE2 BBrroowwnn 0xA52A2A BBuurrllyyWWoooodd 0xDEB887 CCaaddeettBBlluuee 0x5F9EA0 CChhaarrttrreeuussee 0x7FFF00 CChhooccoollaattee 0xD2691E CCoorraall 0xFF7F50 CCoorrnnfflloowweerrBBlluuee 0x6495ED CCoorrnnssiillkk 0xFFF8DC CCrriimmssoonn 0xDC143C CCyyaann 0x00FFFF DDaarrkkBBlluuee 0x00008B DDaarrkkCCyyaann 0x008B8B DDaarrkkGGoollddeennRRoodd 0xB8860B DDaarrkkGGrraayy 0xA9A9A9 DDaarrkkGGrreeeenn 0x006400 DDaarrkkKKhhaakkii 0xBDB76B DDaarrkkMMaaggeennttaa 0x8B008B DDaarrkkOOlliivveeGGrreeeenn 0x556B2F DDaarrkkoorraannggee 0xFF8C00 DDaarrkkOOrrcchhiidd 0x9932CC DDaarrkkRReedd 0x8B0000 DDaarrkkSSaallmmoonn 0xE9967A DDaarrkkSSeeaaGGrreeeenn 0x8FBC8F DDaarrkkSSllaatteeBBlluuee 0x483D8B DDaarrkkSSllaatteeGGrraayy 0x2F4F4F DDaarrkkTTuurrqquuooiissee 0x00CED1 DDaarrkkVViioolleett 0x9400D3 DDeeeeppPPiinnkk 0xFF1493 DDeeeeppSSkkyyBBlluuee 0x00BFFF DDiimmGGrraayy 0x696969 DDooddggeerrBBlluuee 0x1E90FF FFiirreeBBrriicckk 0xB22222 FFlloorraallWWhhiittee 0xFFFAF0 FFoorreessttGGrreeeenn 0x228B22 FFuucchhssiiaa 0xFF00FF GGaaiinnssbboorroo 0xDCDCDC GGhhoossttWWhhiittee 0xF8F8FF GGoolldd 0xFFD700 GGoollddeennRRoodd 0xDAA520 GGrraayy 0x808080 GGrreeeenn 0x008000 GGrreeeennYYeellllooww 0xADFF2F HHoonneeyyDDeeww 0xF0FFF0 HHoottPPiinnkk 0xFF69B4 IInnddiiaannRReedd 0xCD5C5C IInnddiiggoo 0x4B0082 IIvvoorryy 0xFFFFF0 KKhhaakkii 0xF0E68C LLaavveennddeerr 0xE6E6FA LLaavveennddeerrBBlluusshh 0xFFF0F5 LLaawwnnGGrreeeenn 0x7CFC00 LLeemmoonnCChhiiffffoonn 0xFFFACD LLiigghhttBBlluuee 0xADD8E6 LLiigghhttCCoorraall 0xF08080 LLiigghhttCCyyaann 0xE0FFFF LLiigghhttGGoollddeennRRooddYYeellllooww 0xFAFAD2 LLiigghhttGGrreeeenn 0x90EE90 LLiigghhttGGrreeyy 0xD3D3D3 LLiigghhttPPiinnkk 0xFFB6C1 LLiigghhttSSaallmmoonn 0xFFA07A LLiigghhttSSeeaaGGrreeeenn 0x20B2AA LLiigghhttSSkkyyBBlluuee 0x87CEFA LLiigghhttSSllaatteeGGrraayy 0x778899 LLiigghhttSStteeeellBBlluuee 0xB0C4DE LLiigghhttYYeellllooww 0xFFFFE0 LLiimmee 0x00FF00 LLiimmeeGGrreeeenn 0x32CD32 LLiinneenn 0xFAF0E6 MMaaggeennttaa 0xFF00FF MMaarroooonn 0x800000 MMeeddiiuummAAqquuaaMMaarriinnee 0x66CDAA MMeeddiiuummBBlluuee 0x0000CD MMeeddiiuummOOrrcchhiidd 0xBA55D3 MMeeddiiuummPPuurrppllee 0x9370D8 MMeeddiiuummSSeeaaGGrreeeenn 0x3CB371 MMeeddiiuummSSllaatteeBBlluuee 0x7B68EE MMeeddiiuummSSpprriinnggGGrreeeenn 0x00FA9A MMeeddiiuummTTuurrqquuooiissee 0x48D1CC MMeeddiiuummVViioolleettRReedd 0xC71585 MMiiddnniigghhttBBlluuee 0x191970 MMiinnttCCrreeaamm 0xF5FFFA MMiissttyyRRoossee 0xFFE4E1 MMooccccaassiinn 0xFFE4B5 NNaavvaajjooWWhhiittee 0xFFDEAD NNaavvyy 0x000080 OOllddLLaaccee 0xFDF5E6 OOlliivvee 0x808000 OOlliivveeDDrraabb 0x6B8E23 OOrraannggee 0xFFA500 OOrraannggeeRReedd 0xFF4500 OOrrcchhiidd 0xDA70D6 PPaalleeGGoollddeennRRoodd 0xEEE8AA PPaalleeGGrreeeenn 0x98FB98 PPaalleeTTuurrqquuooiissee 0xAFEEEE PPaalleeVViioolleettRReedd 0xD87093 PPaappaayyaaWWhhiipp 0xFFEFD5 PPeeaacchhPPuuffff 0xFFDAB9 PPeerruu 0xCD853F PPiinnkk 0xFFC0CB PPlluumm 0xDDA0DD PPoowwddeerrBBlluuee 0xB0E0E6 PPuurrppllee 0x800080 RReedd 0xFF0000 RRoossyyBBrroowwnn 0xBC8F8F RRooyyaallBBlluuee 0x4169E1 SSaaddddlleeBBrroowwnn 0x8B4513 SSaallmmoonn 0xFA8072 SSaannddyyBBrroowwnn 0xF4A460 SSeeaaGGrreeeenn 0x2E8B57 SSeeaaSShheellll 0xFFF5EE SSiieennnnaa 0xA0522D SSiillvveerr 0xC0C0C0 SSkkyyBBlluuee 0x87CEEB SSllaatteeBBlluuee 0x6A5ACD SSllaatteeGGrraayy 0x708090 SSnnooww 0xFFFAFA SSpprriinnggGGrreeeenn 0x00FF7F SStteeeellBBlluuee 0x4682B4 TTaann 0xD2B48C TTeeaall 0x008080 TThhiissttllee 0xD8BFD8 TToommaattoo 0xFF6347 TTuurrqquuooiissee 0x40E0D0 VViioolleett 0xEE82EE WWhheeaatt 0xF5DEB3 WWhhiittee 0xFFFFFF WWhhiitteeSSmmookkee 0xF5F5F5 YYeellllooww 0xFFFF00 YYeelllloowwGGrreeeenn 0x9ACD32 CChhaannnneell LLaayyoouutt A channel layout specifies the spatial disposition of the channels in a multi-channel audio stream. To specify a channel layout, FFmpeg makes use of a special syntax. Individual channels are identified by an id, as given by the table below: FFLL front left FFRR front right FFCC front center LLFFEE low frequency BBLL back left BBRR back right FFLLCC front left-of-center FFRRCC front right-of-center BBCC back center SSLL side left SSRR side right TTCC top center TTFFLL top front left TTFFCC top front center TTFFRR top front right TTBBLL top back left TTBBCC top back center TTBBRR top back right DDLL downmix left DDRR downmix right WWLL wide left WWRR wide right SSDDLL surround direct left SSDDRR surround direct right LLFFEE22 low frequency 2 Standard channel layout compositions can be specified by using the fol- lowing identifiers: mmoonnoo FC sstteerreeoo FL+FR 22..11 FL+FR+LFE 33..00 FL+FR+FC 33..00((bbaacckk)) FL+FR+BC 44..00 FL+FR+FC+BC qquuaadd FL+FR+BL+BR qquuaadd((ssiiddee)) FL+FR+SL+SR 33..11 FL+FR+FC+LFE 55..00 FL+FR+FC+BL+BR 55..00((ssiiddee)) FL+FR+FC+SL+SR 44..11 FL+FR+FC+LFE+BC 55..11 FL+FR+FC+LFE+BL+BR 55..11((ssiiddee)) FL+FR+FC+LFE+SL+SR 66..00 FL+FR+FC+BC+SL+SR 66..00((ffrroonntt)) FL+FR+FLC+FRC+SL+SR hheexxaaggoonnaall FL+FR+FC+BL+BR+BC 66..11 FL+FR+FC+LFE+BC+SL+SR 66..11 FL+FR+FC+LFE+BL+BR+BC 66..11((ffrroonntt)) FL+FR+LFE+FLC+FRC+SL+SR 77..00 FL+FR+FC+BL+BR+SL+SR 77..00((ffrroonntt)) FL+FR+FC+FLC+FRC+SL+SR 77..11 FL+FR+FC+LFE+BL+BR+SL+SR 77..11((wwiiddee)) FL+FR+FC+LFE+BL+BR+FLC+FRC 77..11((wwiiddee--ssiiddee)) FL+FR+FC+LFE+FLC+FRC+SL+SR ooccttaaggoonnaall FL+FR+FC+BL+BR+BC+SL+SR hheexxaaddeeccaaggoonnaall FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR ddoowwnnmmiixx DL+DR 2222..22 FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL+SR+TC+TFL+TFC+TFR+TBL+TBC+TBR+LFE2+TSL+TSR+BFC+BFL+BFR A custom channel layout can be specified as a sequence of terms, sepa- rated by '+'. Each term can be: +o the name of a single channel (e.g. FFLL, FFRR, FFCC, LLFFEE, etc.), each optionally containing a custom name after a '@', (e.g. FFLL@@LLeefftt, FFRR@@RRiigghhtt, FFCC@@CCeenntteerr, LLFFEE@@LLooww__FFrreeqquueennccyy, etc.) A standard channel layout can be specified by the following: +o the name of a single channel (e.g. FFLL, FFRR, FFCC, LLFFEE, etc.) +o the name of a standard channel layout (e.g. mmoonnoo, sstteerreeoo, 44..00, qquuaadd, 55..00, etc.) +o a number of channels, in decimal, followed by 'c', yielding the default channel layout for that number of channels (see the func- tion "av_channel_layout_default"). Note that not all channel counts have a default layout. +o a number of channels, in decimal, followed by 'C', yielding an unknown channel layout with the specified number of channels. Note that not all channel layout specification strings support unknown channel layouts. +o a channel layout mask, in hexadecimal starting with "0x" (see the "AV_CH_*" macros in _l_i_b_a_v_u_t_i_l_/_c_h_a_n_n_e_l___l_a_y_o_u_t_._h. Before libavutil version 53 the trailing character "c" to specify a number of channels was optional, but now it is required, while a chan- nel layout mask can also be specified as a decimal number (if and only if not followed by "c" or "C"). See also the function "av_channel_layout_from_string" defined in _l_i_b_a_v_u_t_i_l_/_c_h_a_n_n_e_l___l_a_y_o_u_t_._h. EEXXPPRREESSSSIIOONN EEVVAALLUUAATTIIOONN When evaluating an arithmetic expression, FFmpeg uses an internal for- mula evaluator, implemented through the _l_i_b_a_v_u_t_i_l_/_e_v_a_l_._h interface. An expression may contain unary, binary operators, constants, and func- tions. Two expressions _e_x_p_r_1 and _e_x_p_r_2 can be combined to form another expres- sion "_e_x_p_r_1;_e_x_p_r_2". _e_x_p_r_1 and _e_x_p_r_2 are evaluated in turn, and the new expression evaluates to the value of _e_x_p_r_2. The following binary operators are available: "+", "-", "*", "/", "^". The following unary operators are available: "+", "-". The following functions are available: aabbss((xx)) Compute absolute value of _x. aaccooss((xx)) Compute arccosine of _x. aassiinn((xx)) Compute arcsine of _x. aattaann((xx)) Compute arctangent of _x. aattaann22((xx,, yy)) Compute principal value of the arc tangent of _y/_x. bbeettwweeeenn((xx,, mmiinn,, mmaaxx)) Return 1 if _x is greater than or equal to _m_i_n and lesser than or equal to _m_a_x, 0 otherwise. bbiittaanndd((xx,, yy)) bbiittoorr((xx,, yy)) Compute bitwise and/or operation on _x and _y. The results of the evaluation of _x and _y are converted to integers before executing the bitwise operation. Note that both the conversion to integer and the conversion back to floating point can lose precision. Beware of unexpected results for large numbers (usually 2^53 and larger). cceeiill((eexxpprr)) Round the value of expression _e_x_p_r upwards to the nearest integer. For example, "ceil(1.5)" is "2.0". cclliipp((xx,, mmiinn,, mmaaxx)) Return the value of _x clipped between _m_i_n and _m_a_x. ccooss((xx)) Compute cosine of _x. ccoosshh((xx)) Compute hyperbolic cosine of _x. eeqq((xx,, yy)) Return 1 if _x and _y are equivalent, 0 otherwise. eexxpp((xx)) Compute exponential of _x (with base "e", the Euler's number). fflloooorr((eexxpprr)) Round the value of expression _e_x_p_r downwards to the nearest inte- ger. For example, "floor(-1.5)" is "-2.0". ggaauussss((xx)) Compute Gauss function of _x, corresponding to "exp(-x*x/2) / sqrt(2*PI)". ggccdd((xx,, yy)) Return the greatest common divisor of _x and _y. If both _x and _y are 0 or either or both are less than zero then behavior is undefined. ggtt((xx,, yy)) Return 1 if _x is greater than _y, 0 otherwise. ggttee((xx,, yy)) Return 1 if _x is greater than or equal to _y, 0 otherwise. hhyyppoott((xx,, yy)) This function is similar to the C function with the same name; it returns "sqrt(_x*_x + _y*_y)", the length of the hypotenuse of a right triangle with sides of length _x and _y, or the distance of the point (_x, _y) from the origin. iiff((xx,, yy)) Evaluate _x, and if the result is non-zero return the result of the evaluation of _y, return 0 otherwise. iiff((xx,, yy,, zz)) Evaluate _x, and if the result is non-zero return the evaluation result of _y, otherwise the evaluation result of _z. iiffnnoott((xx,, yy)) Evaluate _x, and if the result is zero return the result of the evaluation of _y, return 0 otherwise. iiffnnoott((xx,, yy,, zz)) Evaluate _x, and if the result is zero return the evaluation result of _y, otherwise the evaluation result of _z. iissiinnff((xx)) Return 1.0 if _x is +/-INFINITY, 0.0 otherwise. iissnnaann((xx)) Return 1.0 if _x is NAN, 0.0 otherwise. lldd((vvaarr)) Load the value of the internal variable with number _v_a_r, which was previously stored with st(_v_a_r, _e_x_p_r). The function returns the loaded value. lleerrpp((xx,, yy,, zz)) Return linear interpolation between _x and _y by amount of _z. lloogg((xx)) Compute natural logarithm of _x. lltt((xx,, yy)) Return 1 if _x is lesser than _y, 0 otherwise. llttee((xx,, yy)) Return 1 if _x is lesser than or equal to _y, 0 otherwise. mmaaxx((xx,, yy)) Return the maximum between _x and _y. mmiinn((xx,, yy)) Return the minimum between _x and _y. mmoodd((xx,, yy)) Compute the remainder of division of _x by _y. nnoott((eexxpprr)) Return 1.0 if _e_x_p_r is zero, 0.0 otherwise. ppooww((xx,, yy)) Compute the power of _x elevated _y, it is equivalent to "(_x)^(_y)". pprriinntt((tt)) pprriinntt((tt,, ll)) Print the value of expression _t with loglevel _l. If _l is not speci- fied then a default log level is used. Returns the value of the expression printed. Prints t with loglevel l rraannddoomm((xx)) Return a pseudo random value between 0.0 and 1.0. _x is the index of the internal variable which will be used to save the seed/state. rroooott((eexxpprr,, mmaaxx)) Find an input value for which the function represented by _e_x_p_r with argument _l_d_(_0_) is 0 in the interval 0.._m_a_x. The expression in _e_x_p_r must denote a continuous function or the result is undefined. _l_d_(_0_) is used to represent the function input value, which means that the given expression will be evaluated multiple times with various input values that the expression can access through ld(0). When the expression evaluates to 0 then the corresponding input value will be returned. rroouunndd((eexxpprr)) Round the value of expression _e_x_p_r to the nearest integer. For example, "round(1.5)" is "2.0". ssggnn((xx)) Compute sign of _x. ssiinn((xx)) Compute sine of _x. ssiinnhh((xx)) Compute hyperbolic sine of _x. ssqqrrtt((eexxpprr)) Compute the square root of _e_x_p_r. This is equivalent to "(_e_x_p_r)^.5". ssqquuiisshh((xx)) Compute expression "1/(1 + exp(4*x))". sstt((vvaarr,, eexxpprr)) Store the value of the expression _e_x_p_r in an internal variable. _v_a_r specifies the number of the variable where to store the value, and it is a value ranging from 0 to 9. The function returns the value stored in the internal variable. Note, Variables are currently not shared between expressions. ttaann((xx)) Compute tangent of _x. ttaannhh((xx)) Compute hyperbolic tangent of _x. ttaayylloorr((eexxpprr,, xx)) ttaayylloorr((eexxpprr,, xx,, iidd)) Evaluate a Taylor series at _x, given an expression representing the "ld(id)"-th derivative of a function at 0. When the series does not converge the result is undefined. _l_d_(_i_d_) is used to represent the derivative order in _e_x_p_r, which means that the given expression will be evaluated multiple times with various input values that the expression can access through "ld(id)". If _i_d is not specified then 0 is assumed. Note, when you have the derivatives at y instead of 0, "tay- lor(expr, x-y)" can be used. _tt_ii_mm_ee((00)) Return the current (wallclock) time in seconds. ttrruunncc((eexxpprr)) Round the value of expression _e_x_p_r towards zero to the nearest integer. For example, "trunc(-1.5)" is "-1.0". wwhhiillee((ccoonndd,, eexxpprr)) Evaluate expression _e_x_p_r while the expression _c_o_n_d is non-zero, and returns the value of the last _e_x_p_r evaluation, or NAN if _c_o_n_d was always false. The following constants are available: PPII area of the unit disc, approximately 3.14 EE _e_x_p(1) (Euler's number), approximately 2.718 PPHHII golden ratio (1+_s_q_r_t(5))/2, approximately 1.618 Assuming that an expression is considered "true" if it has a non-zero value, note that: "*" works like AND "+" works like OR For example the construct: if (A AND B) then C is equivalent to: if(A*B, C) In your C code, you can extend the list of unary and binary functions, and define recognized constants, so that they are available for your expressions. The evaluator also recognizes the International System unit prefixes. If 'i' is appended after the prefix, binary prefixes are used, which are based on powers of 1024 instead of powers of 1000. The 'B' postfix multiplies the value by 8, and can be appended after a unit prefix or used alone. This allows using for example 'KB', 'MiB', 'G' and 'B' as number postfix. The list of available International System prefixes follows, with indi- cation of the corresponding powers of 10 and of 2. yy 10^-24 / 2^-80 zz 10^-21 / 2^-70 aa 10^-18 / 2^-60 ff 10^-15 / 2^-50 pp 10^-12 / 2^-40 nn 10^-9 / 2^-30 uu 10^-6 / 2^-20 mm 10^-3 / 2^-10 cc 10^-2 dd 10^-1 hh 10^2 kk 10^3 / 2^10 KK 10^3 / 2^10 MM 10^6 / 2^20 GG 10^9 / 2^30 TT 10^12 / 2^40 PP 10^15 / 2^40 EE 10^18 / 2^50 ZZ 10^21 / 2^60 YY 10^24 / 2^70 SSEEEE AALLSSOO _f_f_m_p_e_g(1), _f_f_p_l_a_y(1), _f_f_p_r_o_b_e(1), _l_i_b_a_v_u_t_i_l(3) AAUUTTHHOORRSS The FFmpeg developers. For details about the authorship, see the Git history of the project (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command ggiitt lloogg in the FFmpeg source directory, or browsing the online repository at . Maintainers for the specific components are listed in the file _M_A_I_N_- _T_A_I_N_E_R_S in the source code tree. FFMPEG-UTILS(1)