chmod 755 ./amrnokia.sh && ./amrnokia.sh
Code itself:
#!/bin/bash
# Audio Bitrate 32 for Nokia
# 64, 80, 128 is ok too
#
for MP3 in *.mp3; do
if [[ -e $MP3 ]]; then
echo "Converting $MP3 into amr Nokia file"
ffmpeg -i "$MP3" -acodec amr_nb -ar 8000 \
-ac 1 -ab 128 "${MP3%.mp3}.amr"
echo -e "\r"
echo "- - - 8< - - - - CUT HERE - - - -"
echo -e "\r"
sleep 1
else
echo "Found no source for $MP3 -- \
leaving it untouched!"
fi
done
echo -e "\rThat's it ... ;-)"
# Audio Bitrate 32 for Nokia
# 64, 80, 128 is ok too
#
for MP3 in *.mp3; do
if [[ -e $MP3 ]]; then
echo "Converting $MP3 into amr Nokia file"
ffmpeg -i "$MP3" -acodec amr_nb -ar 8000 \
-ac 1 -ab 128 "${MP3%.mp3}.amr"
echo -e "\r"
echo "- - - 8< - - - - CUT HERE - - - -"
echo -e "\r"
sleep 1
else
echo "Found no source for $MP3 -- \
leaving it untouched!"
fi
done
echo -e "\rThat's it ... ;-)"
No comments:
Post a Comment