Tribler Play

Decentralized media streaming on Android using Tribler

More Info


The amount of people using smartphones to access shared content has rapidly grown in the last couple of years. Popular services to share the media all rely on a client/server model, which have scalability issues and are prone to censorship. A decentralized approach would make censorship more difficult and growth more sustainable. Thus the main research question of this project is: How can Android users search and stream media in a decentralized way? In answer of this question, an Android application was developed that enables decentralized searching and downloading of torrents and streaming of video torrents. After a Research Phase and a Design Phase, which took a week each, the Scrum software development strategy was used during the Implementation Phase. This phase was divided over three sprints of two weeks, during which several requirements, as defined by the MoSCoW model, were implemented. These three sprints resulted in three iterations of prototypes, of which the last one implemented all must have requirements, three out of four should haves and even two could haves. The resulting application is based on Tribler, a fully decentralized BitTorrent client, which was developed by the Parallel and Distributed Systems (PDS) research group at the Delft University of Technology. As Tribler is written in Python, a language not supported by Android, a modified version of the Kivy Python for Android framework was used. The reuse of the Tribler code results in a more maintainable codebase, as no additional modications are needed. To provide a native Android experience to the user, an Android Graphical User Interface (GUI) was developed in Java. Because the standard means of communication between the Tribler process (Python) and the Android GUI (Java) are limited, they communicate via XML Remote Procedure Calls (XML-RPC). This has the added benefit of providing a simple Application Programming Interface (API) to the Tribler process, which could be reused in versions for iOS or Windows Phone, or to run Tribler as a headless server. Decentralized data exchange is handled by both libswift, used for small metadata (such as thumbnails), and libtorrent, which is used to download torrent files. Both these libraries had to be ported to Android, of which the latter was generously provided by the Android Tor Tribler Tunneling (AT3) team. In addition, the VLC for Android player was also integrated. The communication between Tribler and VLC goes through a Hyper Text Transfer Protocol (HTTP) server integrated in Tribler, which is used to stream media directly to the user. The reuse of Tribler code also has some drawbacks: high definition content can not be streamed reliably on low end hardware, such as the Samsung Galaxy Nexus (2011). More recent hardware, such as the LG Nexus 5 (2013), has no such problems. With smartphones rapidly getting faster (following Moore's Law), this was deemed as an acceptable trade-off.