Created
October 21, 2015 13:21
-
-
Save infovore/313800425222073f0e91 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
#!/usr/bin/env ruby | |
unless ARGV[0] && ARGV[1] | |
puts "Usage: fadeinout INPUT OUTPUT [DURATION]" | |
exit | |
end | |
if ARGV[2] | |
duration = ARGV[2].to_f | |
else | |
duration = 3 | |
end | |
`ffmpeg -i #{ARGV[0]} -vf "fade=t=in:st=0:d=#{duration},fade=t=out:st=101:d=3" -af "afade=t=in:st=0:d=#{duration},afade=t=out:st=101:d=3" #{ARGV[1]}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment