Skip to content
This repository has been archived by the owner on Dec 9, 2017. It is now read-only.

Commit

Permalink
more widely supported time code to pull video image from
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyredding committed Mar 22, 2010
1 parent 4cee13a commit 9f8ec98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pruview/video_image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def self.to_jpg(source, target_dir, name)
raise Pruview::Exceptions::InvalidError, "Invalid target directory: #{target_dir.to_s}" if !File.directory?(target_dir)
raise Pruview::Exceptions::InvalidError, "Video not supported - file extension: " + file_extension(source) if !format_supported?(source)
target = File.join(target_dir, name.to_s + '.jpg')
run(build_command(source, '-ss 00:00:00.17', 'mjpeg', target), "Unable to get preview image for #{target}")
run(build_command(source, '-ss 00:00:01.00', 'mjpeg', target), "Unable to get preview image for #{target}")
# TODO: analyze image - create better
return target
end
Expand Down

0 comments on commit 9f8ec98

Please sign in to comment.