Skip to content

Instantly share code, notes, and snippets.

@libert-xyz
Created September 7, 2018 03:38
Show Gist options
  • Select an option

  • Save libert-xyz/922b0fbf18e0b0c6ee57c8beffd480a9 to your computer and use it in GitHub Desktop.

Select an option

Save libert-xyz/922b0fbf18e0b0c6ee57c8beffd480a9 to your computer and use it in GitHub Desktop.
audio.bash
#!/bin/bash
#ffmg = ffmpeg -i 2.5-2.mp3 -ac 2 -codec:a libmp3lame -b:a 48k -ar 16000 2.5-2-e.mp3
for i in $(ls *.mp3); do
#echo audio: $i
NAME=`echo "$i" | cut -d'.' -f1`
EXTENSION=`echo "$i" | cut -d'.' -f2`
ffmpeg -i $i -ac 2 -codec:a libmp3lame -b:a 48k -ar 16000 $NAME-e.$EXTENSION
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment