new (stubs of) scripts/ updated scripts

This commit is contained in:
fabian 2023-01-18 22:34:00 +01:00
parent 4ac6ee989c
commit 418ecb2f3f
5 changed files with 35 additions and 0 deletions

0
scripts/backup_edi.sh Normal file
View File

View File

7
scripts/build_ffmpeg.sh Executable file
View File

@ -0,0 +1,7 @@
cd /var/tmp/
git clone https://aur.archlinux.org/ffmpeg-libfdk_aac.git
cd ffmpeg-libfdk_aac/
makepkg -csr
pacman -Ud
cd ..
rm -r ffmpeg-libfdk_aac/

7
scripts/reencode_audio.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
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";
done

21
scripts/reencode_m4a.sh.save Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail
for file in ./*.m4a; do
map='';
if [[ $# > 0 && $1 == 'map' ]]; then
map='-map 0:0';
fi
vbr='';
if [[ $# > 1 && $2 == 'vbr' ]]; then
vbr='libfdk_aac -profile:a aac_he -b:a 64k';
else
map="$map copy"
fi
dest=../reencode
if [[ !(-d $dest) ]]; then
mkdir $dest
fi
echo "ffmpeg -i '$file' -c:a $vbr $map -movflags +faststart '$dest/$file'";
ffmpeg -i "$file" -c:a $vbr $map -movflags +faststart "$dest/$file";
done