HTML5 Metadata and Semantics for Web 3.0 Videos
Total Page:16
File Type:pdf, Size:1020Kb
DESIDOC Journal of Library & Information Technology, Vol. 31, No. 4, July 2011, pp. 247-252 © 2011, DESIDOC Advanced (X) HTML5 Metadata and Semantics for Web 3.0 Videos Leslie F. Sikos IT Professional, Adelaide, Australia E-mail: [email protected] ABSTRACT Searching for videos online is inefficient if the search relies exclusively on relevant keywords in the text surrounding the object. HTML5 introduced advanced semantic annotation in the form of a new metadata format called microdata. Along with the video element which provides semantics to embedded video contents, media metadata can also be used to add additional features to be searched, archived, or automatically processed. Certain metadata formats provide a high level of flexibility adequate to combine them with other vocabularies, making it possible to write truly sophisticated, machine-readable metadata for video components of the Social Semantic Web. Keywords: Machine-readable metadata, video embedding, microformats, microdata, Dublin Core, RDFa, HTML5, social Semantic Web 1. INTRODUCTION distinct fields. Gayo, et al. introduced video metadata for both the producers and the users5. The first type of For years, publishing videos online was feasible metadata associates multimedia content with domain- through general object embedding only. Currently, there is specific ontologies while the second provides video still no standardised solution for publishing videos on the tagging. Their search engine combines both kinds of Web, partly due to the variety of video and audio codecs, metadata to locate the desired content and provides and the varying browser support. Video metadata can be browsing capabilities as well. Kucuk, et al. proposed an embedded either in the markup or in the file itself. Without annotation and retrieval system to automate semantic descriptive, structured metadata video searches are video indexing6. Along with the introduction of HTML5, insufficient, unreliable, or even unfeasible. new opportunities appeared to provide rich semantics as well as accessibility in the markup for videos. This paper The first video metadata applications date-back enumerates the challenges as well as limitations of the before the Web 2.0 era when Dublin Core metadata was field together with methods for standard-compliant, applied on MPEG-7 videos to support hierarchical video semantic video embedding, and metadata mixing. descriptions1, and later for providing conceptual navigation2. Although the need for video sharing has increased enormously with the introduction of Semantic 2. SEMANTIC VIDEO EMBEDDING Web and especially the Social Semantic Web, the If an online video is not meant to be part of an potential of Semantic Web technologies in video sharing interactive multimedia presentation, that is best provided has been far from exploited yet although some efforts by SMIL along with its native metadata7, the resource is have already been made in this field. described by (X)HTML markup. In contrast to the Gómez-Romero, et al. used ontologies to build a complexity of video embedding with the embed element in framework to construct a symbolic model of video scenes HTML versions up to 4.01, or the object element in by integrating tracking data and contextual information3. XHTML, (X)HTML5 introduced the video element that Brostow, et al. presented the first collection of videos with provides semantic meaning to video contents and full 8 object class semantic labels, complete with metadata4. control over the embedded file . Features such as height Their database associates each pixel with one of 32 or width can be added optionally. An image representing a semantic classes which they demonstrated on three frame from the video can also be defined in case the video DESIDOC J. Lib. Inf. Technol., 2011, 31(4) 247 cannot be rendered. Alternate content can also be given in download the whole video file even if playback has not the form been started yet. One of the exceptions is Firefox 3.6+ which only downloads a fragment necessary to determine <video src=”sample.ogv” width=”320" height=”240" poster=”sample.jpg”> duration and render a frame from the video. This behaviour <p>Download the <a href=”video.ogv”>sample video</ can be overridden by the preload attribute. The attribute a> (OGV, 5.34 MB)</p> value none forces the browser to avoid downloading. The </video> metadata attribute value hints that enough data should be Video controls can be shown or hidden in the browser downloaded only to show a frame and determine duration. by the controls attribute on the video element: The value auto downloads the whole video if possible. The effect of preload=”none” can be simulated in browsers that <video src=”xyz.mov” controls=”controls”> do not support it by omitting the src attribute and source </video> elements that are provided only if the user clicks a button: Since the video codec support is different in each browser, the same video can be provided in various <video controls=”controls”> formats, avoiding the need to download videos that cannot Video not supported be played on the system, e.g., </video> <input type=”button” value=”Load video” <video> onclick=”document.getElementsByTagName(‘video’)[0].src <source src=”video.mp4" type=”video/mp4"> = ‘video.mp4’;”> <source src=”video.ogv” type=”video/ogg”> <p>Download the <a href=”video.ogv”>sample video</ Additionally, customised controls can be added to a> (OGV)</p> the video embedding since the DOM API for video in </video> (X)HTML5 supports several events that can be The type attribute declares the Internet Media Type implemented through JavaScript. For example: (MIME type) of the video file. These specifications are described in IETF/ISOC Request for Comments (RFC) <script> documents and are standardised by IANA registration9. var video = document.getElementsByTagName The most common video Media Types are summarised in (‘video’)[0]; Table 1. </script> <input type=”button” value=”Play” Table 1. Common MIME types for video onclick=”video.play()”> Media type Specification Description <input type=”button” value=”Pause” video/mpeg RFC204510, RFC 204611 MPEG-1 video onclick=”video.pause()”> 12 video/mp4 RFC 4337 MP4 video Currently, the src attribute value of the video tag 13 video/ogg RFC 5334 Ogg theora or should be a physical file which makes it impossible to other video embed videos from YouTube. video/quicktime IANA registered14 QuickTime video video/x-ms-wmv MS KB 28810215 Windows media (X)HTML5 videos can be dynamically drawn on a video canvas with JavaScript using the drawImage method: <video src=”video.mp4" controls=”controls”> The problem is that MIME types do not reflect the Video not supported codecs of videos stored in container formats (e.g., H.264 </video> in MPEG-4). They can be provided by the codecs <canvas id=”canvas”> parameter: Canvas not supported <video controls=”controls”> </canvas> <source src=”video.mp4" type=’video/mp4; <script> codecs=”avc1.42E01E, mp4a.40.2" ’> var ctx = document.getElementById(‘canvas’). <source src=”video.ogv” type=’video/ogg; getContext(‘2d’); codecs=”theora, vorbis” ’> var video = <p>Download the <a href=”video.ogv”>sample video</ document.getElementsByTagName(‘video’)[0]; a></p> video.onloadeddata = function(e) { </video> ctx.canvas.width = video.videoWidth; The video element of (X)HTML5 provides playback ctx.canvas.height = video.videoHeight; support detection, including the canPlayType() method on ctx.drawImage(video, 0, 0); the media element16 or the onerror event listener. Certain } browsers cannot stream the video or automatically </script> 248 DESIDOC J. Lib. Inf. Technol., 2011, 31(4) 3. MACHINE-READABLE METADATA supported by the highest traffic video sharing website YouTube. Certain metadata formats such as microformats and RDFa apply and reuse features of existing technologies The Dublin Core vocabulary has several metadata (e.g., the rel attribute)17 while others such as Creative that can be used for video contents such as MIME type, Commons and Dublin Core introduce new annotations, date and time, associated URI, country, and language22. typically through the namespace mechanism. Video licenses can be efficiently denoted by Creative 3.1 Metadata Formats Reusing Attributes Commons, which is also ideal for describing copyright in RDF with the properties cc:permits, cc:requires, cc: The Web document attributes used by RDFa are prohibits, cc:jurisdiction, cc:legalcode, cc:deprecatedOn; ideal for metadata on generic objects as well as videos18. and the classes Work, License, Jurisdiction, Permission, A common feature of video sharing portals is the review Requirement, and Prohibition23. option which can be implemented with metadata support by using the hReview microformat (class=”hreview”). The digital management of rights can be performed by using the Open Digital Rights Language (ODRL)24. Some or all rights of video authors are often reserved. Many licenses associated with videos are sophisticated Education videos can be described by the IEEE and users cannot be expected to know them. The Learning Object Metadata (LOM)25. rel=”license” microformat can be added to hyperlinks that point to the description of the license. In the case of the Several metadata associated with videos are Creative Commons Attribution-ShareAlike license, for supported by multiple formats such as personal data on example, rel=”license” should be the staff (DC, FOAF, DOAC, Bio, etc.) or geographic positions (DC, Geo26, etc.). <video src=”lesson1.ogv” rel=”license” href=”http:// creativecommons.org/licenses/by-sa/3.0/” /> Due to the overlapping vocabularies of metadata The value of the href attribute provides the associated technologies, certain formats have never been widely 27 URI of the resource where the license is described. distributed (e.g., SOMA ). 4. COMBINING METADATA 3.2 Video Licensing with HTML5 Microdata If no additional constraints apply, metadata can be The concept of microdata has been introduced in arbitrarily mixed through multiple independently HTML5 for labelling content in order to describe a specific developed vocabularies. For example, microformats can type of information, such as licensing information to be combined with (X)HTML5 microdata.