https://github.com/sbraveyoung/ggmpeg
GGmpeg is a LIBRARY that pays tribute to FFmpeg with Go!
https://github.com/sbraveyoung/ggmpeg
ffmpeg flv hls mpeg-ts rtmp
Last synced: 9 months ago
JSON representation
GGmpeg is a LIBRARY that pays tribute to FFmpeg with Go!
- Host: GitHub
- URL: https://github.com/sbraveyoung/ggmpeg
- Owner: sbraveyoung
- License: mit
- Created: 2021-03-02T03:03:08.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-01-24T02:25:50.000Z (over 4 years ago)
- Last Synced: 2025-04-15T00:11:47.046Z (about 1 year ago)
- Topics: ffmpeg, flv, hls, mpeg-ts, rtmp
- Language: Go
- Homepage:
- Size: 20.4 MB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
```
____ ____
/ ___|/ ___|_ __ ___ _ __ ___ __ _
| | _| | _| '_ ` _ \| '_ \ / _ \/ _` |
| |_| | |_| | | | | | | |_) | __/ (_| |
\____|\____|_| |_| |_| .__/ \___|\__, |
|_| |___/
```
[GGmpeg](https://github.com/SmartBrave/GGmpeg) is a **LIBRARY** that pays tribute to [FFmpeg](https://ffmpeg.org/) with [Go](https://golang.org/)!
**NOTE: GGmpeg is a wheel I made to implement various protocols of multimedia, there are still many problems to be solved. Please do NOT use it in production environments.**
## Feature
- [x] publish a stream with RTMP
- [x] play a stream with RTMP
- [x] play a stream with HTTP-flv
- [ ] play a stream with HLS
- [ ] RTMP client library
- [ ] publish and play a stream with RTP
- [ ] more...
## Usage
To start a RTMP server, you only need to write one line of code, see `./demo/rtmp_server.go`:
```go
err := rtmp.NewServer(":1935", "live").Handler()
//...
```
Then you can publish a stream to addr: `rtmp://localhost:1935/live/${liveid}` with any RTMP publish tools such as [OBS](https://obsproject.com/), [FFmpeg](https://ffmpeg.org/) and so on, and play it from addr: `rtmp://localhost:1935/live/${liveid}` with any RTMP play tools you want.
To support HTTP-flv, you need to invoke `WithHTTPFlv()` methods:
```go
err := rtmp.NewServer(":1935", "live").WithHTTPFlv(":8080").Handler()
//...
```