new: files for re-encoding audio (removing covers, optimising for streaming (AAC))
change: made script less error-prone
This commit is contained in:
parent
cddd6ca76f
commit
7a8e1ac41b
11
scripts/reencode_m4a.sh
Executable file
11
scripts/reencode_m4a.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
for file in ./*.m4a; do
|
||||||
|
map='';
|
||||||
|
if [[ $# > 0 && $1 == 'map' ]]; then
|
||||||
|
map='-map 0:0';
|
||||||
|
fi
|
||||||
|
echo "ffmpeg -i '$file' -c:a copy $map -movflags +faststart '../reencode/$file'";
|
||||||
|
ffmpeg -i "$file" -c:a copy $map -movflags +faststart "../reencode/$file";
|
||||||
|
done
|
7
scripts/reencode_mp3.sh
Executable file
7
scripts/reencode_mp3.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
for file in ./*.mp3; 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
|
@ -2,11 +2,11 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
for file in ./*.$1; do
|
for file in ./*.$1; do
|
||||||
map=''
|
map='';
|
||||||
if [[ $# > 1 && "$2" == 'map' ]]; then
|
if [[ $# > 1 && $2 == 'map' ]]; then
|
||||||
map='-map 0:0'
|
map='-map 0:0';
|
||||||
fi
|
fi
|
||||||
echo "ffmpeg -i '$file' -c:a libfdk_aac -profile:a aac_he -b:a 64k -movflags +faststart $map '../m4a/${file%$1}m4a'"
|
echo "ffmpeg -i '$file' -c:a libfdk_aac -profile:a aac_he -b:a 64k -movflags +faststart $map '../m4a/${file%$1}m4a'";
|
||||||
ffmpeg -i "$file" -c:a libfdk_aac -profile:a aac_he -b:a 64k -movflags +faststart $map "../m4a/${file%$1}m4a"
|
ffmpeg -i "$file" -c:a libfdk_aac -profile:a aac_he -b:a 64k -movflags +faststart $map "../m4a/${file%$1}m4a";
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user