Livepeer CLI Setup
In the following guide, we will cover all the necessary steps to transcode a video into multiple bitrates using the Livepeer protocol, and then add it to Media Network to serve this processed content to end-users through the CDN.
Install the Livepeer Client
Install a binary release
Find the latest release for your platform on the releases page. Linux, Darwin (macOS) and Windows are supported.
# <RELEASE_VERSION> is the release version i.e. 0.5.14
# <YOUR_PLATFORM> is your platform i.e. linux, darwin, windows
wget https://github.com/livepeer/go-livepeer/releases/download/<RELEASE_VERSION>/livepeer-<YOUR PLATFORM>-amd64.tar.gz
tar -zxvf livepeer-<YOUR_PLATFORM>-amd64.tar.gz
mv livepeer-<YOUR_PLATFORM>-amd64/* /usr/local/bin/
Install with Docker
Docker images are pushed to DockerHub.
# <RELEASE_VERSION> is the release version i.e. 0.5.14
docker pull livepeer/go-livepeer:<RELEASE_VERSION>
To pull the latest pre-release version:
docker pull livepeer/go-livepeer:master
Install a binary pre-release
Binaries are produced from every GitHub commit and download links are available in the #builds channel of the Livepeer Discord server.
These binaries are produced from go-livepeer's CI process, shown in this diagram:
Build from source
System dependencies
Building livepeer
requires some system dependencies.
Linux (Ubuntu: 16.04 or 18.04):
apt-get update && apt-get -y install build-essential pkg-config autoconf gnutls-dev git curl
# To enable transcoding on Nvidia GPUs
apt-get -y install clang-8 clang-tools-8
Darwin (macOS):
brew update && brew install pkg-config autoconf gnutls
Windows:
The steps in this file can be used as a reference.
Go
Building livepeer
requires Go. Follow the
official Go installation instructions.
Build and install
Clone the repository:
git clone https://github.com/livepeer/go-livepeer.git
cd go-livepeerInstall
ffmpeg
dependencies:./install_ffmpeg.sh
Set build environment variables.
Set the
PKG_CONFIG_PATH
variable so thatpkg-config
can find theffmpeg
dependency files installed in step 2:# install_ffmpeg.sh stores ffmpeg dependency files in this directory by default
export PKG_CONFIG_PATH=~/compiled/lib/pkgconfigSet the
BUILD_TAGS
variable to enable mainnet support:export BUILD_TAGS=mainnet
# To build with support for only development networks and the Rinkeby test network
# export BUILD_TAGS=rinkeby
# To build with support for only development networks
# export BUILD_TAGS=devBuild and install
livepeer
:make
cp livepeer* /usr/local/bin
Build with Docker
Clone the repository:
git clone https://github.com/livepeer/go-livepeer.git
cd go-livepeerExport tags:
echo $(git describe --tags) > .git.describe
Build image:
docker build -t livepeerbinary:debian -f docker/Dockerfile.debian .