Skip to content

Instantly share code, notes, and snippets.

@jabrena
Last active December 24, 2017 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jabrena/e61c433add6185ce11df130ace6a0f21 to your computer and use it in GitHub Desktop.
Save jabrena/e61c433add6185ce11df130ace6a0f21 to your computer and use it in GitHub Desktop.
Convert mp3 from any bitrate to 320; Verify bitrate conversion
#1. Create folder
mkdir 320
#2. Convert any .mp3 to 320 bit rate
for f in *.mp3
do
echo "Processing $f"
ffmpeg -i "$f" -c:a libmp3lame -b:a 320k "./320/$f"
done
#3. Verify conversion
for f in ./320/*.mp3
do
echo "Check $f"
ffprobe -show_streams -select_streams a:0 -v quiet "$f" | grep -F 'bit_rate=320000'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment