General FFmpeg commands do have the following syntaxes:1

  [input_options] -i input_file {[input_options] -i input_file}
  [output_options] output_file {[output_options] output_file}

  [input_options] input_file

  [input_options] input_file

In this Cookbook monospaced bolt font is used for the parts of the command that can be copied and pasted directly into the Terminal, without any need of adaptation, and monospaced italic font for parts that must be modified in order to match the actual needs.

In this Cookbook a single command is splitten into more lines for readability. However, you must write them in one line into the Terminal or use the backward slash \ in order to escape the newline.


Those syntaxes by the author are not exactly the ones used by FFmpeg’s maintainers. As defined in EBNF, [ ] contains an optional part and { } an optional part that may be repeated.
The Extended Backus–Naur Form (EBNF) has been standardised as ISO/IEC 14977:1996. This document is shamefully behind a paywall and its 12 pages cost the incredibly excessive amount of CHF 58, but it is also available for free.