Configure Dual AI & Video Services on a Livepeer Gateway
Page is under construction. Feedback Welcome!
This is way too long
Show TODO
TODO: - [ ] Verify flags and options are correct - [ ] Decide on more
streamlined layour or steps flow - [ ] (fixme) #Configuration - [ ] (fixme)
##Deployment - [ ] Move Example to Guides & Resources
The Livepeer Gateway supports a dual setup configuration that enables a single node to handle both
traditional video transcoding and AI processing workloads simultaneously.This unified architecture reduces infrastructure complexity while providing
comprehensive media processing capabilities.
The Gateway’s dual capability is enabled by its modular architecture, where different
managers handle specific workflows while sharing common infrastructure for media ingestion,
payment processing, and result delivery.The LivepeerNode struct contains fields for both traditional transcoding (Transcoder, TranscoderManager)
and AI processing (AIWorker, AIWorkerManager) livepeernode.goThe gateway determines the processing type based on the request:
Standard transcoding requests go through the BroadcastSessionsManager
AI requests go through the AISessionManager with AI-specific authentication and pipeline selection ai_auth.go
The gateway initializes with two distinct session managers:
Copy
Ask AI
// Traditional transcoding session managersessManager = NewSessionManager(ctx, s.LivepeerNode, params)
Copy
Ask AI
// AI processing session managerAISessionManager: NewAISessionManager(lpNode, AISessionManagerTTL)
To configure a gateway to handle both video transcoding and AI processing, you need
to set the appropriate flags and options when starting the livepeer binary.Essential FlagsTo enable dual setup, configure the gateway with the following flags:
Note, if the transcodingOptions.json file is not provided, the gateway will use the default transcoding profiles -transcodingOptions=P240p30fps16x9,P360p30fps16x9.
Transcoding flags
Copy
Ask AI
# -transcodingOptions=P240p30fps16x9,P360p30fps16x9-transcodingOptions=${env:HOME}/.lpData/cfg/transcodingOptions.json-maxSessions=10-nvidia=all # or specific GPU IDs
For production deployment with blockchain integrationYou will need an ETH account with funds to pay for transcoding and AI processing and set the following environment variables:
$ETH_SECRET$ETH_ACCT_ADDR
On-Chain Gateway Deployment with dual capabilities