Understanding Livepeer in One Article: A Decentralized, Highly Scalable Real-Time Streaming Transmission Protocol

CryptoYCTech
2022-01-19 19:48:06
Collection
Livepeer itself is not a video platform, but a technical protocol, primarily a solution for application developers, which is a protocol for transcoding videos before users play them.

Source: CryptoYC Tech

Author: Uzer

Livepeer is a decentralized video transcoding network built on the Ethereum blockchain, aimed at providing a decentralized and highly scalable real-time streaming protocol, significantly reducing the costs of video streaming applications.

Founded in 2017, Livepeer seeks to create infrastructure in the video domain. LPT is the native token of the Livepeer ecosystem, primarily used to incentivize ecosystem users and empower the ecosystem. According to Coin Xiaobao's market data, LPT is currently not listed on major exchanges and can be traded on Gate, Uniswap, MXC, and Hoo exchanges.
Livepeer itself is not a video platform, but a technical protocol, mainly a solution for application developers, which is a protocol for transcoding videos before users play them.
In simple terms, Livepeer is a live transcoding platform (as shown in the figure below), they do not provide live streaming or videos, but perform video transcoding using miners' GPUs and bandwidth, thereby reducing transcoding costs.

image

Fig. 1: Livepeer Workflow

Image source: https://github.com/livepeer/wiki/blob/master/WHITEPAPER.md

Why Livepeer is Needed

At its core, this question is why transcoding needs blockchain technology. This is because for enterprises, the cost of video streaming applications is enormous, one reason being the cost of transcoding. For example, with Alibaba Cloud, the average transcoding cost for a high-definition live video can reach up to 40 yuan per hour.

For enterprises, this alone can lead to annual expenses of hundreds of millions of yuan. Therefore, if a technological transformation of video can be achieved from the ground up, it will significantly reduce usage costs.

Livepeer is designed to solve the above problems. Through a proprietary "transcoder," users can easily contribute their computing resources to the network and earn LPT token rewards. Bitcoin miners mine through computing power, while Livepeer users mine through GPU and bandwidth resources; these individuals are also known as video miners.

For developers, using Livepeer's transcoding network requires payment of a certain fee, similar to how we pay for Alibaba Cloud, but this fee must be paid in LPT tokens, which will be rewarded to video miners.

What Livepeer Achieves

The existing decentralized development stack (web3) includes some layer solutions required for live video platforms, such as file transfer and payment, but currently lacks solutions for capturing and interfacing live video, transcoding and processing, and service layers.

To address this, Livepeer has launched the Livepeer Media Server (LPMS) ------an open-source implementation of a media server that provides all the live video-specific features needed for DApp developers and existing broadcasters to build live streaming capabilities into their applications.

As an independent application, any developer can build a real-time application on top of LPMS, but it remains centralized and needs to be scaled through traditional means.

However, when every node on the Livepeer network runs LPMS, the economic incentives of the protocol ensure that these nodes will contribute their processing power and bandwidth to transcode and distribute live video, creating a self-scaling, pay-as-you-go service network for developers, who can simply send their live streams to the network and abstract away the implementation details of scaling, payment, and media hosting.

Livepeer Protocol

The Livepeer protocol defines how various participants in the live streaming ecosystem can participate in a secure and economically reasonable manner. The two main areas that the protocol needs to address are distributing live video from the source to a large number of consumers in a high-performance and scalable way, and encouraging participation in the network through secure and game-theoretic economic incentives. At a high level, the protocol aims to:

  • Allow any node to send live video to the network and optionally pay to have it transcoded into various formats and bitrates.

  • Allow any node to request video from the network.

  • Allow participants to contribute their processing power and bandwidth to provide video transcoding and distribution services and receive corresponding compensation.

In a decentralized network, participants are rewarded based on the amount of work they contribute, and the two major challenges that need to be addressed are ensuring security:

  • Can the work done by nodes be verified as correctly completed?

  • Are nodes rewarded for real work that contributes value to the network, rather than for fraudulent work done to unfairly obtain token distributions?

The Livepeer protocol aims to address the issues of work verification and preventing fraudulent work, while also providing a solution for network auto-scaling and governance over the evolution of the protocol over time.

image

Fig. 2: Specific Livepeer Protocol

Image source: https://github.com/livepeer/wiki/blob/master/WHITEPAPER.md

Core Unit

The core unit of media in Livepeer is what we call a segment. Each segment in the Livepeer network is unique and contains cryptographic evidence to verify that the broadcaster intends to use this specific data for this specific segment. Each stream consists of many consecutive segments, each containing a sequence number to identify their correct order. A segment contains the following fields: stream ID, sequence number, data payload, data hash, broadcaster signature.

Protocol Roles

Livepeer nodes are any computers running Livepeer software. Nodes are further divided into different roles:

  • Broadcaster: Livepeer nodes publish the original stream.

  • Transcoder: Livepeer nodes perform the work of transcoding the stream into another codec, bitrate, or packaging format.

  • Relay Node: Livepeer nodes participate in the distribution of live video and the transmission of protocol messages, but do not necessarily perform any transcoding.

  • Consumer: Livepeer nodes request streams, which may be viewed or provided to users of their applications or DApps through a gateway.

  • Swarm: A content-addressed storage platform. Through the SWEAR protocol, it ensures that data is temporarily available during the verification process.

  • Livepeer Smart Contracts: Smart contracts running on the Ethereum network.

  • Truebit: A black-box verification protocol that guarantees the correctness of on-chain computations (costly).

Consensus

Livepeer has a two-layer consensus system. The LPT ledger and transactions are protected by the underlying blockchain, such as Ethereum. Any transfer of LPT tokens or any transaction in the system can be considered confirmed with the same security as the underlying proof-of-work or proof-of-stake blockchain. However, the second layer determines the distribution of newly generated LPT.

This is managed by Livepeer smart contracts and involves various participants in the protocol. While consensus is not necessary, the protocol defines the rules of participation regarding the acceptance and verification of previous blocks and the conditions under which participants are penalized (slashed) for failing to fulfill their duties.

Inspired by systems such as Bitshares, Steem, Tendermint, and Casper, the second-level consensus governing the distribution of newly generated tokens is based on Delegated Proof of Stake (DPOS). Validators in the network are represented by transcoders.

Any user can delegate their stake to a transcoder, who must perform transcoding work in the network, participate in the work verification protocol, and call functions on-chain at specific intervals to verify this work. The protocol allocates fees and newly generated tokens and slashes the stakes of bad actors. The verification results will be recorded on-chain through Truebit after verification, leaving no room for disputes between broadcasters and transcoders.

Work Verification

To allocate fees to transcoders claiming to have performed transcoding jobs, the protocol must be able to determine with high probability that the job has indeed been correctly executed. To this end, Livepeer extends the research and utilization of the Truebit protocol.

Truebit works by having one participant (the solver) perform the actual work, in this case, transcoding, and then having other participants (the validators) verify the work to detect errors, mistakes, or cheating. The task is broken down into very small steps, and validators check the solver's work to find the first step that differs from their expectations.

Then, it only requires executing this very small step on-chain through a smart contract (the judge), who can determine which party correctly completed the work. Economic incentives, including mandatory penalties for errors, ensure that cheating or erroneous challenges are unprofitable, while performing the verification work is profitable.

The downside of the protocol is that the cost of verifying all work is 5 to 50 times the cost of the original work. Livepeer uses Truebit as a black box to verify segments, but it avoids having to pay very high verification fees by only randomly verifying a small portion of segments and using slashing in case of verification failure.

Token

Livepeer Token (LPT) is the protocol token of the Livepeer network. Token holders can bond their tokens to transcoding jobs on their behalf and earn new tokens and rewards daily. The value of Livepeer lies in the engineering during development, allowing developers to add live and on-demand videos.

Content creators can have a diverse range of live content, including videos, games, coding, entertainment, and educational courses; Livepeer nodes can create live content and earn LPT through transcoding video formats; live streamers can perform quality control while managing infrastructure costs.

Livepeer Token (LPT) is the protocol token of the Livepeer network. However, it is not a medium for exchanging tokens. Live stream publishers use Ether (ETH) to stream videos on the network. Nodes contributing processing and bandwidth receive ETH from the fees charged by live stream publishers. LPT is a token that participants want to use to perform work on the network, coordinating how work is distributed across the network and providing security that the work will be completed honestly and correctly.

LPT serves the following purposes: it acts as a coordination mechanism in a delegated proof-of-stake system where stakes are delegated to transcoders (or validators) participating in the protocol to transcode videos and verify work. Tokens and potential slashing due to protocol violations are necessary to protect the network from attacks.

It functions as a coordination mechanism, proportionally distributing work across the network based on the amount of staked and delegated tokens. It is a specific account unit that forms the basis of a departmental currency concept applicable to additional features to be introduced in the future. Services such as DVR, closed captions, ad insertion/monetization, and analytics can all be integrated into the Livepeer ecosystem, potentially leveraging the security provided by STPLPT.

Mining

Participating in LPT mining is also very simple; you only need a computer to run a node to mine. Nodes primarily use GPUs to transcode videos, thereby earning token incentives. Once users start mining, the Livepeer network assigns tasks to the users' GPUs, and upon completing the transcoding, they receive token rewards.

Unlike Bitcoin and Ethereum mining, Livepeer mining has lower hardware requirements, and to prevent damage to the graphics card, users can reduce the hash rate to a very low level. Mining requires a 24/7 connection to the network, which has high network connectivity requirements.

Compared to mining, a quicker method is staking mining. Token holders can stake LPT to the Livepeer network, becoming orchestrators and earning rewards.

Conclusion

This article synthesizes the Livepeer white paper and external evaluations, providing a higher-level introduction to Livepeer. The author has certain doubts regarding the security aspect and practicality of Livepeer. In terms of security, whether the transcoder's provision of a merkle root as work verification is easily attackable and sufficient is a concern.

Regarding practicality, does the work verification of the Truebit protocol slow down the overall efficiency of Livepeer, leading to insufficient TPS during scaling? These are merely some superficial doubts from the author; aside from that, Livepeer is indeed a good idea and option for reducing the costs of video transcoding.

Related tags
ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
ChainCatcher Building the Web3 world with innovators