From e10c196a365e27add12654838b865276518e7e93 Mon Sep 17 00:00:00 2001 From: lub Date: Tue, 1 Jun 2021 17:30:47 +0200 Subject: [PATCH] switch from mp3 to opus --- dotfiles/bin/.bin/compress-music | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dotfiles/bin/.bin/compress-music b/dotfiles/bin/.bin/compress-music index 1014d31..53fc5da 100755 --- a/dotfiles/bin/.bin/compress-music +++ b/dotfiles/bin/.bin/compress-music @@ -6,7 +6,7 @@ set -e # source="$HOME/kskcloud/Musik/" -export destination="$HOME/Musik.tiny/" +export destination="$HOME/music.tiny/" 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/{}" \; # set +e because ffmpeg errors on .jpg, .txt, etc. -# compress with mp3 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