1 Faculteit Ingenieurswetenschappen en Architectuur Vakgroep Electronica en Informatiesystemen Voorzitter: prof. dr. ir. Jan Van Campenhout Implementa...
Faculteit Ingenieurswetenschappen en Architectuur Vakgroep Electronica en Informatiesystemen Voorzitter: prof. dr. ir. Jan Van Campenhout
Implementatie en uitbreiding van de Media Fragments-specificatie op Android door Tim DE MEY
Promotoren: prof. dr. ir. Rik Van de Walle, Brecht Stubbe Begeleiders: Wim Van Lancker, dr. Davy Van Deursen
Masterproef ingediend tot het behalen van de academische graad van Master in de ingenieurswetenschappen: computerwetenschappen
Academiejaar 2011–2012
Faculteit Ingenieurswetenschappen en Architectuur Vakgroep Electronica en Informatiesystemen Voorzitter: prof. dr. ir. Jan Van Campenhout
Implementatie en uitbreiding van de Media Fragments-specificatie op Android door Tim DE MEY
Promotoren: prof. dr. ir. Rik Van de Walle, Brecht Stubbe Begeleiders: Wim Van Lancker, dr. Davy Van Deursen
Masterproef ingediend tot het behalen van de academische graad van Master in de ingenieurswetenschappen: computerwetenschappen
Academiejaar 2011–2012
Voorwoord Graag wil ik even de tijd nemen om iedereen te bedanken die er direct of onrechtstreeks voor gezorgd heeft dat ik deze masterproef kon aanvatten.
Eerst en vooral gaat mijn dank uit naar Davy voor zijn geduld als ik even niet mee was, voor het nalezen van de teksten en om mij er steeds vriendelijk op te wijzen als er te weinig structuur zat in de tekst. Ik wil zeker ook Wim niet vergeten, die jammer genoeg sinds januari er niet meer bij kon zijn.
Verder wil ik ook de promotoren prof. Rik Van de Walle en Brecht Stubbe bedanken voor het onderwerp. Ik programmeer zeer graag en ben dan ook met plezier de uitdaging aangegaan om op een onbekend platform een applicatie te maken.
Ik bedank ook de persoon achter de schuilnaam ’WTFMAN’ (wiens echte naam ik niet ken) vanop het 9lives-forum om zijn GSM aan mij te verkopen, zodat ik thuis over een echt Androidapparaat beschikte om op te werken.
Tim De Mey, mei 2012
Toelating tot bruikleen ”De auteur geeft de toelating deze masterproef voor consultatie beschikbaar te stellen en delen van de masterproef te kopi¨eren voor persoonlijk gebruik. Elk ander gebruik valt onder de beperkingen van het auteursrecht, in het bijzonder met betrekking tot de verplichting de bron uitdrukkelijk te vermelden bij het aanhalen van resultaten uit deze masterproef.”
“The author gives permission to make this master dissertation available for consultation and to copy parts of this master dissertation for personal use. In the case of any other use, the limitations of the copyright have to be respected, in particular with regard to the obligation to state expressly the source when quoting results from this master dissertation.”
Tim De Mey, mei 2012
Implementatie en uitbreiding van de Media Fragments-specificatie op Android door Tim DE MEY Masterproef ingediend tot het behalen van de academische graad van Master in de ingenieurswetenschappen: computerwetenschappen Academiejaar 2011–2012 Promotoren: prof. dr. ir. Rik Van de Walle, Brecht Stubbe Begeleiders: Wim Van Lancker, dr. Davy Van Deursen Vakgroep Electronica en Informatiesystemen Voorzitter: prof. dr. ir. Jan Van Campenhout Faculteit Ingenieurswetenschappen Universiteit Gent Samenvatting – In het weblandschap worden media-objecten nog steeds als ’foreign objects’ beschouwd: zij worden niet door de browser zelf maar door een plugin gerenderd. Bovendien kunnen deze objecten niet op een URI-gebaseerde manier gefragmenteerd worden. De Media Fragments-specificatie tracht dit laatste probleem op te lossen. In deze masterproef wordt Media Fragments uitgelegd, alsook waarom er nood is aan implementaties van deze specificatie. Er werd ook een Media Fragments parser geschreven en een implementatie op het Android-platform. Trefwoorden – Media Fragments, Android, Mobiel, HTML5, standaardisatie
Extending and implementing the Media Fragments specification on the Android platform Tim De Mey Supervisor(s): Davy Van Deurzen, Rik Van de Walle
Keywords— Media Fragments, Android, Mobile, HTML5, Standardisation
Spatial dimension - example: ...#xywh=10,20,40,60. A rectangle starting at 10 pixels from the left, 20 pixels from the top, 40 pixels wide and 60 pixels high, will be drawn on top of the video, with the outside area darkened or some similar effect, to draw attention to the rectangle’s inside content. • Track dimension - example: ...#track=video. The track named ’video’ will be extracted from the media container. • ID dimension - example: ...#id=chapter-1. The named temporal segment ’chapter-1’ will be played. Multiple key-value pairs can be entered by glueing them with a ’&’, e.g. ...#t=10,20&xywh=10,20,40,60.
I. Introduction
III. Problem Definition
EDIA objects are still considered ’foreign objects’ due to two reasons. First, they are treated by browsers as a black box. More specifically, browsers rely on plugins, such as Flash, to have audio and video get rendered. Secondly, media objects cannot be fragmented in a standardized, URI-based manner. In contrast with this, objects of certain MIME-types can be fragmented as listed in Table I [2], [3].
The Media Fragments specification aims to be standardized. To achieve this, implementations for the specification have to be created in order to get feedback of implementors and to prove that the specification is useful and implementable. This way the specification can be adapted and improved. There are already such implementations, but not on mobile devices. Such implementations would contribute greatly to the specification, as these devices are generally limited in bandwidth; Using Media Fragments’ temporal dimension, mobile video players wouldn’t need to buffer data beyond the point where the temporal fragment ends. In addition, a mobile implementation of the specification would prove that Media Fragments is also implementable on devices other than computers, as all implementations have been made on such devices. Spatial fragmentation defines a static rectangle. This may cause some difficulties when trying to focus spatially on a moving or an enlarging object within a video. This example indicates that Media Fragments should be investigated to determine whether there is room for improvement or extensions.
Abstract— In the web universe, media objects are still considered ’foreign objects’, as they are being rendered by a plugin rather than the browser itself. Moreover, these types of objects cannot be fragmented in a URI-based manner. This article briefly describes the Media Fragments specification, a URI-based approach for fragmenting media objects, and explains the need for implementations of this specification. In addition, we investigate how Media Fragments can be extended in a useful manner. In the rest of the article, we describe the steps taken to create a Media Fragments compatible video player on the Android platform, and explain the investigations we made to diminish an Android powered device’s data traffic consumption when using Media Fragment URI’s.
M
TABLE I MIME-types and their URI-based fragmentation