golang 流媒体(直播音视频网络传输)服务
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
q191201771 0cf8660d17 messages:
- #77 [feat] lalserver: httpflv,httpts,hls的url pattern路由路径可以在配置文件中配置
- #64 [feat] hls默认提供两种播放url地址
- #77 [refactor] package hls: 将http url路径格式,文件存储路径格式,文件命名格式,映射关系抽象出来,业务方可在外层实现IPathSolver接口做定制
4 years ago
app [refactor] package avc: add func IterateNALUStartCode, IterateNALUAnnexB, IterateNALUAVCC #79 4 years ago
conf messages: 4 years ago
pkg messages: 4 years ago
.gitignore messages: 4 years ago
.travis.yml messages: 4 years ago
CHANGELOG.md v0.22.0 -> version.go 4 years ago
CONTRIBUTING.md Create CONTRIBUTING.md 4 years ago
LICENSE 1st 6 years ago
Makefile messages: 5 years ago
README.md messages: 4 years ago
build.sh patch 4 years ago
build_linux.sh 1). flvfile2rtmppush 增加 bininfo 2). flvfile2rtmppush error 时 panic -> log & os exit 3). build_linux.sh 直接调用 build.sh 5 years ago
gen_release.sh 1. [refactor] 使用新的unique id生成器,提高性能 2. [refactor] 统一各Session接口 4 years ago
gen_tag.sh [patch] prev commit patch 4 years ago
go.mod [feat] 支持录制flv和ts文件 #14 4 years ago
go.sum [feat] 支持录制flv和ts文件 #14 4 years ago
showdeps.sh [fix] 修复使用ffmpeg向lalserver推送rtsp h265流时报错 #55 4 years ago
test.sh [feat] 支持rtsp pub h265 (lalserver支持接收rtsp h265的推流) 4 years ago

README.md

LAL

Release TravisCI 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, H264/H265/AAC, relay, cluster, record, HTTP API/Notify, GOP cache.

And more than a server, act as package and client

Install

There are 2 ways of installing lal.

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.

Building from source

First, make sure that Go version >= 1.13

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.

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 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/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.