Created
March 18, 2015 18:53
-
-
Save geranyl/4383c456fd7446264c94 to your computer and use it in GitHub Desktop.
FFMPEG fade filter with variables
This file contains 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
time=`ffprobe -i 510e_fingerstyle.mp4 -show_frames 2>&1 | grep -c media_type=video` \ | |
filters=(-filter:v "fade=in:0:50,fade=out:$(($time - 50)):50") \ | |
ffmpeg -i 510e_fingerstyle.mp4 "${filters[@]}" -c:v libx264 -crf 22 -preset veryfast -c:a copy output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment