14 lines
288 B
Bash
Executable File
14 lines
288 B
Bash
Executable File
#!/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
|