• 0 Posts
  • 1 Comment
Joined 2Y ago
cake
Cake day: Feb 20, 2023

help-circle
rss

I similarly made two functions depending on the use case (see comments in code) and saved them in Powershell’s default profile (Microsoft.PowerShell_profile.ps1) so I can invoke them with just one word directly in commandline, works great 👌

function Vid {
    param (
        [Parameter(Mandatory=$true)]
        [string]$link
    )
    yt-dlp -P "$env:USERPROFILE\Downloads" $link -S "res:1080,br" --embed-subs --sub-langs all,-live_chat --remux mp4
} #Downloads videos using yt-dlp limited to 1080p; usage Vid YT_URL
function VidFull {
    param (
        [Parameter(Mandatory=$true)]
        [string]$link
    )
    yt-dlp -P "$env:USERPROFILE\Downloads" $link --embed-subs --sub-langs all,-live_chat --remux mp4
} #Downloads videos using yt-dlp in maximum quality; usage VidFull YT_URL