Skip to content

Instantly share code, notes, and snippets.

@joaopaulovieira
Last active June 22, 2020 22:29
Show Gist options
  • Select an option

  • Save joaopaulovieira/ea072982ff0210ce8fe1b901c8d21ba2 to your computer and use it in GitHub Desktop.

Select an option

Save joaopaulovieira/ea072982ff0210ce8fe1b901c8d21ba2 to your computer and use it in GitHub Desktop.
ffmpeg -hide_banner \
-re -f lavfi -i "testsrc2=size=1280x720:rate=30" -pix_fmt yuv420p \
-c:v libx264 -x264opts keyint=30:min-keyint=30:scenecut=-1 \
-tune zerolatency -profile:v high -preset veryfast -bf 0 -refs 3 \
-b:v 1400k -bufsize 1400k \
-hls_time 5 -hls_list_size 240 -hls_start_number_source epoch -f hls /tmp/stream.m3u8
docker run --rm -v /tmp:/opt/www -p 8080:8080 webratio/nodejs-http-server:0.9.0 http-server /opt/www -a :: -p 8080 --cors -c-1
http://localhost:8080/stream.m3u8 //access
// remenber to delete /tmp/*ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment