lib/tlapse/video.rb in tlapse-0.6.3 vs lib/tlapse/video.rb in tlapse-0.7.0
- old
+ new
@@ -7,19 +7,24 @@
@framerate = opts.fetch :framerate, "60"
@codec = opts.fetch :codec, "libx264"
@outfile = opts.fetch :out, "out.mkv"
end
- def create!
+ def create_command
command = "ffmpeg"
command += " -pattern_type glob"
command += " -i '*.jpg'"
command += " -s #{@size}"
command += " -r #{@framerate}"
command += " -vcodec #{@codec}"
command += " #{@outfile}"
- puts command
- exec command
+ command
+ end
+
+ def create!
+ cmd = create_command
+ puts cmd
+ exec cmd
end
def outfile_exists?
File.exist? @outfile
end