Archive for Tag "ffmpeg"

Convert MP3 to AMR,WAV and AAC

// this script will convert MP3 format to AMR,WAV and AAC

#!/bin/sh

#strip file extension
name=`echo "$1"|cut -d'.' -f1`

#encode to AAC format
ffmpeg -i $1 -ar 22050 -ac 1 -ab 96k  $name.aac

#encode to AMR format
ffmpeg -i $1 -ar 8000 -ac 1 -ab 12.2k  $name.amr

#the last thing is WAV format
ffmpeg -i $1 -ar 8000 -ac 1  $name.wav