sync/scripts/reencode_audio.sh

14 lines
288 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -euo pipefail
# ensure existence of destination folder
dest=../reencode
if [[ !(-d $dest) ]]; then
mkdir $dest
fi
for file in ./*.$1; do
echo "ffmpeg -i '$file' -c:a copy -map 0:0 '$dest/$file'";
ffmpeg -i "$file" -c:a copy -map 0:0 "$dest/$file";
done