2024-04-25 10:58:58 -04:00
|
|
|
#!/usr/bin/env sh
|
2024-09-03 20:34:45 -04:00
|
|
|
set -ou pipefail
|
2024-04-25 10:58:58 -04:00
|
|
|
|
2024-05-23 11:30:18 -04:00
|
|
|
count=`ls -1 *.OGG 2>/dev/null | wc -l`
|
2024-04-25 10:58:58 -04:00
|
|
|
if [ $count != 0 ]; then
|
2024-05-23 11:30:18 -04:00
|
|
|
rename OGG ogg *.OGG
|
2024-04-25 10:58:58 -04:00
|
|
|
fi
|
|
|
|
|
2024-05-23 11:30:18 -04:00
|
|
|
count=`ls -1 *.ogg 2>/dev/null | wc -l`
|
2024-04-25 10:58:58 -04:00
|
|
|
if [ $count != 0 ]; then
|
2024-05-23 11:30:18 -04:00
|
|
|
for i in *.ogg; do
|
|
|
|
ffmpeg -y -i "$i" "${i%.*}.m4a" -map_metadata 0:s:a:0 && rm "$i"
|
2024-04-25 10:58:58 -04:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
count=`ls -1 *.WEBM 2>/dev/null | wc -l`
|
|
|
|
if [ $count != 0 ]; then
|
|
|
|
rename WEBM webm *.WEBM
|
|
|
|
fi
|
|
|
|
|
|
|
|
count=`ls -1 *.webm 2>/dev/null | wc -l`
|
|
|
|
if [ $count != 0 ]; then
|
|
|
|
for i in *.webm; do
|
2024-05-23 11:30:18 -04:00
|
|
|
ffmpeg -y -i "$i" "${i%.*}.m4a" -map_metadata 0:s:a:0 && rm "$i"
|
2024-04-25 10:58:58 -04:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
count=`ls -1 *.OPUS 2>/dev/null | wc -l`
|
|
|
|
if [ $count != 0 ]; then
|
|
|
|
rename OPUS opus *.OPUS
|
|
|
|
fi
|
|
|
|
|
|
|
|
count=`ls -1 *.opus 2>/dev/null | wc -l`
|
|
|
|
if [ $count != 0 ]; then
|
|
|
|
for i in *.opus; do
|
2024-05-23 11:30:18 -04:00
|
|
|
ffmpeg -y -i "$i" "${i%.*}.m4a" -map_metadata 0:s:a:0 && rm "$i"
|
2024-04-25 10:58:58 -04:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2024-09-03 20:34:45 -04:00
|
|
|
shopt -s nullglob
|
|
|
|
rsgain custom -a -s i -L -S *.m4a *.mp3 *.ogg *.opus
|