A look on the Paratii player v.0.0.1

Under the hood of this first demo version, and the next things to come.

Paratii
Paratii
5 min readDec 13, 2017

--

What is it?

What you see left is a standard software client (a media player) for streaming video over the internet, inside web browsers, via a self-scalable p2p network that does not have to rely on central servers. It can be shared and embedded through an increasing amount of platforms (like Twitter), and will be able to incentivise (give money to) agents and machines who support it in a variety of manners, all in a distributed fashion, freeing the value currently accrued by video-sharing oligopolies to network contributors of all kinds and sizes.

You can try a demo on https://paratii-video.github.io/paratii-embed (Mac/Chrome is fine, help us spot bugs & issues in other browsers/OSs!).

Try it here.

Motivations

This prototype — and its aspirations — is motivated by three main insights:

  • The debate around monetisation for audiovisual content is old and inconclusive. Instead of imposing certain models or prohibiting others, we’d rather free creators to distribute their work as they wish, and to share earnings accordingly.
  • Cryptocurrency UX is in its infancy. It’d be great if we could have software that recognises that, and offers a twofold experience: au passant users can use it frictionlessly; more attentive watchers have the option to actively login and deal with keys, seed phrases and all the crypto-jumble.
  • Self-publishing democratised access to content distribution. Self-tokenisation may democratize access to content financing. But no matter how distributed the media landscape becomes in the near future, we assume a large share of entities publishing video will still be organised groups (creative studios, news platforms, entertainment outlets, businesses). We don’t want to remove/replace any agents of the current market setup. We are creating tech that will help the market reorganize itself as an open arena, where anyone can offer and compete for resources, regardless of size and origins.

Gradual decentralisation

Paratii’s vision is to bundle access to base-layer and 2nd-layer services, straightforwardly fulfilling the basic needs of those who share video on the internet. Meanwhile, it’s also an application protocol for rewarding in-video attention dynamics and coordinating end-users/creators/publishers to verify such dynamics + agree on the distribution of work among in-browser and “publisher nodes”.

We plan on making each minor release useful on its own, therefore relying on a modular design, with partially centralised components that will be gradually upgraded along the way. Community feedback is encouraged at every phase of the journey towards a fully autonomous network.

Under the hood

The player can be embedded in a webpage with a line of code. When a user arrives in it, a local node running the paratii-protocol is initiated.

js-ipfs

We currently use a modified version of the js-ipfs implementation, that allows for custom chunk sizes and other performance-optimising measures, but is still a bit rough around the edges. This release uses HLS multi-bitrate format to store and serve videos compatible with most browsers and devices out there.

It also comes with hybrid buffering, meaning the web client automatically chooses between using an IPFS gateway or truly decentralised streaming. This shaves time off the initial load since the network is currently small with very few peers — for now, we choose not to sacrifice speed.

paratii-lib

The Paratii javascript library is the preferred way for clients to interact with deployed contracts on the blockchain. It offers access and convenient functions for more useful error handling than making direct calls, besides providing wallet functionality. It’s divided in independent submodules, likeparatii.personal for handling personal info,paratii.eth for interactions with Ethereum contracts, paratii.core for methods that operate over different submodules, and so on.

Paratii protocol

The paratii-protocol runs on top of libp2p so peers in the network can, for now, basically negotiate jobs with each other and exchange metadata. A typical message fragment looks like:

message Fragment {
optional bytes id = 1;
optional int32 type = 2;
optional bytes payload = 3;
optional bytes args = 4;
}

Fragments are wrapped up in an array with the sender’s PTI address and signature, thus constituting a message. It can, for example, require a transcoding job to the network, besides setting predefined prices and other parameters for fetching/providing data blocks.

Why is it useful?

  • Anyone can tap into web3-powered video from an own domain, and users don’t have to log in to enjoy the content they seek, being able to “play” a video or browse within the player “anonymously”. Once noticed the sign up option, you can just input an email and password, and became a registered user who’ll be able to withdraw + move around funds.
  • Cross-platform support: it works not only in Twitter, but also in Telegram (directly inside the mobile app) and in Facebook’s feed, through Open Graph (but only if posted as a comment, for now). You can also embed it in your Wordpress site with oEmbed, and there’s much more coming. See the embedding documentation here.
  • An in-player wallet: in order to take part in micropayment channels or interact with smart contracts, users must have tokens, and a place to store them. The Paratii player creates a local wallet, stores the encrypted keystore on the browser, and allows for small transactions to be performed semiautonomously. This is being incorporated into a safer multilayered scheme.

Next?

A plugin-oriented architecture

We’re refactoring the player codebase in order to have a lighter, more modular and easily extensible client, that uses Clappr’s media controls and related abstractions to play HLS streams over IPFS, while wallet functionality is still handled by our Meteor player and the paratii-lib. This will make it easier to plug in features like voice controls, custom subtitles, Chromecast support, and more.

Content uploading

Lively work going on the backend APIs for content uploading and ownership registration of videos. Once this is properly sorted out, focus shifts to having a friendly web-interface as an entry point to the system.

Browser-to-browser streaming performance optimisation

Development on the IPFS side of things never slows down. Despite huge advancements throughout this year, we’re still a tad far from achieving satisfactory load times and minimal delays. We look forward to collaborating further with the js-ipfs team and trimming down all the latency we can.

Join the community / team

We’re hiring: if you share the vision of an open market for stories that helps empowering creators, and have experience working with the stack explored above, don’t hesitate to get in touch. Also,👇

--

--

Paratii
Paratii

Decentralised video, before it went mainnet.