[Xerte-dev] Video playback quality in html5 LOs.
David Goodwin
david at palepurple.co.uk
Thu May 15 11:21:19 BST 2014
Hi,
We've been asked to improve the quality/behaviour of video playback
within html5 LOs.
I assume :
We shouldn't think about including a flash fallback player (given
they're using a html5 template).
Therefore :
We should make sure there's a webm and mp4 format video available for
the video playback.
and
We should re-encode the mp4 video to h264 basic profile to ensure it
plays on mobile devices.
Does the data.xml/preview.xml file have an XSD to validate against - and
specify which attributes/tags are legal?
Possible solutions are :
1. We could embed additional stuff in the xml files -
<?xml version="1.0"?>
<learningObject language="en-GB" name="Learning Object Title"
navigation="Linear" textSize="12" displayMode="default">
.....
<textVideo linkID="PG1400145368211" name="video test" align="Left"
url="path/to/file" tip="Enter a Tooltipx" reset="true"
url_webm="path/to/file.webm" url_ogg="path/to/ogg"
transcriptTabTxt="Transcript" transcriptTabTip="Transcript"
transcriptTabWidth="90"><![CDATA[asdasdasd asdasd asda sdas vide ov ideo
video]]></textVideo>
....
(note the url_webm, url_ogg attributes).
Cons - presumably would get lost on re-edit - we'd need to have a
post-save filter in XOT to add it into the xml files all the time.
Cons - attributes may not be legal/allowable.
Pros - we could add those attributes in, only if the underlying file
exists - i.e. it's been transcoded in the background.
2. We could alter the html5 playback JavaScript to cause it to check for
the existence of whatever the textVideo url attribute is pointing to
plus a set of extensions which would be used to indicate that the file
has been transcoded.
e.g. <textVideo url="foo" ... />
JS would check for :
foo.webm
foo.mp4
foo.ogg
And if it finds any of them, it'll use them. (http head request - to
check for existence).
Pros : no need to touch data.xml/preview.xml, url attribute always
points to what the user uploaded.
Pros : a simple cron job (perhaps) could rummage through USER-FILES
looking for video files which haven't been transcoded. If the cron job
is never run then the original file will always be used, if the cron job
has run then hopefully there are some better files to use.
Cons : "magical"
Any other ideas/thoughts?
I don't suppose it's really feasible to just tell the template author
they should upload the correct encoding - when they're unlikely to be
aware of the nuances of video encoding, or the tools available for it?
thanks,
David.
--
Pale Purple Ltd
PHP Web application development and support
http://www.palepurple.co.uk
@PalePurpleLtd
07792 380669 / 0845 0046746
More information about the Xerte-dev
mailing list