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