Steve_BZ has asked for the wisdom of the Perl Monks concerning the following question:

Hi Guys, I'm sure this must be the simplest question out, but I've Googled it with no apparent success. It not in my wonderful Ellie Quigley "Perl by Example" so here I am.

I'm trying to use a Perl module called "command.pm" which calls the video converter "ffmpeg.exe" and it says "file not found: /usr/local/bin/ffmpeg at C:/Perl/site/lib/FFmpeg/Command.pm line 101". I guess it's looking for the .exe file, which is not on the Perl subdirectory. My question is this directory does not appear to exist on windows, so where should I put the .exe file? Here is the code:

my $h = eval { start( [ $self->ffmpeg, '-y', '-i', $self->input_file, @{ $self->options }, $self->output_file ], @opts, ); };


Which doesn't show the path in question. If I scroll down further I find:
1; __END__ =head1 NAME FFmpeg::Command - A wrapper class for ffmpeg command line utility. =head1 DESCRIPTION A simple interface for using ffmpeg command line utility. =head1 SYNOPSIS use FFmpeg::Command; my $ffmpeg = FFmpeg::Command->new('/usr/local/bin/ffmpeg'); $ffmpeg->input_options({ file => $input_file, });


But this comes after __END__ and has things like "=head1 SYNOPSIS".

All ideas welcomed.

Have a good day.

Replies are listed 'Best First'.
Re: How to interpret /usr/local/bin in Windows
by Corion (Patriarch) on Apr 16, 2009 at 12:06 UTC

    Instead of

    my $ffmpeg = FFmpeg::Command->new('/usr/local/bin/ffmpeg');

    use

    my $ffmpeg = FFmpeg::Command->new('ffmpeg.exe');

    or put the path to where you put ffmpeg.exe there:

    my $ffmpeg = FFmpeg::Command->new('C:\\Directory\\Where\\I\\Put\\ffmpe +g.exe');

    You will want to avoid whitespace in the directory names. It might be possible to simply use double quotes though:

    # untested! my $ffmpeg = FFmpeg::Command->new('"C:\\Program Files\\Ffmpeg\\ffmpeg. +exe"');
      Perfect. Why didn't I think of that!

      Thanks very much.

      Steve