@cxstin/ytdl
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Youtube Downloader

An easy and quick way to download youtube videos/playlists

Installation

- First you may need to install ffmpeg.

npm i @cxstin/ytdl

Usage

Downloading Videos

const ytdl = require("@cxstin/ytdl");

const yt = ytdl()

// Download the video as an mp4 file with video and audio.
// The video quality will be better than the audio since we use "highestvideo" as our quality parameter
yt.video(
  "https://www.youtube.com/watch?v=Hcoe-AHk4uE",
  "videoandaudio",
  "highestvideo"
);

Downloading Playlists

- THE PLAYLIST YOU ARE DOWNLOADING NEEDS TO BE EITHER PUBLIC OR UNLISTED, IT WILL NOT WORK IF ITS PRIVATE

const ytdl = require("@cxstin/ytdl");

const yt = ytdl()

// This will create a new directory with the playlist's name and will download all the videos it contains into that directory.
yt.playlist(
  "https://www.youtube.com/playlist?list=PL2xsJowpDh_Czfwzj6DU7XHOYgQ-g_-kn",
  "videoandaudio",
  "highestvideo"
);

/@cxstin/ytdl/

    Package Sidebar

    Install

    npm i @cxstin/ytdl

    Weekly Downloads

    2

    Version

    0.0.4

    License

    MIT

    Unpacked Size

    17.5 kB

    Total Files

    6

    Last publish

    Collaborators

    • cxstin