• Stars
    star
    9,514
  • Rank 3,580 (Top 0.08 %)
  • Language
    Go
  • License
    MIT License
  • Created about 7 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

live video streaming server in golang

中文

Test Release

Simple and efficient live broadcast server:

  • Very simple to install and use;
  • Pure Golang, high performance, and cross-platform;
  • Supports commonly used transmission protocols, file formats, and encoding formats;

Supported transport protocols

  • RTMP
  • AMF
  • HLS
  • HTTP-FLV

Supported container formats

  • FLV
  • TS

Supported encoding formats

  • H264
  • AAC
  • MP3

Installation

After directly downloading the compiled binary file, execute it on the command line.

Boot from Docker

Run docker run -p 1935:1935 -p 7001:7001 -p 7002:7002 -p 8090:8090 -d gwuhaolin/livego to start

Compile from source

  1. Download the source code git clone https://github.com/gwuhaolin/livego.git
  2. Go to the livego directory and execute go build or make build

Use

  1. Start the service: execute the livego binary file or make run to start the livego service;
  2. Get a channelkey(used for push the video stream) from http://localhost:8090/control/get?room=movie and copy data like your channelkey.
  3. Upstream push: Push the video stream to rtmp://localhost:1935/{appname}/{channelkey} through the RTMP protocol(default appname is live), for example, use ffmpeg -re -i demo.flv -c copy -f flv rtmp://localhost:1935/{appname}/{channelkey} push(download demo flv);
  4. Downstream playback: The following three playback protocols are supported, and the playback address is as follows:
    • RTMP:rtmp://localhost:1935/{appname}/movie
    • FLV:http://127.0.0.1:7001/{appname}/movie.flv
    • HLS:http://127.0.0.1:7002/{appname}/movie.m3u8
  5. Use hls via https: generate ssl certificate(server.key, server.crt files), place them in directory with executable file, change "use_hls_https" option in livego.yaml to true (false by default)

all options:

./livego  -h
Usage of ./livego:
      --api_addr string       HTTP manage interface server listen address (default ":8090")
      --config_file string    configure filename (default "livego.yaml")
      --flv_dir string        output flv file at flvDir/APP/KEY_TIME.flv (default "tmp")
      --gop_num int           gop num (default 1)
      --hls_addr string       HLS server listen address (default ":7002")
      --hls_keep_after_end    Maintains the HLS after the stream ends
      --httpflv_addr string   HTTP-FLV server listen address (default ":7001")
      --level string          Log level (default "info")
      --read_timeout int      read time out (default 10)
      --rtmp_addr string      RTMP server listen address

Use with flv.js

Interested in Golang? Please see Golang Chinese Learning Materials Summary

More Repositories

1

dive-into-webpack

全面的Webpack教程《深入浅出Webpack》电子书
HTML
4,393
star
2

lightsocks

⚡️一个轻巧的网络混淆代理🌏
Go
4,075
star
3

blog

浩的技术博客
EJS
2,214
star
4

web-webpack-plugin

alternative for html-webpack-plugin
JavaScript
327
star
5

reflv

react component wrap flv.js
JavaScript
146
star
6

golang-book

Golang 中文学习资料汇总
Go
125
star
7

chrome-render

general server render base on headless chrome
JavaScript
95
star
8

ui-component-loader

Modular UI component loader for webpack, a good alternative for babel-plugin-import.
JavaScript
51
star
9

pure-svg-code

Generate qrcode & barcode to svg in pure javascript
JavaScript
47
star
10

chrome-pool

Headless chrome tabs manage pool
JavaScript
44
star
11

direct-alipay

alipay api for nodejs
JavaScript
36
star
12

koa-seo

koa SEO middleware
JavaScript
36
star
13

spring-data-rest-js

js lib for java spring data rest service,work for node.js and commonjs in browser,use fetch API
TypeScript
32
star
14

chrome-finder

chrome finder
JavaScript
22
star
15

chrome-runner

run chrome with nodejs in code
JavaScript
16
star
16

parcel-vs-webpack

JavaScript
15
star
17

koa-router-decorator

@route decorator for koa-router
TypeScript
13
star
18

ShuXun

便捷的大学生二手书交易平台
JavaScript
12
star
19

myccnu

华中师范大学微信服务平台-掌上华师
Java
11
star
20

koa-chrome-render

chrome-render middleware for koa
JavaScript
10
star
21

end-webpack-plugin

webpack end hook
JavaScript
8
star
22

comment-require-loader

webpack js loader for require in comment
JavaScript
8
star
23

lightsocks-android

Java
7
star
24

at-lock

防暴击装饰器
TypeScript
6
star
25

chrome-tester

web page automatic tester
JavaScript
5
star
26

get-component-async

react component load for webpack async code split
TypeScript
4
star
27

echo_graphql

a echo handle func for graphql-go
Go
3
star
28

AsyncAntdIconPlugin

JavaScript
2
star
29

bots

2
star
30

esbuild-plugin-globalvar

Go
1
star
31

stickylist

react sticky header listview component
JavaScript
1
star
32

remd

react markdown component
JavaScript
1
star
33

ie-babel-class

polyfill for use babel translate es6 for IE<=9 which use class super constructor
JavaScript
1
star
34

lfucache

Go
1
star
35

babel-plugin-replace-require-suffix

replace file suffix in require(filepath.suffix)
JavaScript
1
star
36

swagger2dts

JavaScript
1
star
37

trans-object

TypeScript
1
star
38

strsim

Go
1
star