wiki/structured/cli.ffmpeg.org
Gabriel Arazas f45135c418 Create the hierarchical notes
The notes are mainly extracted from the daily fleeting notes which
clutter some of the more important thoughts. I figured it would be
better to create Dendron-inspired hierarchical notes.

Also, some of the notes are updated. I also started to create my visual
aids for whatever reason. ;p
2021-05-10 08:49:29 +08:00

1.2 KiB

FFmpeg

The swiss army knife for interacting with multimedia files (except images because ImageMagick).

Options

The FFmpeg command line interface is mostly picky because of order. Whatever options are given will be processed with those options in order.

  • -hide_banner - hide the annoying banner
  • -loglevel [level] | -v [level] - set the verbosity level
  • -codecs - list all codecs
  • -devices - list all devices
  • -i [file] - the input file
  • c [codec] - set the codec
  • -b [rate] - set the bitrate
  • -o [file] - set the output

Certain options have the option of specifying whether you're interacting with the audio or video track. For example, -codec:audio (-c:a) to set the audio codec.

Examples

FFmpeg is comprehensive and so needs some specific examples to fill my monkey brain.

Convert an MP3 to OGG

ffmpeg -i $INPUT.mp3 -o $OUTPUT.ogg

By default, FFmpeg will guess if certain things are missing. In this case, it guessed you want to convert the

Transrate an audio file

ffmpeg -i $INPUT -c $CODE -b:a $BITRATE $OUTPUT