src/GameOfLife/Outputs/Helpers/FfmpegHelper.php
/**
     * Finds and returns the path to the ffmpeg binary file.
     *
     * @return String The path to the ffmpeg binary file
     *
     * @throws \Exception The exception when the ffmpeg binary could not be found
     */
Finds and returns the path to the ffmpeg binary file.
@return String The path to the ffmpeg binary file

@throws \Exception The exception when the ffmpeg binary could not be found
Finds and returns the path to the ffmpeg binary file . @return String The path to the ffmpeg binary file @throws \ Exception The exception when the ffmpeg binary could not be found
private function findFFmpegBinary()
    {
        $binaryPath = false;
        if (stristr($this->osName, "win"))
        { 
            $searchDirectory = __DIR__ . "/../../../../Tools";
            $binaryPath = $this->fileSystemReader->findFileRecursive($searchDirectory, "ffmpeg.exe");
            if (! $binaryPath) throw new \Exception("The ffmpeg.exe file could not be found in \"" . $searchDirectory . "\".");
        }
        elseif (stristr($this->osName, "linux"))
        { 
            $returnValue = $this->shellExecutor->executeCommand("ffmpeg", true);
            if ($returnValue == 1) $binaryPath = "ffmpeg";
        }
        return $binaryPath;
    }
private function findFFmpegBinary ( ) { $ binaryPath = false ; if ( stristr ( $ this -> osName , " win " ) ) { $ searchDirectory = __DIR__ . " /../../../../Tools " ; $ binaryPath = $ this -> fileSystemReader -> findFileRecursive ( $ searchDirectory , " ffmpeg.exe " ) ; if ( ! $ binaryPath ) throw new \ Exception ( " The ffmpeg.exe file could not be found in  \" " . $ searchDirectory . " \" . " ) ; } elseif ( stristr ( $ this -> osName , " linux " ) ) { $ returnValue = $ this -> shellExecutor -> executeCommand ( " ffmpeg " , true ) ; if ( $ returnValue == 1 ) $ binaryPath = " ffmpeg " ; } return $ binaryPath ; }
Finds and returns the path to the ffmpeg binary file.
Finds and returns the path to the ffmpeg binary file .
// If OS is Windows search the Tools directory for the ffmpeg.exe file // If OS is Linux check whether the ffmpeg command returns true