0

I am trying to use the command given in the selected answer here, but it does not work when executed. I know that everything else is working since I can create thumbnails with a different command. What is the proper way to format this? I am assuming that the problem is with " -vsync 0 -vf select='not(mod(n,100))' " but have not been able to get it working.

$cmd = $ffmpeg . " -i " . $src . " -vsync 0 -vf select='not(mod(n,100))' " .  $out . ".jpg";
exec($cmd);
Community
  • 1
  • 1

1 Answers1

0

You have error on this line:

$cmd = $ffmpeg . " -i " . $src . " -vsync 0 -vf select='not(mod(n,100))' " .  $out . ".jpg";

Change it to:

$cmd = "ffmpeg -i " . $src . " -vsync 0 -vf \"select='not(mod(n,100))'\" " .  $out . ".jpg";

Or try:

$cmd = "ffmpeg -i " . $src . " -vsync 0 -vf select='not(mod(n,100))' " .  $out . ".jpg";

Also when you call exec function call it like this:

exec($cmd,$out);
print_r($out);

Print_r will print you output of what was executed in exec()...

Develoger
  • 3,950
  • 2
  • 24
  • 38