#!/bin/bash
clear
# Example: ./mp4ToMp3.sh ~/Downloads
for entry in "$1"/*.mp4
do
ext="${entry##*.}"
filename="${entry:0:${#entry} - ${#ext}}"
mp3file="${filename}mp3"
echo "$entry ===> $mp3file"
ffmpeg -i "$entry" -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 "$mp3file"
done