Update 'script.sh'

master
nannal 2 years ago
parent 6f8e18ddc8
commit e4531321fe

@ -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
#rm $video-fst-noimg.mp4
Loading…
Cancel
Save