Skip to content

Instantly share code, notes, and snippets.

@danmcclain
Created June 21, 2015 19:28
Show Gist options
  • Select an option

  • Save danmcclain/bfbef069e8ee9ed0d058 to your computer and use it in GitHub Desktop.

Select an option

Save danmcclain/bfbef069e8ee9ed0d058 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Encode a WAV to a finalized podcast MP3 with metadata, in the current directory
# Requires lame
# With Homebrew on Mac OS X: brew install lame
SHOW_AUTHOR="Dan McClain & Robert Jackson"
EPISODE_NUMBER=12
EPISODE_TITLE="Ember WeekendLand"
EPISODE_SUMMARY="A special cross over episode with Ember Weekend. Dan McClain, Robert Jackson, Jonathan Jackson and Chase McCarthy recap this year's Wicked Good Ember conference"
INPUT_WAV_FILE="Emberland-12.mp3"
# Artwork: ideally 1400x1400, but less than 128 KB to maximize compatibility
ARTWORK_JPG_FILENAME="${HOME}/Dropbox/EmberLand/Artwork/EmberLand.png"
# Output quality (kbps): 96 or 64 recommended
MP3_KBPS=64
lame --noreplaygain --cbr -h -b $MP3_KBPS --resample 44.1 --tt "$EPISODE_NUMBER: $EPISODE_TITLE" --tc "$EPISODE_SUMMARY" --ta "$SHOW_AUTHOR" --tl "$SHOW_AUTHOR" --ty `date '+%Y'` --ti "$ARTWORK_JPG_FILENAME" --add-id3v2 "$INPUT_WAV_FILE" "${INPUT_WAV_FILE%%.mp3}_final.mp3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment