Live Stream Downloader — yt-dlp Command Generator
Build a yt-dlp command to record a live stream, from the start where the platform allows it.
Recording live safely
Record-from-the-start captures from the beginning rather than the moment you ran the command, where the platform still has the earlier part. Wait-for-video polls a scheduled stream and starts the instant it goes live.
Choose MKV. A recording that stops unexpectedly — and live recordings do — usually leaves a playable MKV, where an MP4 cut off mid-write often cannot be opened at all. There is no resuming a live stream, so the container choice is the whole safety net.
Waiting for a scheduled stream is a different mode from recording one in progress: wait-for-video polls the URL until the stream opens, then starts recording — leave the terminal running and it captures from the first minute. The poll interval is minutes, not seconds, so start the command early; arriving late to the poll costs minutes of stream, and no option recovers minutes that were never recorded.
Record-from-the-start has a platform boundary: YouTube keeps the beginning of a stream and serves it on demand, so the option genuinely reaches it; Twitch likewise within its retention window. Other platforms keep nothing before the moment you joined. That is why the option is not a magic switch — it fetches what the platform stored, and platforms differ in what they store. If the platform offers a replay afterwards, the replay is the better source than any live capture.
Live streams are HLS by definition: hundreds of short segments arriving in real time, joined by ffmpeg into the container as they land. This is why live recording is the case where MKV matters most — an MP4 needs its index written at the end, and a recording killed at minute three of a two-hour stream has no index at all. Disk space is the other real limit: a live recording grows at stream bitrate for as long as it runs, and a size limit protects the disk on a stream that runs twelve hours because the broadcaster forgot to stop.
After the fact, two things deserve naming. A recording with dead air is normal — silence between segments of the event is in the source — and cutting it afterwards is an edit, not a failed download. And streams that ended hours ago are ordinary VODs by the time you find them: use the platform's normal video options, which are the ones this form shows by default, and the live-specific ones only while the stream is actually live.