gitwtfhub

wtf is node-ytdl-core?

fent/node-ytdl-core — explained in plain English

Analysis updated 2026-06-26

4,735JavaScriptAudience · developerComplexity · 2/5Setup · easy

TL;DR

A Node.js library for downloading YouTube videos programmatically, give it a URL and get back a readable stream you can save to a file or pipe to any destination.

Mindmap

mindmap
  root((node-ytdl-core))
    What it does
      Download YouTube videos
      Stream to file or player
      Fetch video metadata
    Download options
      Highest quality
      Audio only
      Video only
      Specific format
    Metadata
      Title and description
      Available formats
      Duration
    Status
      Maintenance paused 2023
      Community fork available

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Download YouTube videos to a local file from a Node.js script without any command-line tools

REASON 2

Extract audio-only streams from YouTube videos to process or save separately

REASON 3

Fetch a YouTube video's metadata like title and available formats without downloading the video

REASON 4

Build a server that streams YouTube content directly to users without storing it locally

What's in the stack?

JavaScriptNode.js

How it stacks up

fent/node-ytdl-core23/resumable.jsjackmoore/colorbox
Stars4,7354,7344,732
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasymoderateeasy
Complexity2/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Active development paused July 2023, use the distube/ytdl-core community fork for ongoing updates and bug fixes.

License not specified in the explanation.

Wtf does this do

node-ytdl-core is a Node.js library that downloads YouTube videos from within a JavaScript program. You give it a YouTube URL and it returns a data stream your code can pipe to a file, a media player, or any other destination. It is written in plain JavaScript with no compiled dependencies, and it follows the standard Node.js streaming interface. The library gives you control over what gets downloaded. You can choose quality (highest, lowest, a specific resolution), filter by format (video with audio, video only, audio only), or pick a specific format by its internal YouTube identifier. For cases where you want the audio and video as separate files to merge later, the library also supports downloading each stream independently. Beyond downloading, it can fetch metadata about a video without downloading any of it: title, description, available formats, duration, and similar information. It handles live streams as well as regular videos, though the README notes that seeking to a specific time position within non-live videos is not fully reliable. The README includes a prominent notice that active development was paused in July 2023. The original maintainers are no longer merging pull requests, and the project now relies on community support. For a version that receives ongoing updates, the README points to a community fork called distube/ytdl-core. Installation is via npm (npm install ytdl-core). It runs in any Node.js environment that supports streams, including scripts, servers, and CLI tools. There is no built-in command-line interface, it is purely a library meant to be called from your own JavaScript code.

Yoink these prompts

Prompt 1
Write a Node.js script using ytdl-core that downloads only the audio stream from a YouTube URL and saves it to disk
Prompt 2
Use node-ytdl-core to fetch the highest quality video from a YouTube URL and pipe it to a local .mp4 file
Prompt 3
Help me list all available formats for a YouTube URL using ytdl-core and pick the one closest to 720p
Prompt 4
Write a Node.js Express route that accepts a YouTube URL as a query param and streams the video directly to the browser using ytdl-core
Prompt 5
Show me how to use node-ytdl-core to download audio and video as separate streams and combine them with ffmpeg

Frequently asked questions

wtf is node-ytdl-core?

A Node.js library for downloading YouTube videos programmatically, give it a URL and get back a readable stream you can save to a file or pipe to any destination.

What language is node-ytdl-core written in?

Mainly JavaScript. The stack also includes JavaScript, Node.js.

What license does node-ytdl-core use?

License not specified in the explanation.

How hard is node-ytdl-core to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is node-ytdl-core for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.