-
use livestream_saver to download from the first segment. Can also record membership-only streams by supplying it your cookies (uses yt-dlp to download)
-
use ytarchive which basically does the same thing, except a bit better.
-
use youtube_stream_capture. You can use cookies file to get member-only streams too. Be aware that this script currently fails to download chunks as soon as the stream has ended (this might be a bug).
-
or use live-dl which does monitoring of streams too. This is a wrapper around streamlink and yt-dlp.