[phusion-passenger] Video upload with ffmpeg

35 views
Skip to first unread message

kip

unread,
Apr 27, 2010, 3:25:06 PM4/27/10
to Phusion Passenger Discussions
I am attempting to add video upload functionality to my project. It
looks like there is a small issue with ffmpeg. Here is the
transcoding method I am using:

def transcode
begin
RVideo::Transcoder.logger = logger
file = RVideo::Inspector.new(:file => self.asset.path)
command = "ffmpeg -i $input_file$ -y -s $resolution$ -ar 44100 -
b 64k -r 15 -sameq $output_file$"
options = {
:input_file => "#{RAILS_ROOT}/#{self.asset.path}",
:output_file => "#{RAILS_ROOT}/#{self.flash_path}",
:resolution => "320x200"
}
.
.
.

In the production log it shows this:
ffmpeg could not be found (expected ffmpeg to be found in the Unix
path)

I ran "which ffmpeg" and it returned /usr/local/bin/ffmpeg

--
You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
To post to this group, send email to phusion-...@googlegroups.com.
To unsubscribe from this group, send email to phusion-passen...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/phusion-passenger?hl=en.

Hongli Lai

unread,
Apr 28, 2010, 6:23:00 AM4/28/10
to phusion-...@googlegroups.com
On Tue, Apr 27, 2010 at 9:25 PM, kip <airs...@gmail.com> wrote:
> I am attempting to add video upload functionality to my project.  It
> looks like there is a small issue with ffmpeg.  Here is the
> transcoding method I am using:
>
>  def transcode
>    begin
>      RVideo::Transcoder.logger = logger
>      file = RVideo::Inspector.new(:file => self.asset.path)
>      command = "ffmpeg -i $input_file$ -y -s $resolution$ -ar 44100 -
> b 64k -r 15 -sameq $output_file$"
>      options = {
>        :input_file => "#{RAILS_ROOT}/#{self.asset.path}",
>        :output_file => "#{RAILS_ROOT}/#{self.flash_path}",
>        :resolution => "320x200"
>      }
> .
> .
> .
>
> In the production log it shows this:
> ffmpeg could not be found (expected ffmpeg to be found in the Unix
> path)
>
> I ran "which ffmpeg" and it returned /usr/local/bin/ffmpeg

http://blog.phusion.nl/2008/12/16/passing-environment-variables-to-ruby-from-phusion-passenger/

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)
Reply all
Reply to author
Forward
0 new messages