Created
July 14, 2023 08:50
-
-
Save codezixo/3e5eb0c74486aaaa16a18f827967756f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
W=800 | |
H=354 | |
PERIOD=5 | |
function ff() { | |
ffmpeg -i "$1.jpg" -vf zoompan=z=1:d=8:s=${W}x${H}:fps=2,framerate=30 -c:v mpeg4 -y -pix_fmt yuv420p "slide_${1}.mp4" | |
ffmpeg -i "slide_${1}.mp4" -y -vf fade=in:0:30 "slide_fade_in_${1}.mp4" | |
ffmpeg -i "slide_fade_in_${1}.mp4" -y -vf fade=out:90:30 "slide_fade_in_out_${1}.mp4" | |
#ffmpeg -i "slide_fade_in_${1}.mp4" -y -vf fade=t=out:st=1:d=1 "slide_fade_in_out_${1}.mp4" | |
# | |
cp "slide_fade_in_out_${1}.mp4" "${1}.mp4" | |
rm "slide_${1}.mp4" | |
rm "slide_fade_in_${1}.mp4" | |
rm "slide_fade_in_out_${1}.mp4" | |
echo "file ${1}.mp4" >> concatv.txt | |
} | |
rm *.mp4 | |
rm concatv.txt | |
ff 1 | |
ff 2 | |
ff 3 | |
ff 4 | |
# | |
ffmpeg -f concat -i concatv.txt -c copy output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment