Posted on

Fixing Cool Video Gallery

Cool Video Gallery Banner

Every time the author of Cool Video Gallery publishes an update it breaks the video tutorials on my site. I’ve sent the patch to the author, posted the patch in the forums, and yet the product remains unchanged. After upgrading today and searching for 30 minutes for the patch files I decided to put a post in my block with the 1-line fix so I can find it again with a lot less searching the next time around. Here is the original support post:

On linux (CentOS) I had to set the Gallery Settings FFMPEG libary path to /usr/bin/ffmpeg

This will cause the ffmpegcommandExists function in the lib/core.php to dump copious amounts of output to the error_log file on the server, slowing down web pages and loading up the disk with a bunch of error lgo fluff.

Running a valid license check and routing output to /dev/null allows the exec command to run without generating output but while still testing if the ffmpeg executable is available at the path specified:

I recommend the plugin developer add the noted options to the ffmpegcommandExists function:

/**
         * Function to check if ffmpeg is installed.
         *
         * @author Praveen Rajan
         */
        function ffmpegcommandExists() {

                $options = get_option('cvg_settings');

            $command = escapeshellarg($options['cvg_ffmpegpath']) . ' -L >/dev/null 2>/dev/null 1>/dev/null';
            exec($command, $output, $return);

                if ($return <= 1) {
                        return true;
                }

                return false;
        }

It appears to keep everything intact while no longer showing the ill side effects of the warnings being dumped to the log file, which is a LOT of extra disk I/O for naught.

/documentation/store-locator-plus/