Go HLS Transcoder

Golang transcoder using ffmpeg
Supports
- HTTP Live Streaming
- MPEG DASH
Prerequisite
Examples
Generate HLS files + playlist from a mov file.
package main
import (
"os/exec"
"github.com/azanium/go-transcoder/hls"
)
func main() {
srcPath := "./Love.mov"
targetPath := "hls/"
resOptions := []string{"480p", "720p"}
ffmpeg, err := exec.LookPath("ffmpeg")
if err != nil {
panic(err)
}
variants, _ := hls.GenerateHLSVariant(resOptions, "")
hls.GeneratePlaylist(variants, targetPath, "")
for _, res := range resOptions {
hls.GenerateHLS(ffmpeg, srcPath, targetPath, res)
}
}
License
MIT licensed. See the LICENSE file for details.