/** * Detect if FFmpeg is available on the system. * * @return void */ function autoDetect() { static $output, $status; //get the absolute location first: $path = zmgVideoTool::detectPath(); //execute test command @exec($path . 'ffmpeg', $output, $status); $res = false; if (!empty($output[0])) { if (preg_match("/(ffmpeg).*/i", $output[0], $matches)) { zmgToolboxPlugin::registerError('FFmpeg', 'FFmpeg ' . T_('is available.')); $res = true; } } if (!$res) { zmgToolboxPlugin::registerError('FFmpeg', T_('could not be detected on your system.')); } unset($output, $status); }