public
Created

  • Download Gist
colorcrashing0.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
require 'ubygems'
require 'finalcut' # http://gist.github.com/397955
 
files = ARGV
 
tick = 0.2
margin = 0.2
out = 'out.mp4'
FinalCut.open(*files) do |fc|
durations = files.map {|f| fc.get_duration f }
durations.inject(0) do |s, d|
d = d - margin
fc.cut(
:from => 0,
:duration => margin,
:size => '1920x1080',
) if s == 0
fc.cut(
:from => s + margin,
:duration => d,
:framerate => 30,
:size => '1920x1080',
:datamosh => true
)
fc.cut(
:from => s + d - tick,
:duration => tick,
:framerate => 60,
:repeat => 100,
:speed => 10,
:size => '1920x1080',
:datamosh => true,
)
s + d
end
fc.output out
end
 
FinalCut.open(out) do |fc|
fc.cut(:duration => :whole, :size => '640x360')
fc.output(out)
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.