Skip to content

Instantly share code, notes, and snippets.

@dreness
Created June 24, 2020 05:53
Show Gist options
  • Save dreness/c2defeeceb39caec741be6dcc3a02929 to your computer and use it in GitHub Desktop.
Save dreness/c2defeeceb39caec741be6dcc3a02929 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

@fastfading
Copy link

which client are you using ? this did not work well on mac/ios native safari.
the delay is big in safari.

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