Building and running a pre-release Livepeer node

Livepeer is pre-release software, but you can still build and run a local node and connect to the toynet network to start broadcasting and consuming live video. The instructions are documented in the go-livepeer repo on Github, but are summarized here.

(Note: these are developer facing instructions. As early pre-release software, please run at your own risk. It is not recommended that you run livepeer on a machine where you are storing sensitive ethereum private keys, since it interacts with your Ethereum data directory by default)

Setup

Setup your Go programming environment if you haven’t.

Install ffmpeg.
On OSX: brew install ffmpeg
On linux: apt-get install ffmpeg

Clone and build Livepeer
git clone https://github.com/livepeer/go-livepeer.org
cd go-livepeer
go get ./...
go install ./cmd/livepeer

Run Livepeer

For now, the transcoding library is started separately for debugging purposes. Start it from the go-livepeer/ directory, by typing:

./bin/srs -c srs.conf

Livepeer should now be installed in your path. Run Livepeer by typing

livepeer

This will create an account and ask you for a password. It will join the toy network, and start an RTMP interface on rtmp://localhost:1935. It will also launch a web based interface for starting a live stream at http://localhost:8935.

Start a stream

Use the web interface listed above, or use broadcasting software like OBS to start streaming to rtmp://localhost:1935/movie.

The console will output a streamID like: 049148c7d93947ccb42701c87f86e3b9413670ede10bde650521f5c6d0c8c6b95afced01b17b5d227cdec6b26d2e73fe0670741aeb55874baff81ac77a5952e6

Any other node can consume this stream by typing:

livepeer stream 049148c7d93947ccb42701c87f86e3b9413670ede10bde650521f5c6d0c8c6b95afced01b17b5d227cdec6b26d2e73fe0670741aeb55874baff81ac77a5952e6

Or they can consume the stream in the web player at http://localhost:8935.

(To demo this you can run two or more nodes locally. See github for documentation on how to start a second node on different ports.)

These instructions will evolve over time as Livepeer becomes more mature and moves towards alpha and beta releases. Let us know what questions you have as you try to build and run go-livepeer.

1 Like

Here’s an example of how to run a second node locally on a different port, bzzport, and rtmp port. The second data directory will force creation of a second account address/pw:

livepeer --datadir ./datadir2 --port 30400 --bzzport 8502 --rtmp 1936

At this point you can broadcast to rtmp://localhost:1936/movie and livepeer stream <streamID> will stream from the node running on RTMP port 1935.

The nodes should discover one another via the toynet. If they do not, you can take the enode address (printed out on console) of the first node, and add it to the 2nd node via:

geth --exec "admin.addPeer(\"<enode address>\")" attach ./datadir2/livepeernet/bzzd.ipc

For example:

geth --exec "admin.addPeer(\"enode://277b95e177e7a91b5606fad8d470d90bd877aeb486b543ed7863b415b65328586a57b08f4440508bcaace3cebce25071559ddb247c35c5d95ccfd559639fcd70@[::]:30403\")" attach ./21/livepeernet/bzzd.ipc

1 Like