new: files for re-encoding audio (removing covers, optimising for streaming (AAC))

change: made script less error-prone
This commit is contained in:
2022-08-18 22:22:48 +02:00
parent cddd6ca76f
commit 7a8e1ac41b
3 changed files with 23 additions and 5 deletions
+5 -5
View File
@@ -2,11 +2,11 @@
set -euo pipefail
for file in ./*.$1; do
map=''
if [[ $# > 1 && "$2" == 'map' ]]; then
map='-map 0:0'
map='';
if [[ $# > 1 && $2 == 'map' ]]; then
map='-map 0:0';
fi
echo "ffmpeg -i '$file' -c:a libfdk_aac -profile:a aac_he -b:a 64k -movflags +faststart $map '../m4a/${file%$1}m4a'"
ffmpeg -i "$file" -c:a libfdk_aac -profile:a aac_he -b:a 64k -movflags +faststart $map "../m4a/${file%$1}m4a"
echo "ffmpeg -i '$file' -c:a libfdk_aac -profile:a aac_he -b:a 64k -movflags +faststart $map '../m4a/${file%$1}m4a'";
ffmpeg -i "$file" -c:a libfdk_aac -profile:a aac_he -b:a 64k -movflags +faststart $map "../m4a/${file%$1}m4a";
done