Skip to content

Instantly share code, notes, and snippets.

@olragon
Created March 13, 2021 06:12
Show Gist options
  • Save olragon/9cffcf1ed6eee95301744c5cefe47625 to your computer and use it in GitHub Desktop.
Save olragon/9cffcf1ed6eee95301744c5cefe47625 to your computer and use it in GitHub Desktop.
webm to mp3 with ffmpeg
#!/usr/bin/env bash
if [ "$#" -ne 2 ]; then
echo "webm-to-mp3 [input.webm] [output.mp3]"
exit
fi
ffmpeg -i "$1" -vn -ab 128k -ar 44100 -y "$2";
# Requirements: ffmpeg
# Save to: /usr/local/bin/webm-to-mp3
# Add exec perm: chmod +x /usr/local/bin/webm-to-mp3
# Usage: /usr/local/bin/webm-to-mp3 input.webm output.mp3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment