4EVERLAND + Livepeer
Last updated
Last updated
Livepeer is an Ethereum-based protocol that distributes video transcoding work throughout its decentralized network. The protocol aims to provide cost efficient, secure, and reliable infrastructure that can handle today's high demand for video streaming. For projects involving both live and recorded video, transcoded video from IPFS or Arweave can be easily played using livepeer.js
, so the combination of Livepeer and 4EVERLAND storage allows you to optimise video delivery for each unique client.
The Interplanetary File System (IPFS) is a distributed file storage protocol that allows computers all over the globe to store and serve files as part of a giant peer-to-peer network. Ensure you have secure and verifiable access to exactly what you are requesting, regardless of where the data is physically stored.Arweave is a Web3 protocol that offers data storage on a decentralized network of devices. It has a set of nodes that are incentivised to store data permanently and access the content stored on the network via the Arweave gateway.
Transcoding (which is a process of decoding, reformatting, and re-encoding files) takes source footage of various types and recodes it into a single video codec or file format. More specifically, transcoding is the process of taking an encoded digital media file and unencoding it to change the file size (transize) or bitrate (transrate).Diversifying bitrates and resolutions makes it possible to not only reach more devices, but also stream more effectively (and at the highest possible quality) across those devices. Your stream (live or otherwise) will no longer be at the mercy of heavy buffering caused by unexpected dips in bandwidth.The following example uses the player's built-in functionality to transcode IPFS/Arweave content without any additional configuration.
To get started, you'll need to create an API key first.If you're working with React, you can install the Livepeer React SDK with:
You can upload your video files to IPFS/Arweave via 4EVERLAND in a number of optional ways:
4EVERLAND API (S3-Compatile API, Pinning Services API)
Various tools: https://docs.4everland.org/storage/bucket/bucket-tools
-
Using the <Player>
tag from the Livepeer SDK, embed an IPFS URL or an Arweave URL. Add text input for an IPFS CID/AR Hash or an IPFS/Arweave HTTP gateway URL as well.
The first time Livepeer encounters a URL, it will transcode the file and the transcoded version will be stored in the account tied to your API key. The transcoded file will be retained as long as your account is active.
The Player
component must have access to a Livepeer client with a valid API key in order to successfully transcode your video. The provider pattern and the LivepeerConfig
component are recommended.For example, to make the client available to all child components in your app, you would structure your index.js
file as follows.
That's it! You have just used a few lines of code to combine 4EVERLAND+Livepeeer into a caching and transcoding layer on IPFS and Arweave.