Video Easy Filter

Filters ::: filter_videoeasy
Maintained by Justin Hunt
VideoEasy is a filter to play mp4, mp3 and other media files with html5 players. It uses user editable templates to allow the admin to customize the appearance of existing players or to support new players. Predefined player templates support Video JS, JPlayer, JW Player, Flowplayer and MediaElement.js
Latest release:
871 sites
38 fans
Current versions available: 4

VideoEasy  replaces links to media files, with  html5 players. Primarily intended for html 5 video, it will also work for audio, youtube or rss links. The Video Easy filter uses templates to support multiple players, and allows the user to add new players or customize existing ones, all from the Video Easy filter settings pages. By default players are already defined, and can be used as is, for:

Video.js, JPlayer, JW Player, Flowplayer and MediaElement.js

But preset templates are available for other players, and you are encouraged to use the existing players and presets as examples, and make your own templates.

NB Questions and comments should be posted in the Video Easy forum thread.


The easiest way to install is to use Moodle's automated plugin installer. However if you are uploading videoeasy via FTP, first expand the zip file and upload the videoeasy folder into:

[PATH TO MOODLE]/filters.

Then visit your Moodle server's Site Administration -> Notifications page. Moodle will guide you through the installation. On the final page of the installation you will be able to register templates. Since there are 15 template slots available, and each has a lot of fields. It is not practically possible to get much done here.  So ..... Just scroll to the bottom and press "save." 

After this each template has its own settings page. It is much easier to work with the settings that way. After installing you will need to enable the videoeasy filter. You can enable the videoeasy filter when you visit:

Site Administration / plugins / filters / manage filters

Finally you will need to associate a player/template with each of the file extensions, and select the file extensions that VideoEasy should handle. You can add/remove/edit the file extensions that VideoEasy can parse for, on the same page.

Do this at: Site Administration / plugins / filters / VideoEasy / General Settings

(NB JW Player requires you to register on their site, and you will be given a license code. You will need to enter that into the template for those players. See "Templates" in this document.)


Configure the site wide settings  and define/edit templates at 

Site Administration / plugins / filters / Video Easy

On the general settings page you need to check the filetypes you wish the Video Easy filter to handle at the top of the settings page, and select the player template(drop down list) that will handle that file extension.

NB You should TURN OFF file handling for any extensions you select here in the Moodle Multi Media Plugins filter, and the PoodLL filter if they are installed.

Multi Media Plugins filter settings can be found at:

Site Administration / appearance / media embedding

PoodLL filter settings can be found at:

Site Administration / plugins / filters / PoodLL

Local Configuration

One of the strengths of Video Easy is that it makes use of the under utilized Moodle feature that allows you to configure filters at the course and at the activity level. Using this, for example, it is possible to display videos in a particular page using a different template/player to that used elsewhere. This would make it possible to make a page with 100 videos embedded, behave differently to a page with just a single video.

The rest of this document gets a bit technical. From here its not strictly necessary to read on.  

You might just watch this quick 5 minute introduction to VideoEasy.


There are several templates available to use. The first six are ready made, though they can be altered.They are: Video.js, JW Player, Flowplayer, MediaElement.js, and Youtube lightbox.

JW Player requires that you register with their site to get a personal javascript link. So you will need to do that first then enter it in the defaults field of the template before you can use them.

Each template has several fields, but only the name/key field is required:

1) required javascript url : The url of the JS file the html5 player requires.

2) required css url : The url of the CSS file the html5 player requires.

3) AMD : True or False. Since Moodle 2.9 certain libraries are loaded using Require.js. If the player library supports it, you will need to set this to true. Currently only VideoJS and JPlayer use this. 

4) Shim exports: For players that do not support AMD, but which you need to load with AMD you should specify here the name of the global object that they export. Then AMD will do fancy stuff to load it for you. And you can use the exported name in the load script.

5) template : The html that goes on the page. Often this is just a div , with a unique id. Sometimes it is html5 video tags.

6) load script : Any script which the player runs to load an individual player, usually with the unique id of a container div

7) defaults : Custom variables you may use in the template or load script, or default values for existing variables (ie width and height).

8) custom css: CSS that you need on the page, that can be edited here on the settings page.

9) upload css: It is possible to upload a CSS file for inclusion on the page. This is probably in the case that the file is not available online to be be simply linked to. 

10) upload js: It is possible to upload a JS file for inclusion on the page. This is probably in the case that the file is not available online to be be simply linked to. 

11) shim exports. As for 4) but with regards the uploaded js


Each template's page contains a drop down with a number of "preset" templates. (template templates ..I guess).  Using these you can quickly make new templates, or use as a starting point for your own template. The current presets are:

Video.js, JW Player, Flowplayer, MediaElement.js,Youtube Lightbox

In order to keep VideoEasy small, there are no actual JS players bundled. Flowplayer, JPlayer etc are all included on the page via CDN hosting sources. In some cases, it will work better if you have those players installed on your own web server. Notably if they have a flash fallback that has flash components, which are sensitive to crossdomain hosting issues. 

The Video Easy Variables

Variables are used to replace placeholders in the template and load scripts. A placeholder for a variable looks like this: @@VARIABLE@@ (variable name surrounded by @@ marks.)

These variables are generated by Video Easy after parsing the media link on the Moodle page. You can define your own in the defaults section if you wish. 

NB Video Easy supports the ?d=[width]x[height] notation that Moodle's multi media plugins filter uses, for all extensions, but not for Youtube links. But since almost nobody ever uses it, in most cases you will want to specify a width and height in the defaults section for the template. The variables WIDTH and HEIGHT are populated with the values from the url param when d=[width]x[height] is set.

Video Easy also supports passing in variable values via the video url. So if the url of the video was :


The template could access the variables "color" and "subtitles" and they would contain the values "green" and "no."

VideoEasy provides the following ready made variables for use in your template:

AUTOMIME = video file mime type determined by file extension.

FILENAME = filename of video

AUTOPNGFILENAME = the video filename but with a png extension

AUTOJPGFILENAME = the video filename but with a jpg extension

VIDEOURL = the url of the video

URLSTUB = the url of the video minus the file extension. 

AUTOPOSTERURLJPG = the full video url but with a jpg extension

AUTOPOSTERURLPNG = the full video url but with a png extension

DEFAULTPOSTERURL = url to a default poster image. VideoEasy ships with  bland grey image. But you can upload your own default poster image on the Video Easy general settings page.

TITLE = the video title (from linked text)

AUTOID = an auto generated id to use in the container div or elsewhere

CSSLINK = used internally to load a CSS file if needed.

PLAYER = the type of player (videojs, flowplayer ...etc)

WIDTH = the width of video

HEIGHT = the height of video

FILEEXT = the video file extension

COURSEID = the id of the current course

COURSECONTEXTID = the id of the current course context

Note that while the template replacement is a simple swap out of the placeholder text, the loader script replacement is a little different. The loader script replacement will remove surrounding quotes as well as the placeholder, and put a JS variable in their place.


 template: <video id="@@AUTOID@@" 

 becomes: <video id="123456"


 loader script: player{ id: "@@AUTOID@@"

 becomes: player{ id: opts['AUTOID']


And a final caution, Video Easy generates a loader script from the template (if required) but this will be cached by Moodle in most cases. Thats a good thing too. But it means you will need to run Moodle "purge all caches" after making changes to anything on the Video Easy filter settings page.

NB Questions and comments should be posted in the Video Easy forum thread.



Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6


Justin Hunt (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS


  • Mon, Feb 22, 2016, 5:45 PM
    Hi Justin,

    we're using VideoEasy with our Moodle 2.7.9 installation and in general it works like a charm. However, we've now encountered something, that might be a problem with VideoEasy: we've configured the filter so that a .mp4-video will be played with VideoJS. If we upload the movie in a label, all works exactly as expected, the movie is played via VideoJS and it doesn't matter, which browser configuration any of our Moodle users have. But when they upload a movie via the "file" activity (by drag&drop right into the course) and then click on the movie, the filter seems to be disregarded and the movie is played by whichever player the user has installed (or the generic Windows media player). We've tried unsuccessfully to activate the filter by using the options "resource | filterfiles" (in the "file" activity options) and alternatively "filteruploadedfiles" in the filter general options. Both options can be configured for "All files". We thought that might activate VideoEasy for uploaded files in general, but apparently that doesn't work.

    Do you have any advice how we might be able to force Moodle to use VideoEasy for uploaded movies as well? Or is that not possible at all?
  • Thu, Feb 25, 2016, 11:29 PM
    Hi Gorn, that is indeed an issue. Moodle doesn't handle that the way it should. And I do not know a good way to make it do that. ....except to use labels.
  • Fri, Feb 26, 2016, 11:01 AM
    Hi Justin
    So, right off the bat forgive my ignorance - I'm trying hard! Moodle 2.9. I've installed and using the default players - js with mp4 and flv selected. Seems to work great for an mp4 which is called by an http link embedded in a page. Got all excited until I tried an flv then instead of the player launching, it begins a download and then runs Realplayer installed on my desktop.
    Am I missing something here? Is that the way it's supposed to function? I thought I'd get the same player as I saw with the mp4. I must not be understanding something here ....??
  • Fri, Feb 26, 2016, 11:02 AM
    By the way, I have disable the Moodle multimedia filter and I don't have any other media plugin installed.
  • Fri, Feb 26, 2016, 11:20 AM
    The issue Ken is that the HTML5 players don't normally handle FLV. The flowplayer template might work, but loading videos from one site and the player from another is something Flash is fussy about. So its best not to. Also FLV is not supported on most mobile and tablet devices, so those users won't see the videos.

    But if you must use FLV then, the best way is to let the multimedia plugins filter handle that and leave MP4 for VideoEasy. To do that, re-enable the multimedia plugins filter and at site admin -> appearance -> media embedding turn off all MP4 related checkboxes. And make sure VideoEasy is not set to handle FLV. That can be done at the VideoEasy general settings page.
  • Fri, Feb 26, 2016, 12:17 PM
    Thanks, Justin. I'll try that. I guess I thought I had to go with flv for Windows users and mp4 for iDevices.
  • Fri, Feb 26, 2016, 12:27 PM
    Also, reread your comment re loading videos from one site and player from another, the videos pointed to in the links are on my site in the Moodle directory - in case that changes your thoughts....thanks again, a great plug-in.
  • Fri, Feb 26, 2016, 1:00 PM
    Trying to get autoplay to function in video JS default template with mp4 is unsuccessful. Tried autoplay, autoplay="", autoplay="autoplay", autoplay="true", nothing seems to work. Wrong syntax?
  • Fri, Feb 26, 2016, 1:02 PM
    The flowplayer from videoeasy is downloaded from a CDN to keep VideoEasy light and flexible. Thats why the Flowplayer is from a different site to the media files. I am sorry , because I am a bit fuzzy now on whether it will work at all with FLV (and VideoEasy flowplayer). But it would be possible to download flowplayer, put it on your moodle site and then tell VideoEasy to use that. You could do all that, but you might as well just avoid FLV or use multmedia plugins for it. WIndows users love mp4 ... trust me.
  • Fri, Feb 26, 2016, 1:05 PM
    Can't comment on the correct method for setting up autoplay right now. Best to check the VideoJS website for details.
  • Fri, Feb 26, 2016, 9:19 PM
    Thanks for your help in straightening me out. I have no overwhelming need to use flv so I'll abandon that all together. This is why I use Moodle - it's a really good app but it's the available help from people like yourself that make it great.
  • Tue, Jul 19, 2016, 3:10 PM
    I tried installing on Moodle v3.0.4 and am getting Section Error.
    When I first install (through Moodle Plugin installer) and then got to Site Administration -> Notifications page, am not getting installation button. When I later got to Site Administration / plugins / filters / manage filters and click Settings against VideoEasy I get Section Error.

    There is a prompt to upgrade moodle to version 3.1 could this be the cause?
  • Fri, Jul 29, 2016, 7:56 PM
    I'm setting up a Moodle site, and I have seen this video of Video Easy. In that movie I saw that the videos are left aligned when opening the pages, but on my own site I can't find that setting. My videos appears in the middle of the white area on the pages, and that doesn't look good.

    Can anyone please tell me how to left align the videos/media files?
  • Sun, Jul 31, 2016, 8:13 PM
    Samuel ... sorry it took so long to reply. It sounds like the plugin installation went wrong, for some reason its not installing and that causes the section error (ie its there, but not "installed" ) . I would remove it from disk and start from scratch.
  • Sun, Jul 31, 2016, 8:13 PM
    Samuel ... sorry it took so long to reply. It sounds like the plugin installation went wrong, for some reason its not installing and that causes the section error (ie its there, but not "installed" ) . I would remove it from disk and start from scratch.
Please login to post comments