diff --git a/lib/paperclip/paperclip_processors/transcoder.rb b/lib/paperclip/paperclip_processors/transcoder.rb index d67efea..802467b 100755 --- a/lib/paperclip/paperclip_processors/transcoder.rb +++ b/lib/paperclip/paperclip_processors/transcoder.rb @@ -1,6 +1,6 @@ module Paperclip class Transcoder < Processor - attr_accessor :geometry, :format, :whiny, :convert_options + attr_accessor :geometry, :format, :whiny, :convert_options, :runner_options # Creates a Video object set to work on the +file+ given. It # will attempt to transcode the video into one defined by +target_geometry+ # which is a "WxH"-style string. +format+ should be specified. @@ -14,6 +14,7 @@ def initialize file, options = {}, attachment = nil @cli = ::Av.cli @meta = ::Av.cli.identify(@file.path) @whiny = options[:whiny].nil? ? true : options[:whiny] + @runner_options = options[:runner_options] @convert_options = set_convert_options(options) @@ -73,9 +74,9 @@ def make end begin - @cli.run + @cli.run(@runner_options) log "Successfully transcoded #{@basename} to #{dst}" - rescue Cocaine::ExitStatusError => e + rescue Terrapin::ExitStatusError => e raise Paperclip::Error, "error while transcoding #{@basename}: #{e}" if @whiny end else diff --git a/paperclip-av-transcoder.gemspec b/paperclip-av-transcoder.gemspec index c62aa5c..0c940f8 100644 --- a/paperclip-av-transcoder.gemspec +++ b/paperclip-av-transcoder.gemspec @@ -25,6 +25,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency "sqlite3" spec.add_development_dependency "coveralls" - spec.add_dependency "paperclip", ">=2.5.2" + spec.add_dependency "kt-paperclip", ">=2.5.2" spec.add_dependency "av", "~> 0.9.0" end