i'm trying to get the ouput from a bash command. If I execute the some command directly in the bash, i see the result. But not with PHP exec() function..
$command = "ffmpeg -i '$video_path' 2>&1 | grep Video | perl -wle 'while(<>){ $_ =~ /.*?(\d+x\d+).*/; print $1; }'";
$res = exec($command/*, $output*/);
print_r($res);
// print_r($output);
This command try to get a video resolution using ffmpeg lib. The video path it's fine, I triple check that.
Thanks!
EDIT: screenshot from the output in bash

passthru()function."