diff options
Diffstat (limited to '.local/bin/slider')
-rwxr-xr-x | .local/bin/slider | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/.local/bin/slider b/.local/bin/slider index 3460c77..b412e95 100755 --- a/.local/bin/slider +++ b/.local/bin/slider @@ -67,7 +67,6 @@ if [ -n "${audio+x}" ]; then *) echo "That doesn't look like an audio file."; exit 1 ;; esac totseconds="$(date '+%s' -d $(ffmpeg -i "$audio" 2>&1 | awk '/Duration/ {print $2}' | sed s/,//))" - endtime="$((totseconds-seconds))" fi prepdir="${prepdir:-$cache/$file}" @@ -95,10 +94,10 @@ do # If images have already been made in a previous run, do not recreate # them unless -r was given. { [ ! -f "$prepdir/$base" ] || [ -n "${redo+x}" ] ;} && - convert -size "${res:-1920x1080}" canvas:"${bgc:-black}" -gravity center "$content" -resize 1920x1080 -composite "$prepdir/$base" + magick -size "${res:-1920x1080}" canvas:"${bgc:-black}" -gravity center "$content" -resize 1920x1080 -composite "$prepdir/$base" else { [ ! -f "$prepdir/$base" ] || [ -n "${redo+x}" ] ;} && - convert -size "${res:-1920x1080}" -background "${bgc:-black}" -fill "${fgc:-white}" -font "${font:-Sans}" -pointsize "${ppt:-150}" -gravity center label:"$content" "$prepdir/$base" + magick -size "${res:-1920x1080}" -background "${bgc:-black}" -fill "${fgc:-white}" -font "${font:-Sans}" -pointsize "${ppt:-150}" -gravity center label:"$content" "$prepdir/$base" fi # If the first line, do not write yet. @@ -111,6 +110,7 @@ duration $duration" prevseconds="$(date '+%s' -d "$prevtime")" done < "$file" # Do last file which must be given twice as follows +endtime="$((totseconds-seconds))" echo "file '$base' duration ${endtime:-5} file '$base'" |