param( $url = "", $out = "~/Videos/Downloads/", $namepattern = "%(title)s.%(ext)s" ) $ytdlp_options = "--live-from-start --wait-for-video 3600 --sponsorblock-remove all --output $out$namepattern $url" if ($url) { Start-Process yt-dlp -ArgumentList $ytdlp_options } else { while ($true) { $url = Read-host “URL” if (!$url) { break } Start-Process yt-dlp -ArgumentList $ytdlp_options } }