Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- set -e
- extension=$1
- if [ -z "$1" ] ; then
- echo "You must provide the file extension as an argument"
- fi
- files=$(find . -type f -name "*.$extension")
- while read -r line ; do
- ffmpeg -i "$line" -c:a libmp3lame -q:a 0 "${line/%$extension/mp3}" < /dev/null
- done <<< "$files"
- find . -type f -name "*.$extension" -exec rm {} \;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement