oga-converter/oga-converter.sh
Nicolás A. Ortega 10504d2180
I'm going to say OGA.
FFMpeg saw that some of my music files had the album cover in the id3
tag and thought it a good idea to turn it into an OGV (-_-).
2016-04-23 15:01:53 +02:00

42 lines
935 B
Bash
Executable File

#!/bin/bash
# Copyright (c) 2016 Nicolás A. Ortega
# License: GNU GPLv3
while true
do
read -p "Should Oga-Converter confirm each conversion? (y/n)" ANSWER
case $ANSWER in
[yY]* ) CONFIRMATION=true
break;;
[nN]* ) CONFIRMATION=false
break;;
* ) echo "Please enter a valid option."
esac
done
for f in $@
do
OUTFILE=${f:0:-4}
echo "Convert $f to $OUTFILE.oga"
if $CONFIRMATION
then
while true
do
read -p "Do you wish to continue? (y/n) " ANSWER
case $ANSWER in
[yY]* ) ffmpeg -loglevel warning -i $f $OUTFILE.oga
break;;
[nN]* ) echo "Skipped file $f"
break;;
* ) echo "Please enter a valid option."
esac
done
else
ffmpeg -loglevel warning -i $f $OUTFILE.oga
fi
done