Add audio conversion script

This commit is contained in:
Varun Patil 2020-05-06 17:24:25 +05:30
parent fa912b616b
commit 2d2edadfac
1 changed files with 42 additions and 0 deletions

42
extra/convert.sh Executable file
View File

@ -0,0 +1,42 @@
#!/bin/bash
# MID2OGG
for file in Audio/**/*.mid
do
filename="${file%.*}"
echo "MIDI $filename"
timidity $file -o $filename.ogg -Ov
rm $file
ffmpeg -i $filename.ogg -c:a libvorbis -qscale:a 0 CONV/$filename.ogg
rm $filename.ogg
done
# OGG REENCODE
for file in Audio/**/*.ogg
do
filename="${file%.*}"
echo $filename
ffmpeg -i $file -c:a libvorbis -qscale:a 0 CONV/$filename.ogg
rm $file
done
# WAV TO OGG
for file in Audio/**/*.wav
do
filename="${file%.*}"
echo $filename
ffmpeg -i $file -c:a libvorbis -qscale:a 0 CONV/$filename.ogg
rm $file
done