Skip to content

Instantly share code, notes, and snippets.

@Darksecond
Created June 28, 2017 11:46
Show Gist options
  • Save Darksecond/fb286a037e0ad2f9d68917c885f2d3d9 to your computer and use it in GitHub Desktop.
Save Darksecond/fb286a037e0ad2f9d68917c885f2d3d9 to your computer and use it in GitHub Desktop.
Encode to mp3 using ffmpeg
#!/bin/bash
for cmd in "$@"
do
filename="${cmd%.*}"
echo "Encoding $cmd"
ffmpeg -i "$cmd" -codec:a libmp3lame -b:a 320k -nostats -hide_banner -y -loglevel 0 "$filename.mp3"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment