Crop out borders of original cover

This commit is contained in:
Neptune 2020-05-03 21:01:25 +02:00
parent b53be6e84b
commit 56e0bd9fd1

View file

@ -5,14 +5,19 @@
# ffmpeg version #
#-------------------------------#
# Path to music directory
MUSIC_DIR="$HOME/Music"
# Path to output cover
COVER="/tmp/cover.png"
# Size of cover
COVER_SIZE=297
# Size in pixel of borders to crop out
CROP_BORDER=20
# Radius or rounded borders
BORDER_RADIUS=10
function ffmpeg_cover {
ffmpeg -loglevel 0 -y -i "$1" -vf "crop=in_h:in_h,scale=-2:$COVER_SIZE" "$COVER"
ffmpeg -loglevel 0 -y -i "$1" -vf "crop=in_h-$CROP_BORDER:in_h-$CROP_BORDER,scale=-2:$COVER_SIZE" "$COVER"
}
function rounded_cover {