lib/edl/grabber.rb in edl-0.0.1 vs lib/edl/grabber.rb in edl-0.0.2

- old
+ new

@@ -1,10 +1,10 @@ module EDL # When initialized with a file and passed an EDL, will generate thumbnail images # of the first frame of every event. It is assumed that the movie file starts at the same # frame as the first EDL event. - class Grabber + class Grabber #:nodoc: attr_accessor :ffmpeg_bin, :offset def initialize(with_file) @source_path = with_file end @@ -20,11 +20,10 @@ generate_grab(evt.num, grab_frame_tc, to_file) end end def generate_grab(evt, at, to_file) -# cmd = "#{ffmpeg_bin} -i #{@source_path} -an -ss #{at} -vframes 1 -r #{at.fps} -y #{to_file}%d.jpg" - cmd = "#{ffmpeg_bin} -i #{@source_path} -an -ss #{at} -vframes 1 -y #{to_file}%d.jpg" + cmd = "#{ffmpeg_bin} -i #{@source_path} -an -ss #{at.with_frames_as_fraction} -vframes 1 -y #{to_file}%d.jpg" `#{cmd}` end end end \ No newline at end of file