# Paperclip Processor Not Working

**URL:** <https://www.ruby-forum.com/t/paperclip-processor-not-working/179010>\
**Category:** Rails\
**Created:** [November 15, 2009, 6:00pm UTC](https://www.ruby-forum.com/t/paperclip-processor-not-working/179010 "2009-11-15T18:00:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sweb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@sweb](https://www.ruby-forum.com/u/sweb)\
**Post date:** [November 15, 2009, 6:00pm UTC](https://www.ruby-forum.com/t/paperclip-processor-not-working/179010/1 "2009-11-15T18:00:46Z")

</div>

I cannot get the paperclip processor pasted below to work. I have many  
more that look almost identical. The ffmpeg command works on the  
command line. One thing unusual is that when it fails it reports that  
file name like, iv,8595,0, instead of the actual file basename. Any  
help would be greatly appreciated

module Paperclip  
class AudioProcessor \< Processor

```
attr_accessor :whiny

def initialize(file, options = {}, attachment = nil)
  super
  @whiny = options[:whiny].nil? ? true : options[:whiny]
  @basename = File.basename(file.path, File.extname(file.path))
end

def make
  dst = Tempfile.new([@basename, 'mp3'].compact.join("."))
  dst.binmode
  cmd = %Q[-i #{File.expand_path(@file.path)}]
  cmd << %Q[-f mp3 -vn -acodec]
  cmd << %Q[copy #{File.expand_path(dst.path)}]

  Rails.logger.info cmd

  begin
    success = Paperclip.run('ffmpeg', cmd)
  rescue Exception => e
    raise PaperclipError, "There was an error processing the

```

thumbnail for #{@basename}" if whiny  
end  
dst  
end  
end  
end

---

<div class="post-metadata">

**Author:** ![sweb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@sweb](https://www.ruby-forum.com/u/sweb)\
**Post date:** [May 21, 2010, 9:33am UTC](https://www.ruby-forum.com/t/paperclip-processor-not-working/179010/2 "2010-05-21T09:33:26Z")

</div>

Did you ever get this working? I’m having the exact same issue.
