sync/scripts/reencode_m4a.sh
2022-08-18 22:22:48 +02:00

12 lines
310 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
for file in ./*.m4a; do
map='';
if [[ $# > 0 && $1 == 'map' ]]; then
map='-map 0:0';
fi
echo "ffmpeg -i '$file' -c:a copy $map -movflags +faststart '../reencode/$file'";
ffmpeg -i "$file" -c:a copy $map -movflags +faststart "../reencode/$file";
done