Scripts2026年7月5日·1 分钟阅读

ZLMediaKit — High-Performance Streaming Media Server in C++

A production-grade streaming media server supporting WebRTC, RTSP, RTMP, HLS, HTTP-FLV, SRT, and GB28181. Built in C++11 for low-latency live streaming, surveillance systems, and media distribution at scale.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
ZLMediaKit
直接安装命令
npx -y tokrepo@latest install 4abd729f-786d-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

ZLMediaKit is a high-performance, cross-platform streaming media server framework written in C++11. It provides a unified server that handles nearly every streaming protocol used in production — from traditional RTSP/RTMP to modern WebRTC and SRT — making it suitable for live broadcasting, video surveillance, and real-time communication systems.

What ZLMediaKit Does

  • Receives and distributes live streams across multiple protocols simultaneously
  • Converts between protocols on-the-fly (e.g., RTSP input to HLS/WebRTC output)
  • Records streams to MP4 or HLS segments for later playback
  • Provides a RESTful API for stream management and server control
  • Supports cluster deployment with origin-edge architecture

Architecture Overview

ZLMediaKit is built on an event-driven, multi-threaded networking framework (ZLToolKit). Each incoming stream is demuxed into a protocol-agnostic internal frame queue, then remuxed on demand into any output protocol requested by viewers. This design enables zero-copy protocol conversion. The server manages sessions via a thread-pool model with lock-free queues for high concurrency.

Self-Hosting & Configuration

  • Compile from source with CMake on Linux, macOS, or Windows
  • Docker images available for quick deployment
  • Configure listening ports and protocol options in config.ini
  • Enable HTTPS/WSS with your own TLS certificates
  • Set up hook URLs for stream publish/play authentication callbacks

Key Features

  • Multi-protocol: WebRTC, RTSP, RTMP, HLS, HTTP-FLV, SRT, GB28181 in one binary
  • Sub-second latency with WebRTC and HTTP-FLV delivery
  • On-the-fly transcoding-free protocol conversion
  • RESTful API for programmatic stream management
  • Cluster support with configurable origin-edge relay

Comparison with Similar Tools

  • Nginx-RTMP — RTMP-only module; ZLMediaKit handles many more protocols natively
  • SRS (Simple RTMP Server) — similar goals but ZLMediaKit adds GB28181 and broader WebRTC
  • Janus — WebRTC gateway focus; ZLMediaKit covers traditional streaming protocols too
  • MediaSoup — WebRTC SFU library; ZLMediaKit is a full-featured standalone server
  • Wowza — commercial streaming server; ZLMediaKit is free and open source

FAQ

Q: Can it handle thousands of concurrent viewers? A: Yes, its event-driven architecture and edge-relay support allow scaling to large audiences.

Q: Does it support recording? A: Yes, streams can be recorded as MP4 files or HLS segments with configurable retention.

Q: Is GPU transcoding supported? A: ZLMediaKit focuses on protocol conversion without transcoding. For transcoding, pair it with FFmpeg.

Q: What is GB28181 support? A: GB28181 is a Chinese national standard for video surveillance systems. ZLMediaKit can ingest and serve streams from GB28181-compliant cameras.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产