@sujitharavind
Set your FFMPEG path through CVG Admin pages and not by altering the plugin code.
@praveen
I didn’t do any thing in the source code. I just changed the path through admin only. But its not detecting our development server ffmpeg path. Still its showing “Not installed”..Our path is “/usr/bin/ffmpeg”..Can you please help me how can i set the path in proper way…Now i set as in the following way..
First go to Gallery Settings and there i set my path as
/usr/bin/ffmpeg.
@sujitharavind
Is exec enabled in your sever for PHP?
@praveen
Yes..”exec” was enabled in our development server..
Thanks,
Sujith
@praveen
One more thing..How can i view uploaded videos in the site front end???
@sujitharavind
Could you please try this out. I haven’t tried it since my development server is not Linux. Do let me know the status
From /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2 copy libgcc_s.so into /opt/lampp/lib and rename it to libgcc_s.so.1 to overwrite the previous file.
Hi,
Try to add “extension=ffmpeg.so” in your php.ini
Ok, the real problem with the “check” for ffmpeg is in the manner in which the function “ffmpegcommandExists()” is coded in lib/core.php.
In that code, you are relying on the fact that the ffmpeg command prints a usage statement to standard output. The fragment that checks that is:
——————————–
exec($command, $output, $return);
if(is_array($output) && !empty($output)) {
return true;
}
return false;
——————————–
However, on Linux (haven’t checked other binary compilations on other Unix style OS’s) the “usage statement” is not written to STDOUT but instead to STDERR which the above code does not capture.
In my case (which did involve modification of the code in lib/core.php was to instead check the value of $return. exec() cannot capture STDERR easily without some tricks like 2>&1 being added to the command which might break other regular exec calls when the command is actually converting video.
$return has 3 potential values:
0 – Command executed successfully
1 – Command executed but ran with an error
127 – Command does not exist
I simply augmented the code by commenting out the $output check and adding a $return check as follows:
—————————————–
function ffmpegcommandExists() {
$options = get_option('cvg_settings');
$command = escapeshellarg($options['cvg_ffmpegpath']);
exec($command, $output, $return);
/**
if(is_array($output) && !empty($output)) {
return true;
}
*/
if ($return <= 1) {
return true;
}
return false;
}
———————————————
Hopefully the plugin developer can pick this up and augment the ffmpegcommandExists() function to use this technique on non-windows systems and his current technique on windows systems which would work fine.
Worked for me!
Well, Kieth’s code fixed the FFMPEG problem, but I’m having issues with youtube.php getting errors opening the stream:
Warning: simplexml_load_file(http://gdata.youtube.com/feeds/api/videos/http://www.youtube.com/watch?v=4n-8a3wfRDU&feature=youtu.be) [function.simplexml-load-file]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in /var/www/vhosts/fxg.fxgroupdns.com/httpdocs/wp-content/plugins/cool-video-gallery/lib/youtube.php on line 110
Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity “http://gdata.youtube.com/feeds/api/videos/http://www.youtube.com/watch?v=4n-8a3wfRDU&feature=youtu.be” in /var/www/vhosts/fxg.fxgroupdns.com/httpdocs/wp-content/plugins/cool-video-gallery/lib/youtube.php on line 110
Fatal error: Call to a member function children() on a non-object in /var/www/vhosts/fxg.fxgroupdns.com/httpdocs/wp-content/plugins/cool-video-gallery/lib/youtube.php on line 39
Any ideas? Sorry to hijack this thread.
@ bbrunning
Provide video Id as input and not URL.
PHP setting allow_url_fopen : Not enabled (Required for Youtube video addition)
my webhost tell me this is not safe and I can get my site hacked easy !
sounds not so good … they will not do it for me …
@ gurris
You will require that PHP settings to enable Youtube video addition. There is no work around for that.
Regards,
Praveen Rajan