Skip to content

youtube-dl

130,439 30 4201 Unlicense
2021.12.17 (16 Dec 2021) Feb 22 2012 482.0 thousand (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. Youtube-dl contains open-source scrapers for hundreds of websites and is a great educational source for understanding how to scrape many popular websites.

Highlights


popularcomplex

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


49,665 0.4.1718 (24 days ago) Sep 01 2012 compare
4,168 1.2.71 (1 year, 3 months ago) Dec 28 2012 compare
3,270 1.12.0 (8 days ago) Jul 17 2019 compare

Other Languages

2,075 v4.4.12 (14 days ago) Oct 26 2013 compare
331 2.0.40 (a month ago) Sep 11 2013 compare
769 3.5.4 (3 years ago) Mar 02 2013 compare
Was this page helpful?