30-hls-video-stream

command
v0.0.0-...-2a31978 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 5 Imported by: 0

README

Implement HLS Video Streaming

Run the following command where the .mp4 file is saved.

ffmpeg -i song.mp4 -c:a libmp3lame -b:a 128k -map 0:0 -f segment -segment_time 10 -segment_list outputlist.m3u8 -segment_format mpegts output%03d.ts

Output from port http://localhost:8080/outputlist.m3u8

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:11
#EXTINF:10.066667,
output000.ts
#EXTINF:10.300000,
output001.ts
#EXTINF:9.766667,
output002.ts
#EXTINF:5.333333,
output003.ts
#EXT-X-ENDLIST

Reference: Video Streaming in GO

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL