Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Kyle Gilman

    (@kylegilman)

    Yes. In the plugin instructions I recommend using forward slashes on Windows servers.

    Are you able to encode videos using the plugin? A lot of Windows users have problems with it and I don’t have access to a Windows server so I have a hard time troubleshooting it.

    Thread Starter Joel Bernerman

    (@yo-l1982)

    Who reads instructions 😉
    I missed that one and I do recall add/update_option does remove backslashes in some kind of input cleaning aptempt(Think i solved it by adding an extra backslash when I fetch the options before i present it to the user… but anyhow.).

    Well yes it got encoded but the plugin didnt quite understand it and delivered an error and the file didnt end up inside the media library.
    I did however see the encoded video inside the upload directory.

    I think the code does not take into account that Windows adds an extra char(carriage return and line feed) at line breaks and because of this the $lastline varible is always empty and this renders an error as it doesnt find the strings “libx264 ” or “video:”

    I had to change the “$lines = 2;” to “$lines = 4;” in the below part of the code in video-embed-thumbnail-generator.php line 2941 – 2955.
    (In the latest stable, didnt try any trunk or dev versions.)

    $fp = fopen($logfile, 'r');
    $c = '';
    $read = '';
    $offset = -1;
    $lines = 2;
    while ( $lines && fseek($fp, $offset, SEEK_END) >= 0 ) {
      $c = fgetc($fp);
      if( $c == "\n" || $c == "\r" ) {
        $lines--;
      }
      $read .= $c;
      $offset--;
    }
    fclose($fp);
    $lastline = strrev(rtrim($read,"\n\r"));

    This is not a good cross-platform solution as it will skip some extra lines in Unix systems but I just tried to se if anything else bugged.

    After this “fix” I got no error and the encoded file(mp4) inside the media library but I could still not insert that file using “Insert into Post”.

    Maybee this is not an issue with this plugin but just some kind of error with my .htaccess settigns to allow it.

    We use ubuntu servers on our external sites but this plugin was going into our intranet and it is sadly using a windows server.

    I cant spend any more time bugsearching this for now but at least this might help you do some kind of fix for windows servers.

    You know you can only insert the video in a post, if you actually do it from within that post, right? 🙂 Just to make sure.

    Plugin Author Kyle Gilman

    (@kylegilman)

    @yo-l1982 Thank you! I’m sure this will go a long way toward fixing the trouble Windows users have.

    Plugin Author Kyle Gilman

    (@kylegilman)

    @yo-l19282 I’m working on fixing the Windows issue now. Would you mind trying this out?

    change $lines = 4; back to $lines = 2;
    Then add the line
    if ( substr(strtoupper(PHP_OS),0,3) == "WIN" ) { $lines = 4; }
    underneath $lines = 2;

    Does that work for you?

    Plugin Author Kyle Gilman

    (@kylegilman)

    I’ve tested v4.2.3 of the plugin running Apache on Windows and the encode queue now appears to run correctly.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Saving settings removes backslashes from "Path to applications on server:"’ is closed to new replies.