ランキングに戻る

q191201771/lal

Gopengrl.com/lal

🔥 Golang audio/video live streaming lib/client/server. support RTMP, RTSP(RTP/RTCP), HLS, HTTP[S]/WebSocket-FLV/TS, GB28181, H264/H265/AAC/G711/OPUS, relay, cluster, record, HTTP Notify/API/UI. 直播

rtmpaach265-hevch264-avchlsm3u8rtsprtprtcphttp-tslalhttps-flv
スター成長
スター
3k
フォーク
495
週間成長
Issue
39
1k2k3k
2019年4月2021年9月2024年2月2026年7月
成果物Go Modulesgo get github.com/q191201771/lal
README

LAL

Platform Release CI goreportcard wechat qqgroup

中文文档

LAL is an audio/video live streaming broadcast server written in Go. It's sort of like nginx-rtmp-module, but easier to use and with more features, e.g RTMP, RTSP(RTP/RTCP), HLS, HTTP[S]/WebSocket[s]-FLV/TS, GB28181, H264/H265/AAC/G711/OPUS, relay, cluster, record, HTTP API/Notify/WebUI, GOP cache.

Install

There are 3 ways of installing lal:

1. Building from source

First, make sure that Go version >= 1.18

For Linux/macOS user:

$git clone https://github.com/q191201771/lal.git
$cd lal
$make build

Then all binaries go into the ./bin/ directory. That's it.

For an experienced gopher(and Windows user), the only thing you should be concern is that the main function is under the ./app/lalserver directory. So you can also:

$git clone https://github.com/q191201771/lal.git
$cd lal/app/lalserver
$go build

Or using whatever IDEs you'd like.

So far, the only direct and indirect dependency of lal is naza(A basic Go utility library) which is also written by myself. This leads to less dependency or version manager issues.

2. Prebuilt binaries

Prebuilt binaries for Linux, macOS(Darwin), Windows are available in the lal github releases page. Naturally, using the latest release binary is the recommended way. The naming format is lal_<version>_<platform>.zip, e.g. lal_v0.20.0_linux.zip

LAL could also be built from the source wherever the Go compiler toolchain can run, e.g. for other architectures including arm32 and mipsle which have been tested by the community.

3. Docker

option 1, using prebuilt image at docker hub, so just run:

$docker run -it -p 1935:1935 -p 8080:8080 -p 4433:4433 -p 5544:5544 -p 8083:8083 -p 8084:8084 -p 30000-30100:30000-30100/udp q191201771/lal /lal/bin/lalserver -c /lal/conf/lalserver.conf.json

option 2, build from local source with Dockerfile, and run:

$git clone https://github.com/q191201771/lal.git
$cd lal
$docker build -t lal .
$docker run -it -p 1935:1935 -p 8080:8080 -p 4433:4433 -p 5544:5544 -p 8083:8083 -p 8084:8084 -p 30000-30100:30000-30100/udp lal /lal/bin/lalserver -c /lal/conf/lalserver.conf.json

option 3, Use docker-compose

Create a docker-compose.yml file with the following content:

version: "3.9"
services:
    lalserver:
    image: q191201771/lal
    container_name: lalserver
    ports:
        - "1935:1935"
        - "8080:8080"
        - "4433:4433"
        - "5544:5544"
        - "8083:8083"
        - "8084:8084"
        - "30000-30100:30000-30100/udp"
    command: /lal/bin/lalserver -c /lal/conf/lalserver.conf.json

Run the following command to start the service:

docker-compose up

Or run it in the background with:

docker-compose up -d

Using

Running lalserver:

$./bin/lalserver -c ./conf/lalserver.conf.json

Using whatever clients you are familiar with to interact with lalserver.

For instance, publish rtmp stream to lalserver via ffmpeg:

$ffmpeg -re -i demo.flv -c:a copy -c:v copy -f flv rtmp://127.0.0.1:1935/live/test110

Play multi protocol stream from lalserver via ffplay:

$ffplay rtmp://127.0.0.1/live/test110
$ffplay rtsp://127.0.0.1:5544/live/test110
$ffplay http://127.0.0.1:8080/live/test110.flv
$ffplay http://127.0.0.1:8080/hls/test110/playlist.m3u8
$ffplay http://127.0.0.1:8080/hls/test110/record.m3u8
$ffplay http://127.0.0.1:8080/hls/test110.m3u8
$ffplay http://127.0.0.1:8080/live/test110.ts

More than a server, act as package and client

Besides a live stream broadcast server which named lalserver precisely, project lal even provides many other applications, e.g. push/pull/remux stream clients, bench tools, examples. Each subdirectory under the ./app/demo directory represents a tiny demo.

Our goals are not only a production server but also a simple package with a well-defined, user-facing API, so that users can build their own applications on it.

LAL stands for Live And Live if you may wonder.

Contact

Bugs, questions, suggestions, anything related or not, feel free to contact me with lal github issues.

License

MIT, see License.

this note updated by yoko, 202404

関連リポジトリ
FFmpeg/FFmpeg

Mirror of https://git.ffmpeg.org/ffmpeg.git

COtherffmpegvideo
ffmpeg.org
62.3k14k
ossrs/srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181, with codec support for H.264, H.265, AV1, VP9, AAC, Opus, and G.711.

C++MIT Licensertmplive-streaming
ossrs.io
29.1k5.7k
Guovin/iptv-api

⚡️IPTV直播源自动更新工具:自动采集、校验、测速并生成可播放结果,支持 M3U/TXT/API 输出、自定义频道、IPv4/IPv6、Docker、GitHub Actions、CLI 与 GUI 多端部署

PythonPyPIOtheriptvtvbox
24.7k7.2k
bluenviron/mediamtx

Ready-to-use Media-over-QUIC / SRT / WebRTC / RTSP / RTMP / LL-HLS / MPEG-TS / RTP live media server and media proxy that allows to read, publish, proxy, record and playback real-time video and audio streams.

GoGo ModulesMIT Licensertsprtp
mediamtx.org
19.6k2.3k
ZLMediaKit/ZLMediaKit

WebRTC/RTSP/RTMP/HTTP/HLS/HTTP-FLV/WebSocket-FLV/HTTP-TS/HTTP-fMP4/WebSocket-TS/WebSocket-fMP4/GB28181/SRT/STUN/TURN server and client framework based on C++11

C++Otherrtsprtmp
docs.zlmediakit.com
17.3k4.1k
AlexxIT/go2rtc

Ultimate camera streaming application

GoGo ModulesMIT Licenseffmpeghassio
go2rtc.org
13.5k1.2k
owncast/owncast

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

GoGo ModulesMIT Licensevideostreaming-video
owncast.online
11.4k1.2k
daniulive/SmarterStreaming

业内为数不多致力于极致体验的超强全自研跨平台(windows/linux/android/iOS)流媒体内核,通过模块化自由组合,支持实时RTMP推流、RTSP推流、RTMP播放器、RTSP播放器、录像、多路流媒体转发、音视频导播、动态视频合成、音频混音、直播互动、内置轻量级RTSP服务等,比快更快,业界真正靠谱的超低延迟直播SDK(延迟低至100~200ms)。

JavaMavenrtmp-pusherrtmp-player
daniusdk.com
11.2k2.8k
gwuhaolin/livego

live video streaming server in golang

GoGo ModulesMIT Licenselivestreamgolang
10.2k2k
illuspas/Node-Media-Server

A Node.js implementation of RTMP/HTTP-FLV Media Server

JavaScriptnpmApache License 2.0nodejsflv
npmjs.com/package/node-media-server
6.2k1.5k
0voice/audio_video_streaming

音视频流媒体权威资料整理,500+份文章,论文,视频,实践项目,协议,业界大神名单。

webrtcrtmp
6.2k1.4k
xufuji456/FFmpegAndroid

FFmpeg实现视频裁剪、水印、转码、编解码、转Gif动图;FFmpeg本地推流、H264与RTMP实时推流直播;OpenGL滤镜特效,视频拍摄。音视频学习路线,音视频知识总结、流媒体协议

Cffmpegtranscode
5.8k1.4k