From 0df0fa16ce7b4c8ab37f4046043b8aba5024c444 Mon Sep 17 00:00:00 2001 From: fabian Date: Sat, 23 Jul 2022 16:21:39 +0200 Subject: [PATCH] new: script for transcoding audio files to m4a(AAC) --- scripts/transcode_m4a.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/transcode_m4a.sh diff --git a/scripts/transcode_m4a.sh b/scripts/transcode_m4a.sh new file mode 100755 index 0000000..e8adb59 --- /dev/null +++ b/scripts/transcode_m4a.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -euo pipefail + +for file in ./*.$1; do + 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" +done +