# DEPRECATED Quickstart: Running a full Livepeer stack on a Testnet (Rinkeby)

**URL:** <https://forum.livepeer.org/t/deprecated-quickstart-running-a-full-livepeer-stack-on-a-testnet-rinkeby/1660>\
**Category:** Help: Getting Started\
**Created:** [January 14, 2022, 10:35am UTC](https://forum.livepeer.org/t/deprecated-quickstart-running-a-full-livepeer-stack-on-a-testnet-rinkeby/1660 "2022-01-14T10:35:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrishobcroft](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.livepeer.org/chrishobcroft/32/1340_2.png) [@chrishobcroft](https://forum.livepeer.org/u/chrishobcroft)\
**Post date:** [January 14, 2022, 10:35am UTC](https://forum.livepeer.org/t/deprecated-quickstart-running-a-full-livepeer-stack-on-a-testnet-rinkeby/1660/1 "2022-01-14T10:35:09Z")

</div>

DEPRECATED: Since Livepeer Protocol migration to Arbitrum One, these instructions are no longer functional. For equivalent instructions using L2, see [L2 Quickstart: Running a full Livepeer stack on Arbitrum One Rinkeby testnet](https://forum.livepeer.org/t/l2-quickstart-running-a-full-livepeer-stack-on-arbitrum-one-rinkeby-testnet/1682)

* * *

Here are some commands for running `livepeer` on `localhost`, connecting to Rinkeby testnet. They are optimised for linux, but can be adapted for mac and windows.

For beginners, this will set up a minimum viable stack of Livepeer’s video instructure software on a single host, and demonstrate a) a livestreaming server, b) live video transcoding, and c) probabilistic micropayments.

For experienced users of Livepeer, this is a good opportunity to learn a little bit about the role of `-broadcaster` in Livepeer network, which can be useful in onboarding new Broadcasters in the future 🙂

If you found this useful, or have any issues, please leave a comment below.

## Assumptions

- you have an RPC endpoint from infura or alchemy
  - running these instructions against a local geth node is currently not possible due to [this issue](https://github.com/livepeer/go-livepeer/issues/2184).

- `ffmpeg` is installed on your localhost, if not then:
  - `sudo apt install ffmpeg`

- latest version of `livepeer` (`0.5.27`) is installed and unzipped in `/home/ubuntu`, if not then:
  - `wget https://github.com/livepeer/go-livepeer/releases/download/v0.5.27/livepeer-linux-amd64.tar.gz`
  - `tar -xzf livepeer-linux-amd64.tar.gz`

## Run an Orchestrator/Transcoder

In a Terminal window, run:

```auto
./livepeer -orchestrator -transcoder \
        -network rinkeby \
        -ethUrl {your-infura/alchemy-endpoint} \
        -pricePerUnit 1000000 \
        -serviceAddr 127.0.0.1:8935 \
        -ethPassword password \
        -v 99

```

Note: you will need to enter the password twice as `password` when you first run this process.

## Configure the O/T

- In a new Terminal window, run `./livepeer_cli`

- Make a note of the `Orchestrator Account` from the `NODE STATS`.

- In a browser, request testnet ETH from:

- In `livepeer_cli`

- This will trigger four transactions to be signed and published. Wait for the final transaction (`setServiceURI`) to be confirmed before continuing.

- Restart the O process. The Orchestrator is now ready to start doing work.

- NOTE: You will have to wait until the new “round” starts before the O can redeem winning tickets. The number of the current round is found in the `1. Get node status` option in `livepeer_cli`. Each round of livepeer protocol on Rinkeby is 300 blocks.

- While you wait for a new round to start, you can set up a Broadcaster.

## Run a Broadcaster

In a new Terminal window, run:

```auto
./livepeer -broadcaster \
        -network rinkeby \
        -ethUrl {your-infura/alchemy-endpoint} \
        -httpAddr :8936 \
        -cliAddr :7936 \
        -rtmpAddr :1936 \
        -orchAddr 127.0.0.1:8935 \
        -ethPassword password \
        -transcodingOptions P720p30fps16x9,P576p30fps16x9,P360p30fps16x9,P240p30fps16x9,P144p30fps16x9 \
        -pixelsPerUnit 1 \
        -maxTicketEV 1000000000000000 \
        -v 99

```

## Configure the B

- In a new Terminal window, run `./livepeer_cli -http 7936`

- Run command `11. Invoke "deposit broadcasting funds" (ETH)`

- Restart the Broadcaster process.

## Start streaming

- In a new Terminal window, run the following command:

```auto
ffmpeg -re -f lavfi \
           -i testsrc=size=1920x1080:rate=30,format=yuv420p \
           -f lavfi \
           -i sine \
           -c:v libx264 \
           -b:v 10000k \
           -x264-params keyint=60 \
           -c:a aac \
           -f flv rtmp://127.0.0.1:1936/test_source

```

- This will publish a `1920x1080` (1080p = FullHD) test stream into the Broadcaster at 30fps.

- Observe the B starting to receive and serve a new livestream.

- Observe the O/T starting to transcode multiple renditions of the stream (into `1280x720` (720p = Standard HD), `1024x576` (576p), `640x360` (360p), `426x240` (240p) and `256x144` (144p).

- Also observe the O/T receiving Probabilistic Micropayment tickets.

## Validate output streams

- In a new Terminal window, run:

```auto
curl http://localhost:8936/stream/test_source.m3u8

```

This should return the following, showing all available renditions of the livestream:

```auto
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=4000000,RESOLUTION=1920x1080
test_source/source.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=4000000,RESOLUTION=1280x720
test_source/P720p30fps16x9.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=1500000,RESOLUTION=1024x576
test_source/P576p30fps16x9.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=1200000,RESOLUTION=640x360
test_source/P360p30fps16x9.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=600000,RESOLUTION=426x240
test_source/P240p30fps16x9.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=400000,RESOLUTION=256x144
test_source/P144p30fps16x9.m3u8

```

- To playback the smallest rendition (`144p`), run the following:

```auto
ffplay http://localhost:8936/stream/test_source/P144p30fps16x9.m3u8

```

This should play like this:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/livepeer/original/1X/db9caa6e804f7d4accdc8bd6b8061323ae3681e7.png)

## Probabilistic Micropayments

When the Orchestrator receives a winning ticket, it will call the `redeemWinningTicket` function onchain. This will claim the ticket’s `faceValue`, and add it to the `Pending Fees`. `Pending Fees` can be verified in `livepeer_cli`.

In order to withdraw these `Pending Fees`, a user can call `9. Invoke "withdraw fees" (ETH)`. This will withdraw fees to the user’s wallet.

All transactions called by the node can be observed on [Rinkeby Etherscan](http://rinkeby.etherscan.io).

## Cleaning Up

If you have finished using the Orchestrator, you can tidy up by calling `6. Invoke "unbond"` in `livepeer_cli`.

## Easter egg

You can import the JSON keystore file, found in `~/.lpData`, into MetaMask, and use that to manage your account on Rinkeby network. Look for “Import Account” and “Select Type” as “JSON file”. Use the same `password` as above. Works on mainnet too 😉

---

<div class="post-metadata">

**Author:** ![justin](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@justin](https://forum.livepeer.org/u/justin)\
**Post date:** [January 18, 2022, 10:58am UTC](https://forum.livepeer.org/t/deprecated-quickstart-running-a-full-livepeer-stack-on-a-testnet-rinkeby/1660/2 "2022-01-18T10:58:47Z")

</div>

Awesome Tutorial. exactly what i needed. thank you!

---

<div class="post-metadata">

**Author:** ![chrishobcroft](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.livepeer.org/chrishobcroft/32/1340_2.png) [@chrishobcroft](https://forum.livepeer.org/u/chrishobcroft)\
**Post date:** [March 30, 2022, 3:25pm UTC](https://forum.livepeer.org/t/deprecated-quickstart-running-a-full-livepeer-stack-on-a-testnet-rinkeby/1660/3 "2022-03-30T15:25:51Z")

</div>

This guide is now deprecated.

Since Livepeer Protocol migration to Arbitrum One, these instructions are no longer functional.

For equivalent instructions using L2, see [L2 Quickstart: Running a full Livepeer stack on Arbitrum One Rinkeby testnet](https://forum.livepeer.org/t/l2-quickstart-running-a-full-livepeer-stack-on-arbitrum-one-rinkeby-testnet/1682)
