Sha256: fc98db21284c6a09b62b72026b0921b16d2fa3425e411fe367e94592401511c6
Contents?: true
Size: 686 Bytes
Versions: 1
Compression:
Stored size: 686 Bytes
Contents
module Tlapse class Video attr_accessor *%i(size framerate codec outfile) def initialize(opts) @size = opts.fetch :size, "1920x1080" @framerate = opts.fetch :framerate, "60" @codec = opts.fetch :codec, "libx264" @outfile = opts.fetch :out, "out.mkv" end def create! command = "ffmpeg" command += " -pattern_type glob" command += " -i '*.jpg'" command += " -s #{@size}" command += " -r #{@framerate}" command += " -vcodec #{@codec}" command += " #{@outfile}" puts command exec command end def outfile_exists? File.exist? @outfile end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tlapse-0.6.3 | lib/tlapse/video.rb |