improve scripts

This commit is contained in:
2024-11-02 15:38:09 -04:00
parent ec66d63089
commit a30bef3b29
5 changed files with 26 additions and 17 deletions

View File

@ -9,7 +9,7 @@ fi
count=`ls -1 *.ogg 2>/dev/null | wc -l`
if [ $count != 0 ]; then
for i in *.ogg; do
ffmpeg -y -i "$i" "${i%.*}.m4a" -map_metadata 0:s:a:0 && rm "$i"
ffmpeg -y -i "$i" "${i%.*}.mp3" && rm "$i"
done
fi
@ -21,7 +21,7 @@ fi
count=`ls -1 *.webm 2>/dev/null | wc -l`
if [ $count != 0 ]; then
for i in *.webm; do
ffmpeg -y -i "$i" "${i%.*}.m4a" -map_metadata 0:s:a:0 && rm "$i"
ffmpeg -y -i "$i" "${i%.*}.mp3" && rm "$i"
done
fi
@ -33,9 +33,21 @@ fi
count=`ls -1 *.opus 2>/dev/null | wc -l`
if [ $count != 0 ]; then
for i in *.opus; do
ffmpeg -y -i "$i" "${i%.*}.m4a" -map_metadata 0:s:a:0 && rm "$i"
ffmpeg -y -i "$i" "${i%.*}.mp3" && rm "$i"
done
fi
count=`ls -1 *.M4A 2>/dev/null | wc -l`
if [ $count != 0 ]; then
rename M4A m4a *.M4A
fi
count=`ls -1 *.m4a 2>/dev/null | wc -l`
if [ $count != 0 ]; then
for i in *.m4a; do
ffmpeg -y -i "$i" "${i%.*}.mp3" && rm "$i"
done
fi
shopt -s nullglob
rsgain custom -a -s i -L -S *.m4a *.mp3 *.ogg *.opus
rsgain custom -S -L -a -s i *.mp3 *.flac