Crop out borders of original cover
This commit is contained in:
parent
b53be6e84b
commit
56e0bd9fd1
1 changed files with 7 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue