Forked from the excellent tutorials by Lane Wagner at QVault and Rohir Mundra
Navigate to the directory with a video or audio clip (I'm using an MP3 here) and encode it into HTTP Live Streaming chunks and a manifest using the H.264 codec:
ffmpeg -i BachGavotteShort.mp3 -c:a libmp3lame -b:a 128k -map 0:0 -f segment -segment_time 10 -segment_list outputlist.m3u8 -segment_format mpegts output%03d.ts
Start (or build) the server, which listens for requests on port 8080:
go run main.go
go build -o server main.go
and then./server
(or./server.exe
for Windows)
Ensure the contents of the manifest are being served:
curl -i http://localhost:8080/BachGavotteShort/outputlist.m3u8
Run the HLS.js test client and paste in the URL to your media manifest: http://localhost:8080/BachGavotteShort/outputlist.m3u8