code for article pfeilbr/http-live-streaming-hls-playground
example of creating an HTTP Live Stream video stream from an h.264 video file.
Prerequisites
- download and install “HTTP Live Streaming Tools” from https://developer.apple.com/download/more/?=HLS (binaries are installed to
/usr/local/bin
)need to login with apple developer account
Running
# create segments for HTTP Live Streaming from media file
mediafilesegmenter \
-f ./public \
./assets/video/SampleVideo_1280x720_10mb.mp4
cd public
python -m SimpleHTTPServer 8000
open http://localhost:8000/
public/index.html
- include js code for video playbackassets/video/SampleVideo_1280x720_10mb.mp4
- sample video
Twitter • Reddit