Media

yt-dlp

yt-dlp is a free and open source project that allows to download videos from Youtube and other platforms to your computer.

Usage

Powershell

function dl($yt_id) {
    $music_dir = "D:/Music"
    # ba = best audio / bv = best video
    yt-dlp.exe -P "$music_dir" -f "ba" -o "%(title)s.f%(format_id)s.%(ext)s" $yt_id
}

Fish shell

function dl
    set yt_id $argv[1]
    set music_dir "~/Music"
    # ba = best audio / bv = best video
    yt-dlp -P "$music_dir" -f "ba" -o "%(title)s.f%(format_id)s.%(ext)s" $yt_id
end

The above is a function that downloads the best quality audio file for the Youtube video with id $yt_id. For more examples and reference check out the project home page link at the beginning.

Tip: use FFmpeg to convert files to different formats.