Secure HTML5 Video Player Plugin for WordPress

UPDATE 5/22/15: We have a new Q&A section for this plugin.

Go to Q&A Board for SH5VP

This is a video FAQ for our WordPress Plugin called Secure HTML5 Video Player. In it, we walk you through questions about security (and how to secure pages, which is NOT part of this plugin by the way), folder settings for secured videos, shortcode and parameters to set on your page or past,  and a Safari-specific video encoding issue we hear about a lot.

We hope you find the plugin helpful! Please share comments or update the plugin yourself if you see areas needing improvement.


Having trouble installing and making it work? The first thing we recommend is searching the comments on this page via your browser’s Find command. We are happy to answer questions when we’re not working on paid client work. If you can’t wait, might I suggest hiring an oDesker for help? It was one of our best discoveries of 2011.


  1. Tim says

    Secure HTML5 works great for me using a directory below my public directory, but I’m running out of disk space so I want to put some or all of the videos on Amazon S3. I’m unclear as to whether *some* videos can be on Amazon S3 and some videos stored locally, both playing successfully with Secure HTML5, or whether I have to pick one (?)

    Under the “Security” tab I have a link to my local videos location:

    …And in the S3 tab I have links to my S3 bucket: videoserve/ and S3 video directory: videos/

    With both of those settings saved, if I have a Secure HTML5 shortcode in my page:

    [video file="myvideo" width="720" height="480"]

    …And I had the myvideo.mp4, myvideo.ogv, myvideo.png files in both locations (locally, and on S3) how would Secure HTML5 know which location I was directing it to play the file from? Is there a WAY to let me know which location to load the file from?

    Sorry, I’m just confused, thanks in advance.

    • duncan says

      The plugin allows files to be stored in both S3 and on the webserver, and files may be mixed or matched. If the same file and path exists on both video directories, then the S3 video will take priority. You can verify which video is being served by right clicking the video, inspect it in the web browser’s inspection console and see what src the video URL is being loaded from.

      To reduce space usage on your server, you could switch to using “serve dynamically” as your caching method. That will reduce the amount of space utilized by removing the requirement for placing videos in a accessible directory path. Instead the files will be streamed using PHP. The downside to this is that it doesn’t perform well with certain hosting providers that limit the resources available to PHP.

  2. Klaus says

    Hi, I’m using your version 3.9 with WordPress 4.0 and the Pinboard theme. But it is displayed very ugly. The controls are above the video and the video lays over the comment section. With wordpress 3.9.x it has worked well….
    Thanks for any help…

    • duncan says

      Unfortunately, it looks like that WP template is conflicting with some of the skins in the video plugin. You should be able to work around the problem by changing the skin settings in

      Settings -> Secure HTML Video Player -> Skin

      and set it to “native”, and save the settings. The videos should now appear correctly with controls in the right places.

      • Klaus says

        Hi Duncan,

        thanks for your answer, but I do not have any Skin selected. It is set to native.
        I have tested Safari and Google Chrome. In both browsers it is not working correctly.
        Any other suggestions?


        • duncan says

          The problem is that the template is manipulating and applying styles and sizing rules to the video elements. To work around it, you can do one of the following:

          1. Choose to use an alternate WordPress template

          2. In pinboard/functions.php, comment out all lines of code that reference “mediaelementplayer”. This should include the stylesheets and all of the JS calls that look like this:
          videoWidth: '100%',
          videoHeight: '100%',
          audioWidth: '100%',
          alwaysShowControls: true,
          features: ['playpause','progress','tracks','volume'],
          videoVolume: 'horizontal'

          Changing the skin to be native fixed it for me. Are you using a caching plugin? If so, you might need to clear out the cache so that you see the updated code in your browser.

  3. Bob says

    I’ve been using Secure HTML5 Video Player (currently version 3.9) to handle a number of short videos on a client’s site. The setup has successfully worked on several hosts (to facilitate development and testing). The client just upgraded from FatCow’s regular shared hosting to its new “WP Essential” faster shared hosting.

    On the new platform the following problem has begun occurring: Even though the locally-hosted videos still work fine on computer-based browsers, they fail to play at all on IOS devices. There’s no error message–just no response when you attempt to start the video playing.

    For now I’m working around the problem by hosting the videos on Amazon S3.

    Any idea what might be happening?


    • duncan says

      Have you tried an alternate setting for caching? It looks like you’re using dynamic caching. If you switched to file caching, the video playback performance should be more consistent. The most recent update to file caching is optimized for space. One option uses hard links, and the other symbolic file links. We provide 2 options because some server configurations are such that only one of those options work.

      I’m not sure why the video is failing to play on iOS. My best guess would be that there is some configuration on the server that is set to limit the capabilities of PHP, and that is making some aspect of the plugin fail. I’d advise that you check the server’s error log and see if there are any php errors present. If there are errors, please send that information to us.

      • Bob says

        The video performance is fine at this point. The only issue is the failure to play on iOS when the videos are hosted on the new FatCow server. On the old server, on my test server at Bluehost, and on my local development server the problem doesn’t exist.

        I don’t think I have access to the server logs, but I’ll see. Regardless, they have a ticket open and I’m sure someone can look at them.

        I was basically just checking whether this (won’t play on iOS from certain servers) is a symptom you’ve run into before. I realize your Plugin is free, and don’t want to take a bunch of your time. Thanks again for the quick responses!

  4. Bob says

    In response to a question I left on June 23, Duncan explained that that on Chrome, you needed to set preload=”yes” to get autoplay to work. This solved my problem at the time.

    I just updated from v 3.8 to v 3.9, and immediately began to experience a significant delay before my videos would begin to autoplay in Chrome. I was able to resolve this by changing preload back to “no”. (And autoplay now works in Chrome with preload=”no”.)

    Any idea what’s going on?

    • duncan says

      Hi Bob,

      Sorry for the problems. I don’t think the preload setting should make any different with regard to autoplay in the latest version of Chrome. This may have been a bug specific to an older version of Chrome.

      I think the change in the plugin that may have broke auto play for some of your videos in Chrome is likely the one that now orders MP4 videos ahead of OGV and WEBM. That change was done primarily because now that Firefox support MP4 videos, and because processor efficiency is greater with MP4 decoding both on mobile and desktop browsers, there’s no reason to give a preference to the other codecs.

      But the side effect of that change is that likely Chrome is giving preferred playback preference to MP4 rather than the other format, and that’s revealing a streaming issue specific to some of your MP4 videos. With MP4 unless they’re encoded as being “web optimized” or “fast start” they will encounter delays prior to playback on most browsers.

      You should be able to do this using Handbrake:
      or Final Cut Studio:
      or another video encoder that is able to create MP4 videos meant for web playback, like Miro:

      If these file updates are too time consuming, for the time being you can reverse the change we made by editing the file:
      sh5vp-functions.php at around line: 1836

      if ($mp4_source) {
      $video_tag .= “{$mp4_source}n”;
      if ($webm_source) {
      $video_tag .= “{$webm_source}n”;
      if ($ogg_source) {
      $video_tag .= “{$ogg_source}n”;


      if ($webm_source) {
      $video_tag .= “{$webm_source}n”;
      if ($ogg_source) {
      $video_tag .= “{$ogg_source}n”;
      if ($mp4_source) {
      $video_tag .= “{$mp4_source}n”;

      That will change the source tag ordering back to the way it was before. Please let us know if you continue to have problems after trying these steps. Thanks.

  5. Thorsten says

    Your plugin worked fine, but the last update seemed to change things.
    You changed something in the way the files are served from cache I
    remember. In my case I cannot serve the files anymore from cache they
    will not display in both Internet Explorer and Firefox 32.0.1. This
    happened after I did some changes on my site.

    What I did: My video directory was a symbolic link to a directory
    somewhere else on my webspace. I changed the video directory to a
    different symlink and the videos could not be started. The controls
    appear but I cannot start the video.

    I tested different locations and managed to run the video from my
    public_html folder but all other locations I have tested did not work.

    Is there a way to clear the cache or do I have to use real directories
    as video directory and not symlinks?

    By the way: In Firefox 32.0.1, when serving files dynamically, Mp4 files
    did not display in general on my blog. The plugin starts a flash player
    but the video could not be started. My workaround was the option to
    serve from cached files but this seems to have stopped working now.

    • Duncan says

      Hi Thorsten,

      Sorry about the problems.

      In the recent update we optimized the plugin to favor using symbolic links instead of file copies when trying to cache the file for video serving. In most situations, this should improve performance and space usage significantly.

      I think for your case, the problem is either that:

      1. The webserver is configured to not allow serving linked files.
      If this is the case, I think it can be solved by adding this line to your htaccess file:

      Options +FollowSymLinks
      Or by adding “FollowSymLinks” to the link of options set in the apache configuration for “Options”.

      2. The PHP code is not able to create a symbolic link to a symbolic link
      If this is the case, I think it can be solved by making the video directory setting point to a real directory, or by making the symbolic link a hard link to the directory. I don’t think this is likely the problem, but it might be worth trying.

      Another thing you can try is deleting the sh5vp_cache directory in wp-content.

      If it still doesn’t work after all that, you can change the behavior back to how it was before it in the php file: prepvideo.php in the plugin’d directory, and change around line 94:

      if (!symlink($video_orig, $video_cache)) {
      copy($video_orig, $video_cache);

      to be:

      copy($video_orig, $video_cache);

      After making that change, delete the sh5vp_cache directory to make it take effect.

  6. says

    After I moved my video files to AWS S3 all video files can be downloaded via a mouse right pressign and downloaded via video option. All S3 configurations and secure html5 plugin are via id and secret key, properly configured. No fall backs or download options set in the plugin.
    What I am doing wrong? You will find different video plugins, please use this link to see what I am reporting
    My concern is regarding some training videos that can not be downloaded in such easy way.
    Thank you.

    • Lucinda Brown says

      Hi Virg,

      This is one of the most common questions (and frustrations) we hear. Once a user is on your page watching a video, they can steal it. No one can get around that. They can screencapture the whole video using jing or other screen capture tools. What our plugin does is

      • store videos in a place above the top web root folder so no one can snoop and find them.
      • help you manage videos, skinning, caching and playback from a variety of storage options

      We don’t handle the securing of the pages either, despite the plugin’s name. There are so many good options for managing access to pages (such as paid memberships pro, wordpress password protect page, memberpress, ithemes exchange, etc.).

      Your job is to find a way to ensure the right person gets to the page with your protected videos. After they’re there, there’s nothing anyone can do to 100% protect the content.

      • Tim says

        While I completely understand there’s no way to stop someone from downloading a video once they’re streaming it on your website, the goal is to not make it easy for the average non-techie who doesn’t know how to install a video download plugin or any of the other ways that take a bit of effort.

        I’m using Amazon S3 to host the videos, and currently if I right-click the HTML5 video player after starting a video, one of the options that comes up is “Save video as…”

        Do you have the ability to disable that option from coming up in your next version of Secure HTML5? If so, I’d really appreciate if you could do that please. Making it THAT easy to download videos being played defeats the whole purpose of why I started using your Secure HTML5 player in the first place.

        Thanks for all the work you do to keep this video player updated, and I’m hoping you can remove that “Save video as…” option in the next update. 🙂

  7. says


    Not sure how to use this plugin. Where it says “Video:” do I put in the video file name or the url? Neither seemed to get the video to work. It just says “An err0r occurred. Please try again later.”

    • Lucinda Brown says

      Hello James,

      Here’s an example of the correct syntax for the shortcode:

      [video file='cranial-processing-member-applications' width='740' height='416' preload='yes' autoplay='no' loop='no']

      You put in the video filename MINUS the file extension.


  8. Lori says


    I just installed this plugin, and I have the latest wordpress version 4.1.1

    I currently do not have my videos directory password protected or chmod or anything like that, yet.

    Is other people having problems with the latest wordpress version NOT showing the video player at all?

    I used the selection box below the editor, and my video files all show up in the selection drop down. So I know the file path to the videos folder is correct.

    When selecting ANY of those videos and putting it into the editor, it shows that the correct video shortcode is there on the text editor. Nothing shows up in visual editor but that’s probably to be expected.

    So after saving the post, nothing shows up on the saved page.

    I use shared hosting.


    • Lucinda Brown says

      Hello Lori,

      Some thoughts to help troubleshoot:

      1. How big is the video file? If it’s bigger than 5MB it could just be downloading too slowly.

      2. Did you upload a first frame in the directory with the same name but different file extension? You should at least see that if the video playback is slow.

      3. What file format(s) do you have in the directory? It should be .mp4, and optionally .ogv.

      4. Often when there is a playback problem, the person hasn’t formatted the mp4 into the right specifications for html5. Please check for h.264 web optimized.

      Best Regards,

Leave a Reply

Your email address will not be published. Required fields are marked *