mkxp/extra/convert_audio.sh

43 lines
590 B
Bash
Raw Normal View History

2020-05-06 11:54:25 +00:00
#!/bin/bash
# MID2OGG
for file in Audio/**/*.mid
do
filename="${file%.*}"
echo "MIDI $filename"
2020-05-07 14:39:56 +00:00
timidity "$file" -o "$filename.ogg" -Ov
rm "$file"
2020-05-06 11:54:25 +00:00
2020-05-07 14:39:56 +00:00
ffmpeg -i "$filename.ogg" -c:a libvorbis -qscale:a 0 "CONV/$filename.ogg"
rm "$filename.ogg"
2020-05-06 11:54:25 +00:00
done
# OGG REENCODE
for file in Audio/**/*.ogg
do
filename="${file%.*}"
2020-05-07 14:39:56 +00:00
echo "$filename"
2020-05-06 11:54:25 +00:00
2020-05-07 14:39:56 +00:00
ffmpeg -i "$file" -c:a libvorbis -qscale:a 0 "CONV/$filename.ogg"
rm "$file"
2020-05-06 11:54:25 +00:00
done
# WAV TO OGG
for file in Audio/**/*.wav
do
filename="${file%.*}"
2020-05-07 14:39:56 +00:00
echo "$filename"
2020-05-06 11:54:25 +00:00
2020-05-07 14:39:56 +00:00
ffmpeg -i "$file" -c:a libvorbis -qscale:a 0 "CONV/$filename.ogg"
rm "$file"
2020-05-06 11:54:25 +00:00
done