diff --git a/scripts/backup_edi.sh b/scripts/backup_edi.sh new file mode 100644 index 0000000..e69de29 diff --git a/scripts/backup_shepard.sh b/scripts/backup_shepard.sh new file mode 100644 index 0000000..e69de29 diff --git a/scripts/build_ffmpeg.sh b/scripts/build_ffmpeg.sh new file mode 100755 index 0000000..55674d3 --- /dev/null +++ b/scripts/build_ffmpeg.sh @@ -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/ diff --git a/scripts/reencode_audio.sh b/scripts/reencode_audio.sh new file mode 100755 index 0000000..eba3054 --- /dev/null +++ b/scripts/reencode_audio.sh @@ -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 diff --git a/scripts/reencode_m4a.sh.save b/scripts/reencode_m4a.sh.save new file mode 100755 index 0000000..9d74d93 --- /dev/null +++ b/scripts/reencode_m4a.sh.save @@ -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