Convert Audio on Linux: Command Line and Browser Options
How to convert audio files on Linux using FFmpeg, SoX, and the browser-based AudioUtils. Practical commands and format guide.
Linux users have more audio conversion options than any other platform — powerful command-line tools and browser-based alternatives. Here is the practical guide to converting audio on Linux.
FFmpeg: The Professional Choice
FFmpeg is the de facto standard for audio and video conversion on Linux. Install it via your package manager: 'sudo apt install ffmpeg' (Debian/Ubuntu) or 'sudo dnf install ffmpeg' (Fedora). Basic conversion syntax: 'ffmpeg -i input.flac output.mp3'. For bitrate control: 'ffmpeg -i input.wav -b:a 192k output.mp3'. For FLAC to MP3 at 320 kbps: 'ffmpeg -i input.flac -b:a 320k output.mp3'. FFmpeg handles every format: WAV, FLAC, OGG, AIFF, WMA, OPUS, and more. It batch-processes with shell loops: 'for f in *.flac; do ffmpeg -i "$f" "${f%.flac}.mp3"; done' converts an entire directory.
SoX: The Sound Processing Option
SoX (Sound eXchange) is a classic Unix audio tool: 'sudo apt install sox libsox-fmt-all'. Conversion: 'sox input.wav output.mp3'. SoX excels at audio processing operations alongside conversion: trimming, normalizing, adding effects, and changing sample rates. For resample during conversion: 'sox input.wav -r 48000 output.wav'.
Browser-Based: AudioUtils on Linux
For users who prefer a GUI or do not want to use the command line, AudioUtils runs in any browser on Linux — Chrome, Firefox, or Chromium. The WebAssembly FFmpeg engine processes audio locally without any server upload. Navigate to audioutils.com, upload your file, select output format and bitrate, and download the result. This is particularly useful for one-off conversions where setting up a command is more effort than the GUI approach.
GUI Tools on Linux
fre:ac (free audio converter): available as an AppImage or snap package. Supports batch conversion with a simple interface. Handles FLAC, MP3, OGG, AAC, and more. Audacity: full audio editor with export to MP3 (via LAME), OGG, WAV, and FLAC. Handbrake: primarily for video, but extracts and converts audio tracks from video containers. DeaDBeeF: music player with a built-in converter plugin.
Recommended Workflow for FLAC Libraries
'for f in ~/Music/*/.flac; do ffmpeg -i "$f" -b:a 320k "${f%.flac}.mp3"; done' — converts all FLAC files in your music library to 320 kbps MP3. Run from your home directory with the globstar option enabled ('shopt -s globstar').