Tag Archive: media




Comments Closed

Embedding movies in DokuWiki

We have a solution in school that is using a mirrored DokuWiki instance to share lessons between ourselves and a partner school (or, at least, will do).

The “main” instance is running on this server, for the moment, and the slave is running on a Raspberry Pi. The two instances are kept “in sync” by using the synchronisation plugin available from the standard DokuWiki repository.

The primary idea was to allow students to video science experiments, which our partner school may not have the resources to do for themselves, then upload it to the wiki along with a commentary, so that pupils at the partner school could learn from seeing and hearing our experiments, not just reading about them in a science textbook.

The first hiccup was finding out that the default installation of DokuWiku didn’t allow uploading of the .mov files generated by iMovie on iOS. Ah… After some thought, we decided we could just upload them to YouTube and link to them there, or maybe even try and embed them.

Part-way through the process, it occurred to me that we had somewhat broken one of our initial design goals, which was to have all of this running on the RaspberryPi instance, so that it could serve wiki pages even if their internet link was down. No point stressing over that, if all the videos are on YouTube! D’oh!

Back to the drawing board, we looked into plugins that could embed videos. The main one we found uses HTML5 to embed videos from the wiki media library directly on a page, but it clearly states that it only supports the encodings speed by native HTML5, of which QuickTime is not one. Boo!

After a number of fruitless experiments altering the source on my host and a fair bit of reading up on the supported codecs, I was all set to try option “b” (or was I up to “q”?) and instead simply convert the videos into MP4 files and upload those. So I found a free app in the AppStore and converted a short sample video, when I noticed something potentially useful: both the original .mov and the converted .mp4 were using H.264/AAC encodings, the only difference being the envelope!

A glimmer of hope shone through!

I tired simply renaming the file. Bingo! Hosted, embedded video!

Taking it one step further, it turns out that if I simply redefine the MIME type for mov from video/quicktime to video/mp4 and amend the plugin code to allow the .mov extension through, then all is shiny!

W00t – iPad-generated videos, uploaded straight to the wiki can now be embedded in the wiki pages. Result!

I am a happy geek 🙂