parameter- und zielordnerhandling verbessert

This commit is contained in:
2023-02-20 19:13:25 +01:00
parent e163a0a50f
commit b5d9c6263c
3 changed files with 49 additions and 27 deletions

View File

@@ -1,7 +1,13 @@
#!/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 '../reencode/$file'";
ffmpeg -i "$file" -c:a copy -map 0:0 "../reencode/$file";
echo "ffmpeg -i '$file' -c:a copy -map 0:0 '$dest/$file'";
ffmpeg -i "$file" -c:a copy -map 0:0 "$dest/$file";
done