Skip to content

Instantly share code, notes, and snippets.

@magnetikonline
Last active June 21, 2023 00:24
Show Gist options
  • Save magnetikonline/5f7c99b83560f8735a4f1bed05c62ec6 to your computer and use it in GitHub Desktop.
Save magnetikonline/5f7c99b83560f8735a4f1bed05c62ec6 to your computer and use it in GitHub Desktop.
FLAC -> MP3 VBR with ffmpeg

FLAC -> MP3 VBR with ffmpeg

Convert source FLAC files in a directory to MP3 VBR (around 220-260 kbps).

#!/bin/bash -e

FLAC_SRC_DIR="/path/to/flac/files"


for flacFile in $FLAC_SRC_DIR/*.flac; do
	ffmpeg \
		-i "$flacFile" \
		-qscale:a 0 \
		"${flacFile/%flac/mp3}"
done

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment