You have too many sets of quotes in the Perl script. With gritted teeth, I suppose you could do:
#!/usr/bin/perl
`/usr/bin/mplayer -nosound -benchmark -vo yuv4mpeg:file=>(/usr/local/bin/x264 --demuxer y4m --crf 24 --output output.h26 - 2>x264.log) input.mov`;
Oooh; you've got a bash process redirection in there. That complicates matters; you can't simply split the command up like this:
#!/usr/bin/perl
my $x264 = "/usr/local/bin/x264 --demuxer y4m --crf 24 --output output.h26 - 2>x264.log";
exec "/usr/bin/mplayer", "-nosound", "-benchmark", "-vo",
"yuv4mpeg:file=>($x264)",
"input.mov";
This is often the best way to go; it isn't correct for you.
You're probably still better off using:
#!/usr/bin/perl
system "/usr/bin/mplayer -nosound -benchmark -vo yuv4mpeg:file=>(/usr/local/bin/x264 --demuxer y4m --crf 24 --output output.h26 - 2>x264.log) input.mov";
since you really aren't interested in the output of the command. OTOH, there really isn't a reason to be using Perl like this. It would be better to write:
#!/usr/bin/bash
/usr/bin/mplayer -nosound -benchmark -vo yuv4mpeg:file=>(/usr/local/bin/x264 --demuxer y4m --crf 24 --output output.h26 - 2>x264.log) input.mov
optionally with an exec before the command:
#!/usr/bin/bash
exec /usr/bin/mplayer -nosound -benchmark -vo yuv4mpeg:file=>(/usr/local/bin/x264 --demuxer y4m --crf 24 --output output.h26 - 2>x264.log) input.mov
With information about the why's and wherefore's of the request trickling out, we observe:
sh: 1: command : not found error output in perl script
The mention of sh indicates part of the problem. When bash is run as sh, it does not support process substitution. Given that this is one fragment of a bigger Perl script, we'll continue to work towards running the command from Perl.
#!/usr/bin/perl
use strict;
use warnings;
my $x264 = "/usr/local/bin/x264 --demuxer y4m --crf 24 --output output.h26 - 2>x264.log";
system "bash", "-c",
"/usr/bin/mplayer -nosound -benchmark -vo yuv4mpeg:file=>($x264) input.mov";