Sha256: 96038889cd97f20577d1cf6b488bad6e8cf38ae05ec8f7883c177fffee8d7785
Contents?: true
Size: 448 Bytes
Versions: 3
Compression:
Stored size: 448 Bytes
Contents
# # FFmpeg Abstraction # require 'command' require 'capturer' module VCSRuby class FFmpeg < Capturer def initialize video @video = video @command = Command.new :ffmpeg, 'ffmpeg' end def name :ffmpeg end def length info = @command.execute("-i #{@video} -dframes 0 -vframes 0 /dev/null", "2>&1") match = /Duration: ([\d|:|.]*)/.match(info) return TimeIndex.new match[1] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vcs_ruby-0.8.2 | lib/ffmpeg.rb |
vcs_ruby-0.8.1 | lib/ffmpeg.rb |
vcs_ruby-0.8.0 | lib/ffmpeg.rb |