Ruby on Rails Friday, October 1, 2010

Im using a customs processor to run ffmpeg on a video to create a
thumbnail.

So far so good. Except when I do:

cmd = "-i #{@file.path} -f flv -s 320x240 ~/Downloads/foobar/q.flv"
success = Paperclip.run('ffmpeg', cmd)

Console is reporting:

ffmpeg '-i /var/folders/uL/uL0bYOOZEZaJH5E+BmDJVE+++TI/-Tmp-/stream,
16824,1.mpeg -f flv -s 320x240 ~/Downloads/foobar/q.flv' 2>/dev/null

I believe the problem is because Paperclip inserts single quotes when
executing ffmpeg.

It works if I manually type in console (ie. without single quotes):

ffmpeg -i /var/folders/uL/uL0bYOOZEZaJH5E+BmDJVE+++TI/-Tmp-/stream,
16824,1.mpeg -f flv -s 320x240 ~/Downloads/foobar/q.flv

How can this be fixed?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment