yt-dl-playlist
This module let you to programatic download the audio files of a video playlist on YouTube in MP3 format. It exposes API to download also single audio.
The name of this module is due the npm policy, call it youtube-download-playlist
.
⚠ You must use this module/cli respecting the YouTube's Copyright Policies.
Install
Requirements
npm install yt-dl-playlist
Usage
CLI - Command Line Interface
Run yd --help
to see all the options!!
The cli is very simple and quick-and-dirty:
# NPM Global npm install yt-dl-playlist -gyd <video_id or playlist_id> # NPX npx yt-dl-playlist <video_id or playlist_id> [flags]
Examples:
# Download playlist yd PLAv2aQ9JgGbVcUtDpuiTB9WgaMljCUpa_ -p # Download audio yd 2bexTB7xq_U # View info video yd --info 2bexTB7xq_U
FFMPEG
This program needs ffmpeg
.
It is a free program that elaborate video and audio stream.
It can be download also in the portable .zip
without installation!
To config the ffmpeg
path you can run the script in a cmd
shell like this:
yd ZIyyj2FrVI0 -F /ffmpeg/bin
Or more simply run the yd
command from the directory where ffmpeg is saved:
cd download/ffmpeg/binyd ZIyyj2FrVI0
Module
You can use this lib as a module also!
const DownloadYTFile = const downloader = outputPath: process ffmpegPath: './ffmpeg/bin/ffmpeg.exe' maxParallelDownload: 10 { return 'a-new-file-name.mp3' } downloaderdownloaderdownloaderdownloaderdownloaderdownloader downloader : Promise<object>downloader : Promise<Array> downloader : Promise<object>downloader : Promise<object>
License
Copyright MIT.