This project demonstrates how to stream audio and video files using Go. It includes a simple web server that serves HLS (HTTP Live Streaming) video and audio content.
https://blog.boot.dev/golang/golang-video-stream-server/
Before you begin, ensure you have the following installed:
- Go
- Git
-
Clone the repository:
git clone https://github.com/anjush-bhargavan/video_audio_streaming.git
-
Change into the project directory:
cd video_audio_streaming
To run the server, execute the following command:
go run main.go
3.You can access the HLS streams using the following URL format:
http://localhost:8080/<video/song>/<filename>/outputlist.m3u8
Available files:
Songs: loveme Replace <video/song> with either video or song, with one of the available file names, and access the provided link in an HLS-compatible player.
For example:
http://localhost:8080/video/got/outputlist.m3u8
HLS Player You can use HLS.js or any other HLS-compatible player to stream the content.