How to Compress an Audio File using FFmpeg

28 October 2022 | 1 min read
Casper Kloppenburg

Prerequisites

FFmpeg is a free and open-source video editing tool capable of trimming, cropping, concatenating, muxing, and transcoding almost any type of media file you throw at it.

It's also a very robust solution for implementing video automation, as we use it extensively in our own video editing API. For this tutorial we'll use FFmpeg 5.1.2, but any recent version will do.

Compressing an audio file

An audio file can be encoded at a lower bit rate in order to reduce its file size:

$ ffmpeg -i input.mp3 -b:a 128k output.mp3 Specify a bitrate using the -b:a argument, such as:

  • 96k
  • 112k
  • 128k
  • 160k
  • 192k
  • 256k
  • 320k

Start automating today

Start with a full-featured trial with 50 credits, no credit card required.
Get started for free