Skip to content

Instantly share code, notes, and snippets.

@parixitjani
Last active August 10, 2017 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parixitjani/f1919daab9315a036b31e0b56a85c090 to your computer and use it in GitHub Desktop.
Save parixitjani/f1919daab9315a036b31e0b56a85c090 to your computer and use it in GitHub Desktop.
for mfile in $ifiles
do
outfile=${mfile%.*}
ext=${mfile##*.}
if [ $ext != 'mp3' ]
then
_ffmpegcmd1="ffmpeg -nostats -loglevel panic -y -i $mfile -codec:a libmp3lame -qscale:a 3 "$outfile".mp3"
$_ffmpegcmd1
fi
afile="$afile""$outfile"".mp3""$seperator"
done
ffmpeg -nostats -loglevel panic -y -i concat:$afile -acodec copy $ofile"_m.mp3"
ffmpeg -nostats -loglevel panic -y -i $ofile"_m.mp3" -vn -ar 44100 -ac 2 -ab 128k -f mp3 $ofile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment