I wanted something to download and save livestreams from a certain channel since I'm not always around when they stream and they don't save the videos to their channel.
This script runs forever watching and waiting for a livestream to start, then downloads the video and converts it to mp4 for more universal playback.
WIP
ffmpeg -i input.ts -acodec copy -vcodec copy out.mp4
streamlink -v --http-no-ssl-verify --hls-live-restart -o 2019-05-26.ts https://www.youtube.com/watch?v=nDIsueMUy-c best