npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

yt-dld

v1.1.1

Published

yt-dld is a Command Line tool to download youtube videos

Downloads

1

Readme

Yt-dld-Cli

yt-dld-cli is a command line tool to download YouTube videos and playlists.

It's a node package, so it's available for (Windows, Linux and Mac) operating systems, all you need is Node.js installed on your system.

Getting Start 🌠

Ensure that you have Node.js installed on your system, then you can install yt-dld using npm by this command:

Note for Linux and Mac users need to execute the following command with sudo

npm install -g yt-dld

or using yarn:

yarn global add yt-dld

Usage ✍️

Usage: yt-dld [options] <url>

CLI to download youtube video using JavaScript utilities

Options:
  -v, --version         output the version number
  -i, --info [type]     Print video info as JSON without downloading, pass json
                        as type will export video info as JSON file
  -q, --quality <ITAG>  Video quality to download, default: highest
  -o, --output <FILE>   Save to file, default: video title
  -f, --filter <STR>    Can be [videoonly, default: audio]
  -p, --print-url       Print direct download URL
  -e, --ext [ext]       change output video extension
  -h, --help            display help for command

Usage:
  $ yt-dld <url> -i
  $ yt-dld <url> -o videoTitle

Examples:
  $ yt-dld "http://www.youtube.com/watch?v=AwRAfxBub9M"
  $ yt-dld "http://www.youtube.com/watch?v=AwRAfxBub9M" -o videoTitle

Options

version

getting the app version simply type -v flag after url

it will ignore any other flags

yt-dld "http://www.youtube.com/watch?v=AwRAfxBub9M" -v

info

for get video info without downloading the video in json format or print info in console (default) add -i or --info flag

this will print video info in console

yt-dld "http://www.youtube.com/watch?v=AwRAfxBub9M" -i

to export video info as json format add json after -i flag.

but be aware of the following:

  • the exported file (report) will be in ./tube/reports directory
  • the directory will be created if not exist
  • also will overwrite existing reports
  • the exported report will be fully informative like response, related video and more
yt-dld "http://www.youtube.com/watch?v=AwRAfxBub9M" -i json

the preview of print on console will be like this:

title:       Life story || 30 sec whatsapp motivational video status
author:      STATUS                                          
avg rating:  (null)                                                 
views:       1,911,403                                              
length:      00:00:31                                               


formats:

itag container quality codecs                 bitrate   audio bitrate size     
---- --------- ------- ---------------------- --------- ------------- ---------
  18 mp4       360p    avc1.42001E, mp4a.40.2 232.90 kB 96KB          893.76 kB
 243 webm      360p    vp9                    94.78 kB                278.91 kB
 396 mp4       360p    av01.0.01M.08          91.36 kB                275.50 kB
 134 mp4       360p    avc1.4d401e            62.49 kB                175.55 kB
 395 mp4       240p    av01.0.00M.08          62.80 kB                190.99 kB
 242 webm      240p    vp9                    56.51 kB                167.78 kB
 133 mp4       240p    avc1.4d4015            42.70 kB                122.24 kB
 394 mp4       144p    av01.0.00M.08          58.93 kB                190.85 kB
 278 webm      144p    vp9                    47.57 kB                158.64 kB
 160 mp4       144p    avc1.4d400c            28.08 kB                81.77 kB 
 251 webm              opus                             160KB         524.53 kB
 140 mp4               mp4a.40.2                        128KB         488.10 kB
 250 webm              opus                             64KB          258.95 kB
 249 webm              opus                             48KB          194.91 kB

output

change the download video title to what you want just add -o followed by the new title

but be aware of the following:

  • the directory will be created if not exist
  • also will overwrite existing videos
  • the title will be sanitize using sanitize-filename package
yt-dld "http://www.youtube.com/watch?v=AwRAfxBub9M" -o newVideoTitle

print-url

what a feature you can take the url of video without downloading it, it will print on console

also, you can get the URL of the video with filters like audio, onlyvideo...etc

yt-dld "http://www.youtube.com/watch?v=AwRAfxBub9M" -p

quality

change the quality of the video with itag number, it will throw an error if the quality is not supported or founded

yt-dld "http://www.youtube.com/watch?v=AwRAfxBub9M" -q 140

filter

change the filter of downloaded video it Can be one of [videoonly, default: audio], also , it will throw an error if the filter is not one of them

yt-dld "http://www.youtube.com/watch?v=AwRAfxBub9M" -f audioonly

ext

this is useful for change extension of the video (default mp4) for now it supports only [mp3, mp4]

yt-dld "http://www.youtube.com/watch?v=AwRAfxBub9M" -e mp3

dev mode ⭐

Features

  • User friendly command line interface.
  • Download single YouTube video.
  • Download YouTube playlist.
  • Supports all available video formats and qualities.
  • Playlists organized to folders by their names.

Used Package 🧰