Skip to content

Instantly share code, notes, and snippets.

@touren
Last active November 24, 2016 06:21
Show Gist options
  • Save touren/41cec7ef9e63622969d7668b8290be15 to your computer and use it in GitHub Desktop.
Save touren/41cec7ef9e63622969d7668b8290be15 to your computer and use it in GitHub Desktop.
sudo apt-get install nginx
WEB_ROOT=/var/www/html
sudo rm -f ${WEB_ROOT}/*.m3u8
sudo rm -f ${WEB_ROOT}/*.ts
gst_pid=`ps -A | grep gst-launch-1. | awk '{print $1}'`
sudo kill -9 ${gst_pid}
sudo gst-launch-1.0 videotestsrc is-live=true ! clockoverlay shaded-background="true" font-desc="Sans, 24" \
! x264enc ! mpegtsmux ! hlssink location="${WEB_ROOT}/segment%05d.ts" playlist-location="${WEB_ROOT}/playlist.m3u8" &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment