MP4’s in Moodle…
UPDATE: See update at the bottom
As MP4 seems to have become the default movie format in the last few years it has become more frustrating that moodle doesn’t natively support MP4’s!
The multimedia filter in moodle uses JW Viewer as the player for flv’s but the most recent version of this player now supports playing MP4’s! So I figured I would have a go at updating the filter to support MP4’s (and M4V’s) using the latest version of JW Viewer
Well it turned out to not be that complicated… I haven’t done a complete tidy up, but it seems to work as you would expect and means that students don’t need to have Quicktime installed on the client machine to play back MP4’s
To install this (very BETA) version of the plugin, simply download the attached file, unzip and upload the folder to replace the /filter/mediaplugin folder. Then click on the “notifications” link to udate the settings…
The just upload the mp4/m4v file to your moodle install and put a link to it (as normal) and it should get replaced with the JW viewer…
Note: If you are using this for comercial purposes then you need to purchase a license from Longtail Video
Please let me know if it works for you!
DOWNLOAD REMOVED
UPDATE: It occoured to me that rather than hacking the core multimedia fiter it might work better if I just wrote a new filter just to deal with MP4/M4V files so that this would continue to work through upgrades etc… So attached below is the all new (beta!) MP4 Filter
Download the original Mutimedia Filter <- May be useful if you downloaded my original attempt!
To install just download and extract the mp4filter folder and copy it to the filter folder, then make sure you remember to activate the filter!!
I tested it – and it works! Thanks very muchThis would be great for our school as I’m often presented with mp4s -however we are reliant on our broadband suppliers who host our moodle and therefore cannot add updates ourselves – it would be great to hope that in the next version of Moodle it comes as standard.
Sounds good. maybe you should add this to the Moodle Tracker?
Cool! Glad you could scratch that itch!
I’d love to just include your changes and the new plugin in Moodle but we can’t, because the player uses this license http://creativecommons.org/licenses/by-nc-sa/3.0/ which forbids commercial use and is thus incompatible with Moodle’s GPL license which does not prevent people from using Moodle for commercial purposes.
More on http://tracker.moodle.org/browse/MDL-18658
Thanks Martin,
I wondered if that might be the case…
To that end I have split it off into a seperate plugin which I can then distribute seperately… Am I allowed to add it to the plugins directory if it is incompatible with GPL?
Hmmm- I got the filter installed, and I am putting the videos in the moodledata directory, the video player comes up but it says it cannot find the video or access denied.
Am I putting the videos in the wrong directory (moddledata is blocked for direct access from web) or it is a folder permissions issue?
/home/content/s/h/r/shrfradmin/html/moodledata/1
[shrfradmin@p3nlhssl020 1]$ ls -al
total 135080
drwxr-x— 2 shrfradmin inetuser 4096 Aug 13 10:08 .
drwxr-x— 11 shrfradmin inetuser 4096 Aug 13 13:19 ..
-rw-r–r– 1 shrfradmin inetuser 137990820 Jul 10 18:03 PAIN_MANAGEMENT_PREVIEW.mp4
-rw-r–r– 1 shrfradmin inetuser 35199 Jul 10 01:03 pain_management.JPG
OK, Got it working fine now – Bad src line.
When I was using this player before I installed it as a filter, I could specify an image (jpg) that would be displayed as a video cover, Can this still be done now that I have it installed as a filter?
darcy
Sorry Darcy, this version of the filter is basically just an adaptation of the current Media Filter to allow for MP4’s and as the previous version didn’t support ‘covers’ this one doesn’t either… If I have time to add it in I’ll let you know, but it is unlikely to happen in the near future.
Thanks for this. In Moodle 1.9.6 the mediaplugin filter will handle mp4s (code without GUI setting form already in the weeklies). BUT, it uses quicktime.
http://tracker.moodle.org/browse/MDL-18658
Makes sense since quicktime can play *any* mp4, but I do prefer to stick to just flash.
I made 2 mods to your filter.
1) Changed pattern so it only embeds if you have ?fp in the link GET string — making it an opt-in for those who know what kind of mp4 is acceptable.
2) Added 19 pixels to height:
$height = (empty($link[4]) ? 360 : $link[4]) + 19; // add controller height
Your dimensions shrank the video slightly to add the controller – resulting in pillarbox bars and slightly degraded quality.
Is anyone else having issues with the video not playing? I get audio streaming with this filter, but no video.
I am having an issue with the videos streaming. The audio works fine, but the video is a black screen. I have no idea what could be happening, and was hoping for a little help if possible
Thanks,
Scott
Does the mp4filter work in moodle 1.9.7 ?
I have tried,but it don’t work, thanks