Passer au contenu principal
Ugh I hate this page. I think its best to move everything to quickstart and have this be a comprehensive flag overview

TL;DR Configuration

Si vous voulez simplement un passerelle vidéo fonctionnelle, utilisez la commande ci-dessous :
Replace with your locally running orchestrator http address.
Off-Chain Video Gateway
livepeer -gateway \
  -network offchain \
  # Minimum required video flags
  -rtmpAddr=0.0.0.0:1935 \
  -httpAddr=0.0.0.0:8935 \
  -transcodingOptions=P240p30fps16x9,P360p30fps16x9 \
  # You will need to add your local orchestrator address if you are running off-chain
  -orchAddr=<ORCHESTRATOR_ADDRESSES> #comma separated list of orchestrator addresses
  # Example: -orchAddr=http://192.168.1.100:8935,http://192.168.1.101:8935
  # You can also use a JSON file: -orchAddr=/path/to/orchestrators/orchestrators-portal.json
/snippets/assets/logos/Livepeer-Logo-Symbol-Theme.svg
OVERVIEW
/snippets/assets/logos/Livepeer-Logo-Symbol-Theme.svg
Passerelles pour la transcodage vidéo Dans le transcodage vidéo traditionnel, le Gateway ingère les flux vidéo viaRTMP ouHTTP, segments them, and distributes transcoding work to Orchestrators

Code Reference

go-livepeer/core/livepeernode.go

Indicateurs de configuration essentiels

Indicateurs requis

-gateway
boolean
défaut:"false"
requis
Enable Gateway mode
-network
string
défaut:"offchain"
Set to the blockchain network for production gateways arbitrum-one-mainnet
-orchAddr
string
défaut:"none"
requis
Set to http://<ORCHESTRATOR_IP>:<PORT> to connect to orchestrators

Configuration du réseau

-rtmpAddr
string
défaut:"127.0.0.1:1935"
Set to 0.0.0.0:1935 to allow external RTMP connections
-httpAddr
string
défaut:"127.0.0.1:8935"
Set to 0.0.0.0:8935 to allow external HLS/API access

Configuration de la transcoding

-transcodingOptions
string
défaut:"P240p30fps16x9,P360p30fps16x9"
Set to path/to/transcodingOptions.json to use a custom transcoding configuration

Indicateurs supplémentaires sur la chaîne

Ajoutez ces indicateurs pour la configuration sur la chaîne. Voir On-Chain Setup Guide pour plus de détails.
-network
string
défaut:"offchain"
-maxPricePerUnit
int
défaut:"0"
-ethUrl
string
défaut:"none"
requis
-ethAcctAddr
string
défaut:"leave empty to auto-create"
-ethPassword
string
défaut:"leave empty to auto-create"
-ethKeystorePath
string
défaut:"leave empty to auto-create"
/snippets/assets/logos/Livepeer-Logo-Symbol-Theme.svg
FULL CONFIGURATION GUIDE
/snippets/assets/logos/Livepeer-Logo-Symbol-Theme.svg

Guide complet de configuration

Méthodes de configuration

Vous avez trois façons de configurer votre passerelle Livepeer après l’installation :
  • Indicateurs de ligne de commande (les plus courants)
  • Variables d’environnement (précédées de LP_)
  • Fichier de configuration (format clé-valeur en texte brut)

Exemples de configuration

Les exemples ci-dessous montrent les méthodes de configuration les plus courantes.
.
livepeer -gateway \
  -network offchain \
  -transcodingOptions=${env:HOME}/.lpData/offchain/transcodingOptions.json \
  -orchAddr=0.0.0.0:8935 \
  -httpAddr=0.0.0.0:9935 \
  -v=6
Create docker-compose.yml
# 1. Create a basic docker-compose.yml
cat > docker-compose.yml << EOF
version: '3.9'
services:
  gateway:
    image: livepeer/go-livepeer:master
    ports:
      - 1935:1935  # RTMP ingest
      - 8935:8935  # HLS/API
    volumes:
      - gateway-data:/root/.lpData
    command: |
      -gateway
      -network arbitrum-one-mainnet
      -rtmpAddr=0.0.0.0:1935
      -httpAddr=0.0.0.0:8935
      -orchAddr=https://orchestrator.example.com:8935
      -transcodingOptions=P240p30fps16x9,P360p30fps16x9,P720p30fps16x9
      -ethUrl <YOUR_RPC_URL> \
      -ethAcctAddr <YOUR_ETH_ADDRESS> \
      -ethPassword <YOUR_PASSWORD> \
      -ethKeystorePath <KEYSTORE_PATH> \
      -maxPricePerUnit 1000

volumes:
  gateway-data:
EOF
Start the Gateway
Start the gateway
# 2. Start the gateway
docker-compose up -d
livepeer -gateway \
  -network arbitrum-one-mainnet \
  -ethUrl=<YOUR_RPC_URL> \
  -ethAcctAddr=<YOUR_ETH_ADDRESS> \
  -ethPassword=<YOUR_PASSWORD> \
  -ethKeystorePath=<KEYSTORE_PATH> \
  -maxPricePerUnit=1000 \
  -orchAddr=<ORCHESTRATOR_ADDRESSES> \
  -monitor=true

Options de transcodage JSON

Livepeer prend en charge les fichiers de configuration JSON pour les options de transcodage via le -transcodingOptions drapeau. Le fichier transcodingOptions.json vous permet de contrôler précisément l’échelle de codage. Ce fichier est un fichier de configuration personnalisé contenant un tableau d’objets de rendu qui définit quels rendus (résolutions + débits) votre Gateway produira pour chaque flux entrant. Il remplace l’échelle intégrée par défaut (par exemple, P240p30fps16x9, etc.).
transcodingOptions.json example
[
  {
    // required
    "bitrate": 1600000,
    "width": 854,
    "height": 480,
    // optional
    "name": "480p0",
    "fps": 0,
    "profile": "h264constrainedhigh",
    "gop": "1"
  },
  {
    // required
    "bitrate": 3000000,
    "width": 1280,
    "height": 720,
    // optional
    "name": "720p0",
    "fps": 0,
    "profile": "h264constrainedhigh",
    "gop": "1"
  },
  {
    // required
    "bitrate": 6500000,
    "width": 1920,
    "height": 1080,
    // optional
    "name": "1080p0",
    "fps": 0,
    "profile": "h264constrainedhigh",
    "gop": "1"
  }
]

Remarques

  • La configuration JSON s’applique uniquement aux options de transcodage, et non aux autres indicateurs de passerelle
  • Le fichier doit contenir un JSON valide avec la structure spécifiée
  • Tous les champs sont facultatifs, sauf width, height et bitrate
  • Vous pouvez mélanger la configuration JSON avec d’autres indicateurs de ligne de commande

Next Step: Pricing Configuration

Configure pricing for your gateway.

Référence complète des indicateurs de configuration

Modifications essentielles

OptionRecommended ChangeWhy

Configuration du réseau

OptionDefaultRecommendedDescription

Paramètres de transcodage

OptionDefaultWhen to ChangeDescription

Considérations en production

OptionRecommended SettingUse Case
Last modified on March 1, 2026