1FFMPEG-UTILS(1) FFMPEG-UTILS(1)
2
3
4
6 ffmpeg-utils - FFmpeg utilities
7
9 This document describes some generic features and utilities provided by
10 the libavutil library.
11
13 This section documents the syntax and formats employed by the FFmpeg
14 libraries and tools.
15
16 Quoting and escaping
17 FFmpeg adopts the following quoting and escaping mechanism, unless
18 explicitly specified. The following rules are applied:
19
20 • ' and \ are special characters (respectively used for quoting and
21 escaping). In addition to them, there might be other special
22 characters depending on the specific syntax where the escaping and
23 quoting are employed.
24
25 • A special character is escaped by prefixing it with a \.
26
27 • All characters enclosed between '' are included literally in the
28 parsed string. The quote character ' itself cannot be quoted, so
29 you may need to close the quote and escape it.
30
31 • Leading and trailing whitespaces, unless escaped or quoted, are
32 removed from the parsed string.
33
34 Note that you may need to add a second level of escaping when using the
35 command line or a script, which depends on the syntax of the adopted
36 shell language.
37
38 The function "av_get_token" defined in libavutil/avstring.h can be used
39 to parse a token quoted or escaped according to the rules defined
40 above.
41
42 The tool tools/ffescape in the FFmpeg source tree can be used to
43 automatically quote or escape a string in a script.
44
45 Examples
46
47 • Escape the string "Crime d'Amour" containing the "'" special
48 character:
49
50 Crime d\'Amour
51
52 • The string above contains a quote, so the "'" needs to be escaped
53 when quoting it:
54
55 'Crime d'\''Amour'
56
57 • Include leading or trailing whitespaces using quoting:
58
59 ' this string starts and ends with whitespaces '
60
61 • Escaping and quoting can be mixed together:
62
63 ' The string '\'string\'' is a string '
64
65 • To include a literal \ you can use either escaping or quoting:
66
67 'c:\foo' can be written as c:\\foo
68
69 Date
70 The accepted syntax is:
71
72 [(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]
73 now
74
75 If the value is "now" it takes the current time.
76
77 Time is local time unless Z is appended, in which case it is
78 interpreted as UTC. If the year-month-day part is not specified it
79 takes the current year-month-day.
80
81 Time duration
82 There are two accepted syntaxes for expressing time duration.
83
84 [-][<HH>:]<MM>:<SS>[.<m>...]
85
86 HH expresses the number of hours, MM the number of minutes for a
87 maximum of 2 digits, and SS the number of seconds for a maximum of 2
88 digits. The m at the end expresses decimal value for SS.
89
90 or
91
92 [-]<S>+[.<m>...][s|ms|us]
93
94 S expresses the number of seconds, with the optional decimal part m.
95 The optional literal suffixes s, ms or us indicate to interpret the
96 value as seconds, milliseconds or microseconds, respectively.
97
98 In both expressions, the optional - indicates negative duration.
99
100 Examples
101
102 The following examples are all valid time duration:
103
104 55 55 seconds
105
106 0.2 0.2 seconds
107
108 200ms
109 200 milliseconds, that's 0.2s
110
111 200000us
112 200000 microseconds, that's 0.2s
113
114 12:03:45
115 12 hours, 03 minutes and 45 seconds
116
117 23.189
118 23.189 seconds
119
120 Video size
121 Specify the size of the sourced video, it may be a string of the form
122 widthxheight, or the name of a size abbreviation.
123
124 The following abbreviations are recognized:
125
126 ntsc
127 720x480
128
129 pal 720x576
130
131 qntsc
132 352x240
133
134 qpal
135 352x288
136
137 sntsc
138 640x480
139
140 spal
141 768x576
142
143 film
144 352x240
145
146 ntsc-film
147 352x240
148
149 sqcif
150 128x96
151
152 qcif
153 176x144
154
155 cif 352x288
156
157 4cif
158 704x576
159
160 16cif
161 1408x1152
162
163 qqvga
164 160x120
165
166 qvga
167 320x240
168
169 vga 640x480
170
171 svga
172 800x600
173
174 xga 1024x768
175
176 uxga
177 1600x1200
178
179 qxga
180 2048x1536
181
182 sxga
183 1280x1024
184
185 qsxga
186 2560x2048
187
188 hsxga
189 5120x4096
190
191 wvga
192 852x480
193
194 wxga
195 1366x768
196
197 wsxga
198 1600x1024
199
200 wuxga
201 1920x1200
202
203 woxga
204 2560x1600
205
206 wqsxga
207 3200x2048
208
209 wquxga
210 3840x2400
211
212 whsxga
213 6400x4096
214
215 whuxga
216 7680x4800
217
218 cga 320x200
219
220 ega 640x350
221
222 hd480
223 852x480
224
225 hd720
226 1280x720
227
228 hd1080
229 1920x1080
230
231 2k 2048x1080
232
233 2kflat
234 1998x1080
235
236 2kscope
237 2048x858
238
239 4k 4096x2160
240
241 4kflat
242 3996x2160
243
244 4kscope
245 4096x1716
246
247 nhd 640x360
248
249 hqvga
250 240x160
251
252 wqvga
253 400x240
254
255 fwqvga
256 432x240
257
258 hvga
259 480x320
260
261 qhd 960x540
262
263 2kdci
264 2048x1080
265
266 4kdci
267 4096x2160
268
269 uhd2160
270 3840x2160
271
272 uhd4320
273 7680x4320
274
275 Video rate
276 Specify the frame rate of a video, expressed as the number of frames
277 generated per second. It has to be a string in the format
278 frame_rate_num/frame_rate_den, an integer number, a float number or a
279 valid video frame rate abbreviation.
280
281 The following abbreviations are recognized:
282
283 ntsc
284 30000/1001
285
286 pal 25/1
287
288 qntsc
289 30000/1001
290
291 qpal
292 25/1
293
294 sntsc
295 30000/1001
296
297 spal
298 25/1
299
300 film
301 24/1
302
303 ntsc-film
304 24000/1001
305
306 Ratio
307 A ratio can be expressed as an expression, or in the form
308 numerator:denominator.
309
310 Note that a ratio with infinite (1/0) or negative value is considered
311 valid, so you should check on the returned value if you want to exclude
312 those values.
313
314 The undefined value can be expressed using the "0:0" string.
315
316 Color
317 It can be the name of a color as defined below (case insensitive match)
318 or a "[0x|#]RRGGBB[AA]" sequence, possibly followed by @ and a string
319 representing the alpha component.
320
321 The alpha component may be a string composed by "0x" followed by an
322 hexadecimal number or a decimal number between 0.0 and 1.0, which
323 represents the opacity value (0x00 or 0.0 means completely transparent,
324 0xff or 1.0 completely opaque). If the alpha component is not specified
325 then 0xff is assumed.
326
327 The string random will result in a random color.
328
329 The following names of colors are recognized:
330
331 AliceBlue
332 0xF0F8FF
333
334 AntiqueWhite
335 0xFAEBD7
336
337 Aqua
338 0x00FFFF
339
340 Aquamarine
341 0x7FFFD4
342
343 Azure
344 0xF0FFFF
345
346 Beige
347 0xF5F5DC
348
349 Bisque
350 0xFFE4C4
351
352 Black
353 0x000000
354
355 BlanchedAlmond
356 0xFFEBCD
357
358 Blue
359 0x0000FF
360
361 BlueViolet
362 0x8A2BE2
363
364 Brown
365 0xA52A2A
366
367 BurlyWood
368 0xDEB887
369
370 CadetBlue
371 0x5F9EA0
372
373 Chartreuse
374 0x7FFF00
375
376 Chocolate
377 0xD2691E
378
379 Coral
380 0xFF7F50
381
382 CornflowerBlue
383 0x6495ED
384
385 Cornsilk
386 0xFFF8DC
387
388 Crimson
389 0xDC143C
390
391 Cyan
392 0x00FFFF
393
394 DarkBlue
395 0x00008B
396
397 DarkCyan
398 0x008B8B
399
400 DarkGoldenRod
401 0xB8860B
402
403 DarkGray
404 0xA9A9A9
405
406 DarkGreen
407 0x006400
408
409 DarkKhaki
410 0xBDB76B
411
412 DarkMagenta
413 0x8B008B
414
415 DarkOliveGreen
416 0x556B2F
417
418 Darkorange
419 0xFF8C00
420
421 DarkOrchid
422 0x9932CC
423
424 DarkRed
425 0x8B0000
426
427 DarkSalmon
428 0xE9967A
429
430 DarkSeaGreen
431 0x8FBC8F
432
433 DarkSlateBlue
434 0x483D8B
435
436 DarkSlateGray
437 0x2F4F4F
438
439 DarkTurquoise
440 0x00CED1
441
442 DarkViolet
443 0x9400D3
444
445 DeepPink
446 0xFF1493
447
448 DeepSkyBlue
449 0x00BFFF
450
451 DimGray
452 0x696969
453
454 DodgerBlue
455 0x1E90FF
456
457 FireBrick
458 0xB22222
459
460 FloralWhite
461 0xFFFAF0
462
463 ForestGreen
464 0x228B22
465
466 Fuchsia
467 0xFF00FF
468
469 Gainsboro
470 0xDCDCDC
471
472 GhostWhite
473 0xF8F8FF
474
475 Gold
476 0xFFD700
477
478 GoldenRod
479 0xDAA520
480
481 Gray
482 0x808080
483
484 Green
485 0x008000
486
487 GreenYellow
488 0xADFF2F
489
490 HoneyDew
491 0xF0FFF0
492
493 HotPink
494 0xFF69B4
495
496 IndianRed
497 0xCD5C5C
498
499 Indigo
500 0x4B0082
501
502 Ivory
503 0xFFFFF0
504
505 Khaki
506 0xF0E68C
507
508 Lavender
509 0xE6E6FA
510
511 LavenderBlush
512 0xFFF0F5
513
514 LawnGreen
515 0x7CFC00
516
517 LemonChiffon
518 0xFFFACD
519
520 LightBlue
521 0xADD8E6
522
523 LightCoral
524 0xF08080
525
526 LightCyan
527 0xE0FFFF
528
529 LightGoldenRodYellow
530 0xFAFAD2
531
532 LightGreen
533 0x90EE90
534
535 LightGrey
536 0xD3D3D3
537
538 LightPink
539 0xFFB6C1
540
541 LightSalmon
542 0xFFA07A
543
544 LightSeaGreen
545 0x20B2AA
546
547 LightSkyBlue
548 0x87CEFA
549
550 LightSlateGray
551 0x778899
552
553 LightSteelBlue
554 0xB0C4DE
555
556 LightYellow
557 0xFFFFE0
558
559 Lime
560 0x00FF00
561
562 LimeGreen
563 0x32CD32
564
565 Linen
566 0xFAF0E6
567
568 Magenta
569 0xFF00FF
570
571 Maroon
572 0x800000
573
574 MediumAquaMarine
575 0x66CDAA
576
577 MediumBlue
578 0x0000CD
579
580 MediumOrchid
581 0xBA55D3
582
583 MediumPurple
584 0x9370D8
585
586 MediumSeaGreen
587 0x3CB371
588
589 MediumSlateBlue
590 0x7B68EE
591
592 MediumSpringGreen
593 0x00FA9A
594
595 MediumTurquoise
596 0x48D1CC
597
598 MediumVioletRed
599 0xC71585
600
601 MidnightBlue
602 0x191970
603
604 MintCream
605 0xF5FFFA
606
607 MistyRose
608 0xFFE4E1
609
610 Moccasin
611 0xFFE4B5
612
613 NavajoWhite
614 0xFFDEAD
615
616 Navy
617 0x000080
618
619 OldLace
620 0xFDF5E6
621
622 Olive
623 0x808000
624
625 OliveDrab
626 0x6B8E23
627
628 Orange
629 0xFFA500
630
631 OrangeRed
632 0xFF4500
633
634 Orchid
635 0xDA70D6
636
637 PaleGoldenRod
638 0xEEE8AA
639
640 PaleGreen
641 0x98FB98
642
643 PaleTurquoise
644 0xAFEEEE
645
646 PaleVioletRed
647 0xD87093
648
649 PapayaWhip
650 0xFFEFD5
651
652 PeachPuff
653 0xFFDAB9
654
655 Peru
656 0xCD853F
657
658 Pink
659 0xFFC0CB
660
661 Plum
662 0xDDA0DD
663
664 PowderBlue
665 0xB0E0E6
666
667 Purple
668 0x800080
669
670 Red 0xFF0000
671
672 RosyBrown
673 0xBC8F8F
674
675 RoyalBlue
676 0x4169E1
677
678 SaddleBrown
679 0x8B4513
680
681 Salmon
682 0xFA8072
683
684 SandyBrown
685 0xF4A460
686
687 SeaGreen
688 0x2E8B57
689
690 SeaShell
691 0xFFF5EE
692
693 Sienna
694 0xA0522D
695
696 Silver
697 0xC0C0C0
698
699 SkyBlue
700 0x87CEEB
701
702 SlateBlue
703 0x6A5ACD
704
705 SlateGray
706 0x708090
707
708 Snow
709 0xFFFAFA
710
711 SpringGreen
712 0x00FF7F
713
714 SteelBlue
715 0x4682B4
716
717 Tan 0xD2B48C
718
719 Teal
720 0x008080
721
722 Thistle
723 0xD8BFD8
724
725 Tomato
726 0xFF6347
727
728 Turquoise
729 0x40E0D0
730
731 Violet
732 0xEE82EE
733
734 Wheat
735 0xF5DEB3
736
737 White
738 0xFFFFFF
739
740 WhiteSmoke
741 0xF5F5F5
742
743 Yellow
744 0xFFFF00
745
746 YellowGreen
747 0x9ACD32
748
749 Channel Layout
750 A channel layout specifies the spatial disposition of the channels in a
751 multi-channel audio stream. To specify a channel layout, FFmpeg makes
752 use of a special syntax.
753
754 Individual channels are identified by an id, as given by the table
755 below:
756
757 FL front left
758
759 FR front right
760
761 FC front center
762
763 LFE low frequency
764
765 BL back left
766
767 BR back right
768
769 FLC front left-of-center
770
771 FRC front right-of-center
772
773 BC back center
774
775 SL side left
776
777 SR side right
778
779 TC top center
780
781 TFL top front left
782
783 TFC top front center
784
785 TFR top front right
786
787 TBL top back left
788
789 TBC top back center
790
791 TBR top back right
792
793 DL downmix left
794
795 DR downmix right
796
797 WL wide left
798
799 WR wide right
800
801 SDL surround direct left
802
803 SDR surround direct right
804
805 LFE2
806 low frequency 2
807
808 Standard channel layout compositions can be specified by using the
809 following identifiers:
810
811 mono
812 FC
813
814 stereo
815 FL+FR
816
817 2.1 FL+FR+LFE
818
819 3.0 FL+FR+FC
820
821 3.0(back)
822 FL+FR+BC
823
824 4.0 FL+FR+FC+BC
825
826 quad
827 FL+FR+BL+BR
828
829 quad(side)
830 FL+FR+SL+SR
831
832 3.1 FL+FR+FC+LFE
833
834 5.0 FL+FR+FC+BL+BR
835
836 5.0(side)
837 FL+FR+FC+SL+SR
838
839 4.1 FL+FR+FC+LFE+BC
840
841 5.1 FL+FR+FC+LFE+BL+BR
842
843 5.1(side)
844 FL+FR+FC+LFE+SL+SR
845
846 6.0 FL+FR+FC+BC+SL+SR
847
848 6.0(front)
849 FL+FR+FLC+FRC+SL+SR
850
851 hexagonal
852 FL+FR+FC+BL+BR+BC
853
854 6.1 FL+FR+FC+LFE+BC+SL+SR
855
856 6.1 FL+FR+FC+LFE+BL+BR+BC
857
858 6.1(front)
859 FL+FR+LFE+FLC+FRC+SL+SR
860
861 7.0 FL+FR+FC+BL+BR+SL+SR
862
863 7.0(front)
864 FL+FR+FC+FLC+FRC+SL+SR
865
866 7.1 FL+FR+FC+LFE+BL+BR+SL+SR
867
868 7.1(wide)
869 FL+FR+FC+LFE+BL+BR+FLC+FRC
870
871 7.1(wide-side)
872 FL+FR+FC+LFE+FLC+FRC+SL+SR
873
874 7.1(top)
875 FL+FR+FC+LFE+BL+BR+TFL+TFR
876
877 octagonal
878 FL+FR+FC+BL+BR+BC+SL+SR
879
880 cube
881 FL+FR+BL+BR+TFL+TFR+TBL+TBR
882
883 hexadecagonal
884 FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR
885
886 downmix
887 DL+DR
888
889 22.2
890 FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL+SR+TC+TFL+TFC+TFR+TBL+TBC+TBR+LFE2+TSL+TSR+BFC+BFL+BFR
891
892 A custom channel layout can be specified as a sequence of terms,
893 separated by '+'. Each term can be:
894
895 • the name of a single channel (e.g. FL, FR, FC, LFE, etc.), each
896 optionally containing a custom name after a '@', (e.g. FL@Left,
897 FR@Right, FC@Center, LFE@Low_Frequency, etc.)
898
899 A standard channel layout can be specified by the following:
900
901 • the name of a single channel (e.g. FL, FR, FC, LFE, etc.)
902
903 • the name of a standard channel layout (e.g. mono, stereo, 4.0,
904 quad, 5.0, etc.)
905
906 • a number of channels, in decimal, followed by 'c', yielding the
907 default channel layout for that number of channels (see the
908 function "av_channel_layout_default"). Note that not all channel
909 counts have a default layout.
910
911 • a number of channels, in decimal, followed by 'C', yielding an
912 unknown channel layout with the specified number of channels. Note
913 that not all channel layout specification strings support unknown
914 channel layouts.
915
916 • a channel layout mask, in hexadecimal starting with "0x" (see the
917 "AV_CH_*" macros in libavutil/channel_layout.h.
918
919 Before libavutil version 53 the trailing character "c" to specify a
920 number of channels was optional, but now it is required, while a
921 channel layout mask can also be specified as a decimal number (if and
922 only if not followed by "c" or "C").
923
924 See also the function "av_channel_layout_from_string" defined in
925 libavutil/channel_layout.h.
926
928 When evaluating an arithmetic expression, FFmpeg uses an internal
929 formula evaluator, implemented through the libavutil/eval.h interface.
930
931 An expression may contain unary, binary operators, constants, and
932 functions.
933
934 Two expressions expr1 and expr2 can be combined to form another
935 expression "expr1;expr2". expr1 and expr2 are evaluated in turn, and
936 the new expression evaluates to the value of expr2.
937
938 The following binary operators are available: "+", "-", "*", "/", "^".
939
940 The following unary operators are available: "+", "-".
941
942 The following functions are available:
943
944 abs(x)
945 Compute absolute value of x.
946
947 acos(x)
948 Compute arccosine of x.
949
950 asin(x)
951 Compute arcsine of x.
952
953 atan(x)
954 Compute arctangent of x.
955
956 atan2(x, y)
957 Compute principal value of the arc tangent of y/x.
958
959 between(x, min, max)
960 Return 1 if x is greater than or equal to min and lesser than or
961 equal to max, 0 otherwise.
962
963 bitand(x, y)
964 bitor(x, y)
965 Compute bitwise and/or operation on x and y.
966
967 The results of the evaluation of x and y are converted to integers
968 before executing the bitwise operation.
969
970 Note that both the conversion to integer and the conversion back to
971 floating point can lose precision. Beware of unexpected results for
972 large numbers (usually 2^53 and larger).
973
974 ceil(expr)
975 Round the value of expression expr upwards to the nearest integer.
976 For example, "ceil(1.5)" is "2.0".
977
978 clip(x, min, max)
979 Return the value of x clipped between min and max.
980
981 cos(x)
982 Compute cosine of x.
983
984 cosh(x)
985 Compute hyperbolic cosine of x.
986
987 eq(x, y)
988 Return 1 if x and y are equivalent, 0 otherwise.
989
990 exp(x)
991 Compute exponential of x (with base "e", the Euler's number).
992
993 floor(expr)
994 Round the value of expression expr downwards to the nearest
995 integer. For example, "floor(-1.5)" is "-2.0".
996
997 gauss(x)
998 Compute Gauss function of x, corresponding to "exp(-x*x/2) /
999 sqrt(2*PI)".
1000
1001 gcd(x, y)
1002 Return the greatest common divisor of x and y. If both x and y are
1003 0 or either or both are less than zero then behavior is undefined.
1004
1005 gt(x, y)
1006 Return 1 if x is greater than y, 0 otherwise.
1007
1008 gte(x, y)
1009 Return 1 if x is greater than or equal to y, 0 otherwise.
1010
1011 hypot(x, y)
1012 This function is similar to the C function with the same name; it
1013 returns "sqrt(x*x + y*y)", the length of the hypotenuse of a right
1014 triangle with sides of length x and y, or the distance of the point
1015 (x, y) from the origin.
1016
1017 if(x, y)
1018 Evaluate x, and if the result is non-zero return the result of the
1019 evaluation of y, return 0 otherwise.
1020
1021 if(x, y, z)
1022 Evaluate x, and if the result is non-zero return the evaluation
1023 result of y, otherwise the evaluation result of z.
1024
1025 ifnot(x, y)
1026 Evaluate x, and if the result is zero return the result of the
1027 evaluation of y, return 0 otherwise.
1028
1029 ifnot(x, y, z)
1030 Evaluate x, and if the result is zero return the evaluation result
1031 of y, otherwise the evaluation result of z.
1032
1033 isinf(x)
1034 Return 1.0 if x is +/-INFINITY, 0.0 otherwise.
1035
1036 isnan(x)
1037 Return 1.0 if x is NAN, 0.0 otherwise.
1038
1039 ld(var)
1040 Load the value of the internal variable with number var, which was
1041 previously stored with st(var, expr). The function returns the
1042 loaded value.
1043
1044 lerp(x, y, z)
1045 Return linear interpolation between x and y by amount of z.
1046
1047 log(x)
1048 Compute natural logarithm of x.
1049
1050 lt(x, y)
1051 Return 1 if x is lesser than y, 0 otherwise.
1052
1053 lte(x, y)
1054 Return 1 if x is lesser than or equal to y, 0 otherwise.
1055
1056 max(x, y)
1057 Return the maximum between x and y.
1058
1059 min(x, y)
1060 Return the minimum between x and y.
1061
1062 mod(x, y)
1063 Compute the remainder of division of x by y.
1064
1065 not(expr)
1066 Return 1.0 if expr is zero, 0.0 otherwise.
1067
1068 pow(x, y)
1069 Compute the power of x elevated y, it is equivalent to "(x)^(y)".
1070
1071 print(t)
1072 print(t, l)
1073 Print the value of expression t with loglevel l. If l is not
1074 specified then a default log level is used. Returns the value of
1075 the expression printed.
1076
1077 Prints t with loglevel l
1078
1079 random(x)
1080 Return a pseudo random value between 0.0 and 1.0. x is the index of
1081 the internal variable which will be used to save the seed/state.
1082
1083 root(expr, max)
1084 Find an input value for which the function represented by expr with
1085 argument ld(0) is 0 in the interval 0..max.
1086
1087 The expression in expr must denote a continuous function or the
1088 result is undefined.
1089
1090 ld(0) is used to represent the function input value, which means
1091 that the given expression will be evaluated multiple times with
1092 various input values that the expression can access through ld(0).
1093 When the expression evaluates to 0 then the corresponding input
1094 value will be returned.
1095
1096 round(expr)
1097 Round the value of expression expr to the nearest integer. For
1098 example, "round(1.5)" is "2.0".
1099
1100 sgn(x)
1101 Compute sign of x.
1102
1103 sin(x)
1104 Compute sine of x.
1105
1106 sinh(x)
1107 Compute hyperbolic sine of x.
1108
1109 sqrt(expr)
1110 Compute the square root of expr. This is equivalent to "(expr)^.5".
1111
1112 squish(x)
1113 Compute expression "1/(1 + exp(4*x))".
1114
1115 st(var, expr)
1116 Store the value of the expression expr in an internal variable. var
1117 specifies the number of the variable where to store the value, and
1118 it is a value ranging from 0 to 9. The function returns the value
1119 stored in the internal variable. Note, Variables are currently not
1120 shared between expressions.
1121
1122 tan(x)
1123 Compute tangent of x.
1124
1125 tanh(x)
1126 Compute hyperbolic tangent of x.
1127
1128 taylor(expr, x)
1129 taylor(expr, x, id)
1130 Evaluate a Taylor series at x, given an expression representing the
1131 ld(id)-th derivative of a function at 0.
1132
1133 When the series does not converge the result is undefined.
1134
1135 ld(id) is used to represent the derivative order in expr, which
1136 means that the given expression will be evaluated multiple times
1137 with various input values that the expression can access through
1138 ld(id). If id is not specified then 0 is assumed.
1139
1140 Note, when you have the derivatives at y instead of 0,
1141 "taylor(expr, x-y)" can be used.
1142
1143 time(0)
1144 Return the current (wallclock) time in seconds.
1145
1146 trunc(expr)
1147 Round the value of expression expr towards zero to the nearest
1148 integer. For example, "trunc(-1.5)" is "-1.0".
1149
1150 while(cond, expr)
1151 Evaluate expression expr while the expression cond is non-zero, and
1152 returns the value of the last expr evaluation, or NAN if cond was
1153 always false.
1154
1155 The following constants are available:
1156
1157 PI area of the unit disc, approximately 3.14
1158
1159 E exp(1) (Euler's number), approximately 2.718
1160
1161 PHI golden ratio (1+sqrt(5))/2, approximately 1.618
1162
1163 Assuming that an expression is considered "true" if it has a non-zero
1164 value, note that:
1165
1166 "*" works like AND
1167
1168 "+" works like OR
1169
1170 For example the construct:
1171
1172 if (A AND B) then C
1173
1174 is equivalent to:
1175
1176 if(A*B, C)
1177
1178 In your C code, you can extend the list of unary and binary functions,
1179 and define recognized constants, so that they are available for your
1180 expressions.
1181
1182 The evaluator also recognizes the International System unit prefixes.
1183 If 'i' is appended after the prefix, binary prefixes are used, which
1184 are based on powers of 1024 instead of powers of 1000. The 'B' postfix
1185 multiplies the value by 8, and can be appended after a unit prefix or
1186 used alone. This allows using for example 'KB', 'MiB', 'G' and 'B' as
1187 number postfix.
1188
1189 The list of available International System prefixes follows, with
1190 indication of the corresponding powers of 10 and of 2.
1191
1192 y 10^-24 / 2^-80
1193
1194 z 10^-21 / 2^-70
1195
1196 a 10^-18 / 2^-60
1197
1198 f 10^-15 / 2^-50
1199
1200 p 10^-12 / 2^-40
1201
1202 n 10^-9 / 2^-30
1203
1204 u 10^-6 / 2^-20
1205
1206 m 10^-3 / 2^-10
1207
1208 c 10^-2
1209
1210 d 10^-1
1211
1212 h 10^2
1213
1214 k 10^3 / 2^10
1215
1216 K 10^3 / 2^10
1217
1218 M 10^6 / 2^20
1219
1220 G 10^9 / 2^30
1221
1222 T 10^12 / 2^40
1223
1224 P 10^15 / 2^50
1225
1226 E 10^18 / 2^60
1227
1228 Z 10^21 / 2^70
1229
1230 Y 10^24 / 2^80
1231
1233 ffmpeg(1), ffplay(1), ffprobe(1), libavutil(3)
1234
1236 The FFmpeg developers.
1237
1238 For details about the authorship, see the Git history of the project
1239 (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command git log in
1240 the FFmpeg source directory, or browsing the online repository at
1241 <https://git.ffmpeg.org/ffmpeg>.
1242
1243 Maintainers for the specific components are listed in the file
1244 MAINTAINERS in the source code tree.
1245
1246
1247
1248 FFMPEG-UTILS(1)