• Resolved sujitharavind

    (@sujitharavind)


    FFMPEG was already installed in our development server. But “Cool-Video-Gallery” plug in, its not identifying. Please see the description getting from the video gallery over view.I want to generate the thumbnail image automatically.
    My ffmpeg path is /usr/bin/ffmpeg

    I changed $options[‘cvg_ffmpegpath’]= ‘/Applications/ffmpegX.app/Contents/Resources/ffmpeg’; to $options[‘cvg_ffmpegpath’]= ‘/usr/bin/ffmpeg’;.But no effect
    Server details:

    Operating System : Linux (32 Bit)
    Server : Apache/2.2.12 (Ubuntu)
    MySQL Version : 5.1.37-1ubuntu5.4
    PHP Version : 5.2.10-2ubuntu6.7
    PHP Max Upload Size : 100MB
    FFMPEG : Not Installed
    [Note: Preview images for uploaded videos will not be created automatically using FFMPEG. Manually upload preview images for videos.]

    PHP extension SimpleXML : Enabled
    PHP setting allow_url_fopen : Enabled

    http://wordpress.org/extend/plugins/cool-video-gallery/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Praveen Rajan

    (@praveen-rajan)

    @sujitharavind

    Set your FFMPEG path through CVG Admin pages and not by altering the plugin code.

    Thread Starter sujitharavind

    (@sujitharavind)

    @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.

    Plugin Author Praveen Rajan

    (@praveen-rajan)

    @sujitharavind

    Is exec enabled in your sever for PHP?

    Thread Starter sujitharavind

    (@sujitharavind)

    @praveen

    Yes..”exec” was enabled in our development server..

    Thanks,
    Sujith

    Thread Starter sujitharavind

    (@sujitharavind)

    @praveen

    One more thing..How can i view uploaded videos in the site front end???

    Thread Starter sujitharavind

    (@sujitharavind)

    Hello Praveen,

    Any idea about ffmpeg??

    Plugin Author Praveen Rajan

    (@praveen-rajan)

    @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&#8221; 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.

    Plugin Author Praveen Rajan

    (@praveen-rajan)

    @ 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 …

    Plugin Author Praveen Rajan

    (@praveen-rajan)

    @ gurris

    You will require that PHP settings to enable Youtube video addition. There is no work around for that.

    Regards,
    Praveen Rajan

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Plugin: Cool Video Gallery] FFMPEG Problem’ is closed to new replies.