This project is in Progress(ui,cdn integration), Webrtc -> HLS
part is Complete.
Steps for running this Server (I recommend using local-testing branch)
- Install or upgrade Golang ver. 1.15 or above
- Install or upgrade Ffmpeg ver. 4.3.1-5(available in
Debian Sid
) and windows ffmpeg v4.3 - Download the project using Git command
git clone https://github.com/mohit810/streamingcdn
- To start the server open the new folder created by Git and use the command
go run main.go
(Use terminal for running the server)
- Congratulations!! Now the server is up and running.
- As a starting point for testing you can use the Web UI
- Users can connect via
POST
request and start streaming(1.5Mbps speed is hardcoded for the stream). - The Server recieves the stream and converts it into HLS.
- Native Android-UI
- Web UI
- Integrating FFmpeg.(Completed for now, further optimization will be done later)
- Allowing multiple users to connect and start broadcasting.(not in priority, at this stage.)
- CDN Integration ( Post UI development)
- Front-end UI Development in ios.
To receive the broadcast, Convert it into hls in various quality then push those to cdn to serve to the User.
Before using this solution you should set-up pion/webrtc/v3 (Go Modules are mandatory for using Pion WebRTC. So make sure you set export GO111MODULE=on, and explicitly specify /v3 when importing.).
{ "sdp":"", "streamKey":"" }
- Playlists and all the
.ts
files are served at/watch/streamkey/
(here streamKey is the string that the broadcaster sends in thePOST
request when connecting to the server)