/Go-Audio-Streaming-HLS

A simple web server in Go for streaming audio and video files using HTTP Live Streaming (HLS).

Primary LanguageGo

video_audio_streaming

Audio Video Streaming using Go

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.

Referred from

https://blog.boot.dev/golang/golang-video-stream-server/

Prerequisites

Before you begin, ensure you have the following installed:

  • Go
  • Git

Installation

  1. Clone the repository:

    git clone https://github.com/anjush-bhargavan/video_audio_streaming.git
  2. Change into the project directory:

    cd video_audio_streaming

Running the Server

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.