Created
November 2, 2012 13:30
-
-
Save skyblue/4001377 to your computer and use it in GitHub Desktop.
encode audio files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env bash | |
| set -e | |
| target=$1; shift | |
| for file; do | |
| case $target in | |
| mp3) sox "$file" -S -r 22k -c 1 -L "${file%.*}.mp3" ;; | |
| caf) afconvert -d 'ima4' -f 'caff' "$file" "${file%.*}.caf" ;; | |
| esac | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment