• I was wondering if you had a work around to using this plugin with Amazon S3 offload. I would like to store my files on S3 instead of the local server. When I upload the files and click generate thumbnail, I get this error:

    Error: unable to load video in browser for thumbnail generation and FFMPEG not found at /usr/local/bin

    When S3 is disabled and the videos are uploaded to my server, the plugin works as usual and generates the thumbnails. Is there a way to get this work with both?

    Thanks in advance, superb plugin!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter neilsavage

    (@neilsavage)

    I may be getting somewhere. I changed some settings and now have an error:

    Can’t open movie file.
    (see Changelog for details). Please use avconv instead.
    s3://paulrab..: No such file or directory

    It looks like it doesn’t have the right URL, should be https://s3.paulra…

    Plugin Author Kyle Gilman

    (@kylegilman)

    I believe this is a browser security issue. The plugin uses your browser’s built-in video decoding capabilities to convert a video frame into a <canvas> element, which can then be uploaded to the server as a base64-encoded image. Since your WordPress domain isn’t the same as the video’s domain, the source of the <canvas> element doesn’t have proper CORS credentials, the canvas is considered tainted, and no image can be saved. This prevents things like malicious JavaScripts uploading code to your server from remote servers.

    You should be able to generate thumbnails in the browser if you create a CORS policy on S3 allowing the domain your WordPress site runs on to access it. I haven’t actually done it myself, but I believe you only need to enable GET access.

    Plugin Author Kyle Gilman

    (@kylegilman)

    Do you have FFMPEG or LIBAV installed on your server?

    Thread Starter neilsavage

    (@neilsavage)

    Adding the CORS policy did solve the issue with generating thumbnails – which is great. When I first upload the video and the thumbnail is auto generating, I still get the error. But once I manually select generate thumbnails, it works fine. Not a big issue, should just turn off auto generate thumbnails.

    Plugin Author Kyle Gilman

    (@kylegilman)

    Ok, so you do have FFMPEG or LIBAV? One of them is necessary in order to use the automatic thumbnail feature. From that error message you posted it looks like you have LIBAV but you’ve set the plugin to use FFMPEG?

    I’ve seen that s3:// error before and I didn’t get an answer on what plugin was creating that weird URL. It looks like the S3 offloader filters wp_get_attachment_url to return the s3 protocol instead of https:// which might work with most normal website functions, but not with FFMPEG/LIBAV. I’ll have to figure out how to get around that.

    Thread Starter neilsavage

    (@neilsavage)

    I tried using LIBAV as well but same issue. My server is hosted on DreamHost as a VPS. I ran a test in the settings and everything seemed to be working correctly. I am okay with manually generating the thumbnails, it still saves me a lot of time.

    What did you put in your CORS policy and what settings did you change? I can’t get it to work with s3 offload. I need it because I don’t have enough space to host all of the video files that people upload onto my server. And I need this plugin to automatically encode the videos when uploaded using s3 offload.

    Thread Starter neilsavage

    (@neilsavage)

    Here’s my policy that I put inside the permissions of the particular bucket I was connecting to – there’s a tab labeled CORS configuration:

    <?xml version="1.0" encoding="UTF-8"?>
    <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <CORSRule>
        <AllowedOrigin>http://www.website.com</AllowedOrigin>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>DELETE</AllowedMethod>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
    <CORSRule>
        <AllowedOrigin>https://www.website.com</AllowedOrigin>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>DELETE</AllowedMethod>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
    <CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>GET</AllowedMethod>
    </CORSRule>
    </CORSConfiguration>

    Put both http and https if you using ssl.

    • This reply was modified 7 years, 5 months ago by neilsavage.
    Plugin Author Kyle Gilman

    (@kylegilman)

    Thanks @neilsavage that should be useful for a bunch of people. @mayzfieldtv keep in mind that will only help you manually generate thumbnails using the in-browser technology.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Compatible with S3 Offload’ is closed to new replies.