Skip to content

Instantly share code, notes, and snippets.

@jasp
Created September 27, 2009 11:44
Show Gist options
  • Save jasp/194738 to your computer and use it in GitHub Desktop.
Save jasp/194738 to your computer and use it in GitHub Desktop.
Using sox (http://sox.sourceforge.net/) to convert to ogg and pad 0.25 seconds. The script takes the files to convert as parameters. It's a bit quick and dirty so it won't accept filenames with spaces, and can't work from ogg source files.
#!/bin/sh
FILES="$@"
for filename in $FILES
do
newname=`echo $filename | sed -e 's/\(.*\)\.[a-zA-Z0-9]*$/\1.ogg/g'`
sox $filename $newname pad 0 0.25
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment