Skip to content

Instantly share code, notes, and snippets.

@yelban
Forked from dreness/notes.md
Created August 12, 2021 11:56
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yelban/89a1ae200b52e50defc269155c7fc7da to your computer and use it in GitHub Desktop.
Save yelban/89a1ae200b52e50defc269155c7fc7da to your computer and use it in GitHub Desktop.
Low Latency HLS test: how low can you go?

local streaming test with HLS low latency tools

Install tools

https://download.developer.apple.com/Developer_Tools/HLS_Low_Latency_Beta_Tools/LowLatency_HLS_Prerelease_Tools73.dmg

Start web server

go run /usr/local/share/llhlstools/ll-hls-origin-example.go -dir /Library/WebServer/Documents -http :8000

Start mediastreamsegmenter

rm /Library/WebServer/Documents/4M/[fpc]*
mediastreamsegmenter -w 499 -t 1 224.0.0.50:9121 -s 16 -D -T -f /Library/WebServer/Documents/4M/

Find a suitable capture device

ffmpeg -f avfoundation -list_devices true -i ""

Start stream input

(in this example, specifying input device #5 for video, and no audio)

ffmpeg -f avfoundation -i "5:" -c:v h264 -fflags nobuffer -tune zerolatency -f mpegts udp://224.0.0.50:9121

Attach a client

http://localhost:8000/4M/prog_index.m3u8

errata

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment