diff --git a/script.sh b/script.sh index 2769e7a..8e58537 100755 --- a/script.sh +++ b/script.sh @@ -1,4 +1,4 @@ -#!/bin/zsh +#!/usr/bin/zsh video=$1 music=$2 image=$3 @@ -11,10 +11,10 @@ musicLength=$(ffprobe -v error -show_entries format=duration -of default=noprint length=$(($(($musicLength-$stopDur)) / $videoLength)) -ffmpeg -i $video -i $music -map 0:v -map 1:a -filter:v "setpts=$length*PTS,tpad=stop_mode=clone:stop_duration=$stopDur" -af "afade=t=out:st=28:d=3" -y $video-fst-noimg.mp4 +ffmpeg -i $video -i $music -map 0:v -map 1:a -filter:v "setpts=$length*PTS,tpad=stop_mode=clone:stop_duration=$stopDur" -af "afade=t=out:st=28:d=3" -vsync 1 -y $video-fst-noimg.mp4 ffmpeg -i $video-fst-noimg.mp4 -i $image -filter_complex "overlay=x=(main_w-overlay_w)-125:y=(main_h-overlay_h)-10" -y $video-fst-img.mp4 ffmpeg -i $video-fst-img.mp4 -ss 00:00:$musicLength -s 682x415 -frames:v 1 $video-thumb.jpeg -rm $video-fst-noimg.mp4 \ No newline at end of file +#rm $video-fst-noimg.mp4 \ No newline at end of file