Monitor Livepeer livestream ingest health, bitrate, and segment delivery using the Studio API and webhooks.
Stream health monitoring covers two concerns: lifecycle events (is the stream active or idle?) and ingest quality (is the bitrate stable? are segments being delivered?). Use webhooks for the former and API polling for the latter.
The stream object includes ingest metrics when the stream is active:
const response = await client.stream.get(streamId);const stream = response.stream;// Available when stream.isActive === trueconsole.log('Video codec:', stream.videoSpec?.codec); // e.g. "h264"console.log('Video bitrate:', stream.videoSpec?.bitrate); // bits per secondconsole.log('Frame rate:', stream.videoSpec?.fps); // frames per secondconsole.log('Resolution:', `${stream.videoSpec?.width}x${stream.videoSpec?.height}`);
Low or unstable bitrate values indicate encoder problems (network congestion, CPU throttling, or misconfigured output settings) rather than Livepeer issues.