Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grantfayvor/hexcord-mediaserver
WebRTC to RTMP media server heavily inspired by https://github.com/pion/webrtc/tree/master/examples/rtp-forwarder
https://github.com/grantfayvor/hexcord-mediaserver
Last synced: 3 months ago
JSON representation
WebRTC to RTMP media server heavily inspired by https://github.com/pion/webrtc/tree/master/examples/rtp-forwarder
- Host: GitHub
- URL: https://github.com/grantfayvor/hexcord-mediaserver
- Owner: grantfayvor
- License: apache-2.0
- Created: 2020-09-29T09:49:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-28T09:05:41.000Z (about 4 years ago)
- Last Synced: 2024-08-01T19:46:18.653Z (7 months ago)
- Language: Go
- Homepage:
- Size: 17.9 MB
- Stars: 58
- Watchers: 6
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pion - Hexcord (mediaserver) - A mediaserver for forwarding WebRTC streams to an RTMP endpoint using ffmpeg (Media API)
README
# Hexcord mediaserver
### Hexcord mediaserver is a standalone server that allows you to initiate a peer connection and forward audio and video streams via WebRTC to an rtmp endpoint.
## __Instructions__
The mediaserver makes use of [ffmpeg](https://ffmpeg.org) to forward the streams so you would need that installed. You would find installation instructions for ffmpeg [here](https://ffmpeg.org/download.html). The [Pion webrtc](https://github.com/pion/webrtc) library was used for the WebRTC implementation.Start the server by either running ```go run main.go``` or run ```go build``` to build the binaries instead.
The server starts up at [http://localhost:8090](http://localhost:8090) and exposes an endpoint ```http://localhost:8090/webrtc/offer```
Send a POST request with body
```
{
"ingestionAddress": "rtmp://RTMP_ADDRESS",
"streamKey": "234343sdsd-sdsfdfd-232dfdf",
"offer": "sdfarergehteafadfadfrrererdfdfdfd" // WebRTC offer from client
}
```
Content-type for the request is ```application/json```The endpoint responds with a JSON body containing a webrtc session description
```
{
"type": "answer",
"sdp": "sdsawewsdf434-dsdf34-sfdsfdgs434.sfdfdbvererasdsds" // use this as the remote description of the peer connection initiated on the client
}
```Have fun ❤️