"Video format not supported" error (but only when mp4 is linked to via external URL)
I have an mp4 video that I want to use as an Interactive Video (H5P was just updated to the latest version afaik) in Moodle (3.5.3). When I upload the mp4, the video displays. When I link to the video via external URL, I get the "Video format not supported" error. NOTE: I'm using the SAME mp4 file; the only difference is uploading the mp4 vs linking to it (http/https seems to make no difference, either).
I get seemingly-identical PHP errors with both methods:
Errors when mp4 is uploaded to H5P in Moodle (mp4 plays back successfully).
==============================================================
Warning: mkdir(): Permission denied in /var/www/coursesdevelopment/lib/filestorage/file_system_filedir.php on line 303
Warning: rename(/srv/moodledata/coursesdevelopment/filedir/90/20/90208903ed1d8720756760cc6519a5aaebae3ecd,/srv/moodledata/coursesdevelopment/trashdir/90/20/90208903ed1d8720756760cc6519a5aaebae3ecd): No such file or directory in /var/www/coursesdevelopment/lib/filestorage/file_system_filedir.php on line 314
Warning: fileperms(): stat failed for /srv/moodledata/coursesdevelopment/trashdir/90/20/90208903ed1d8720756760cc6519a5aaebae3ecd in /var/www/coursesdevelopment/lib/filestorage/file_system_filedir.php on line 317
Warning: chmod(): No such file or directory in /var/www/coursesdevelopment/lib/filestorage/file_system_filedir.php on line 319
Errors when mp4 is linked to as external URL in H5P in Moodle ("Video format not supported." error).
===============================================================================
Warning: mkdir(): Permission denied in /var/www/coursesdevelopment/lib/filestorage/file_system_filedir.php on line 303
Warning: rename(/srv/moodledata/coursesdevelopment/filedir/5b/f9/5bf942eccccc646ba30f2039aa98c6a4e5346b21,/srv/moodledata/coursesdevelopment/trashdir/5b/f9/5bf942eccccc646ba30f2039aa98c6a4e5346b21): No such file or directory in /var/www/coursesdevelopment/lib/filestorage/file_system_filedir.php on line 314
Warning: fileperms(): stat failed for /srv/moodledata/coursesdevelopment/trashdir/5b/f9/5bf942eccccc646ba30f2039aa98c6a4e5346b21 in /var/www/coursesdevelopment/lib/filestorage/file_system_filedir.php on line 317
Warning: chmod(): No such file or directory in /var/www/coursesdevelopment/lib/filestorage/file_system_filedir.php on line 319
ADDITIONAL DETAILS:
- Win 10 Enterprise x64
- Chrome browser
- Moodle 3.5.3
- Just updated H5P
BV52
Thu, 01/24/2019 - 07:10
Permalink
Hi jcm3,The error message
Hi jcm3,
The error message does not look like it points to the H5P content or plugin.
The issue you are experiencing is an after effect of adding C.O.R.S., accessibility is very important for H5P, and in order to allow subtitles for external videos we're currently requiring that the servers they are hosted on has an Access-Control-Allow-Origin header set that allow H5P.com / H5P.org or whatever site you're using access to the video in a cross origin resource sharing manner. We see that many servers used by community members unfortunately does not have this set, and that they are not controlled by the community member either, so we're considering a solution where you can decide to allow such servers, sacrificing accessibility.(i.e. sacrificing subtitles support to use these servers).
-BV52
jcm3
Thu, 01/24/2019 - 15:50
Permalink
Thanks for the quick reply
Thanks for the quick reply BV52! I'll share this with the IT team and see if they can make the necessary changes to our servers. We have a LOT of video content and want to keep it separate from our Moodle server so it doesn't get overwhelmed whenever we import/export courses to make iterations.
jcm3
Thu, 01/24/2019 - 23:00
Permalink
SOLVED
BV52 I wanted to let you know our support team was able to update CORS to fix the problem. I cleared my browser cache and the video (including captions) now work as expected. Thanks again! FYI: we pass our courses through multiple servers as they move through development, so I was warned that it might be necessary to clear the browser cache after transitioning from server A to B to C.
BV52
Fri, 01/25/2019 - 03:07
Permalink
Hi jcm3,I'm glad it is
Hi jcm3,
I'm glad it is working now and thank you for getting back to us. If you have other questions feel free to post in the forums.
-BV52
serettig
Mon, 02/04/2019 - 15:14
Permalink
Hi all,I've submitted a pull
Hi all,
I've submitted a pull request on GitHub that allows administrators to disable CORS (for certain servers or all, depending on the value of crossoriginRegex):
https://github.com/h5p/h5p-video/pull/23
For this to work on moodle another pull requests for the h5p-moodle-plugin must be accepted because there is a bug in there. (H5PIntegration.crossoriginRegex) is never set.
https://github.com/h5p/h5p-moodle-plugin/pull/245
It would be great if these pull requests were reviewed by the core team!
Sebastian
BV52
Tue, 02/05/2019 - 04:58
Permalink
Hi Sebastian,We can't thank
Hi Sebastian,
We can't thank you enough for your contribution. I created a task to review this and you can follow the progress here.
-BV52