switch from mp3 to opus

master
lub 4 years ago
parent dccd2ad1a4
commit e10c196a36

@ -6,7 +6,7 @@ set -e
# #
source="$HOME/kskcloud/Musik/" source="$HOME/kskcloud/Musik/"
export destination="$HOME/Musik.tiny/" export destination="$HOME/music.tiny/"
cd "$source" cd "$source"
@ -17,7 +17,7 @@ find . -type d -exec mkdir -p "$destination/{}" \;
find . -type f -and \( -name '*.mp3' -or -name '*.ogg' -or -name '*.opus' \) -exec cp -a --reflink=always "{}" "$destination/{}" \; find . -type f -and \( -name '*.mp3' -or -name '*.ogg' -or -name '*.opus' \) -exec cp -a --reflink=always "{}" "$destination/{}" \;
# set +e because ffmpeg errors on .jpg, .txt, etc. # set +e because ffmpeg errors on .jpg, .txt, etc.
# compress with mp3
set +e set +e
find . -type f -not -name '*.mp3' -not -name '*.ogg' -not -name '*.opus' | parallel --jobs 9 --eta --progress 'nice -n19 ffmpeg -v 0 -n -i ""{}"" -c:a mp3 -b:a 320 -map_metadata 0 ""$destination/{.}.mp3""' # compress with opus
find . -type f -not -name '*.mp3' -not -name '*.ogg' -not -name '*.opus' | parallel --jobs $(($(nproc) - 1)) --eta --progress 'nice -n19 opusenc --bitrate 128 --music ""{}"" ""$destination/{.}.opus""'
#set -e #set -e

Loading…
Cancel
Save