# L2 Quickstart: Running a full Livepeer stack on Arbitrum One Rinkeby testnet

**URL:** <https://forum.livepeer.org/t/l2-quickstart-running-a-full-livepeer-stack-on-arbitrum-one-rinkeby-testnet/1682>\
**Category:** Help: Getting Started\
**Created:** [February 4, 2022, 2:35pm UTC](https://forum.livepeer.org/t/l2-quickstart-running-a-full-livepeer-stack-on-arbitrum-one-rinkeby-testnet/1682 "2022-02-04T14:35:46Z")\
**Posts on this page:** 1\
**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:** [February 4, 2022, 2:35pm UTC](https://forum.livepeer.org/t/l2-quickstart-running-a-full-livepeer-stack-on-arbitrum-one-rinkeby-testnet/1682/1 "2022-02-04T14:35:46Z")

</div>

Here are some commands for running `livepeer` on `localhost`, connecting to Arbitrum One Rinkeby testnet (L2). 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

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

- latest version of `livepeer` (`0.5.27`) is installed and unzipped in `/home/ubuntu`, if not then:

## Run an Orchestrator/Transcoder

In a Terminal window, run:

```auto
./livepeer -orchestrator -transcoder \
        -network arbitrum-one-rinkeby \
        -ethUrl https://rinkeby.arbitrum.io/rpc \
        -pricePerUnit 100000 \
        -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 Arbitrum One Rinkeby network is 300 blocks (approx 1 hour).

- 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 arbitrum-one-rinkeby \
        -ethUrl https://rinkeby.arbitrum.io/rpc \
        -httpAddr :8936 \
        -cliAddr :7936 \
        -rtmpAddr :1936 \
        -orchAddr 127.0.0.1:8935 \
        -ethPassword password \
        -transcodingOptions P240p30fps16x9,P144p30fps16x9 \
        -pixelsPerUnit 1 \
        -maxTicketEV 1000000000000000 \
        -v 99

```

- wait until the process reports `CLI server listening` before continuing.

## 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. Wait until the process reports `LPMS Server listening` before continuing.

## Start streaming

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

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

```

- This will publish a `640x360` (360p) 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 `426x240` (240p) and `256x144` (144p).

- Also observe the O/T receiving Probabilistic Micropayment tickets, and occasionally redeeming a winning ticket by calling an onchain transaction (see below for more information).

## 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=640x360
test_source/source.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 will play the `144p` rendition, and should 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` under “Delegator Stats”.

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 [Arbiscan Testnet explorer](https://testnet.arbiscan.io) or [Arbitrum Rinkeby explorer](https://rinkeby-explorer.arbitrum.io/).

## Cleaning Up

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