| | 9 | |
| | 10 | == Filter syntax == |
| | 11 | |
| | 12 | When documentation refers to "filter options", or says the "filter accepts the following options", the syntax to use for the options is as described in '''FFmpeg Filters''', section ''4.1 [http://ffmpeg.org/ffmpeg-filters.html#Filtergraph-syntax-1 Filtergraph] syntax''. Briefly, that syntax is to add, after the name of the filter, an `=` character, then the name of the first filter option, an `=` character, and the value of that option. If you want to specify further filter options, you delimit them with `:`, then append the name of the next filter option, an `=` character, and the next value. |
| | 13 | |
| | 14 | For instance, to apply the [http://ffmpeg.org/ffmpeg-filters.html#loudnorm loudnorm filter] to an audio stream, the basic syntax is: |
| | 15 | {{{ |
| | 16 | ffmpeg -i input -filter:a loudnorm output |
| | 17 | }}} |
| | 18 | To add the `print_format` and `linear` filter options, use the syntax: |
| | 19 | |
| | 20 | {{{ |
| | 21 | ffmpeg -i input -filter:a loudnorm=print_format=summary:linear=true output |
| | 22 | }}} |
| | 23 | |
| | 24 | As described in section ''4.1 [http://ffmpeg.org/ffmpeg-filters.html#Filtergraph-syntax-1 Filtergraph] syntax'', you can omit the option names and `=` characters, supplying just the values, delimited by `:` characters. For example, in this invocation: |
| | 25 | {{{ |
| | 26 | ffmpeg -i input -vf scale=iw/2:-1 output |
| | 27 | }}} |
| | 28 | FFmpeg assumes the option names in the order they are declared in the source code. For instance, in this use of the [http://ffmpeg.org/ffmpeg-filters.html#scale scale filter], FFmpeg assumes the option name `width` for the value `iw/2`, and the name `height` for the value `-1`. |