Skip to content

youtube-dl

116,598 30 4789 Unlicense
2021.12.17 (1 year, 1 month ago) Feb 22 2012 4.3 million (month)

youtube-dl is a command-line utility and a library for downloading multimedia content from various websites, including YouTube, Vimeo, TikTok, and many others. It supports a wide range of video and audio formats, and can be used to download both live streams and on-demand videos. The library is written in Python and can be easily integrated into other Python projects.

Example Use


CLI:

$ youtube-dl 'https://www.youtube.com/watch?t=4&v=BaW_jenozKc'
Library:
import youtube_dl

# define the download options
options = {
    'outtmpl': '%(title)s.%(ext)s',
    'format': 'best',
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '192',
    }]
}

# download the video
with youtube_dl.YoutubeDL(options) as ydl:
    ydl.download(['https://www.youtube.com/watch?v=dQw4w9WgXcQ'])

Alternatives / Similar


46,483 0.4.1650 (a month ago) Sep 01 2012 compare
722 1.4.0 (3 months ago) Jul 17 2019 compare

Other Languages

1,953 v4.4.7 (a month ago) Oct 26 2013 compare
309 2.0.29 (a month ago) Sep 11 2013 compare
765 3.5.4 (2 years ago) Mar 02 2013 compare