Reading the repo
Opening the box…
Reading the repo
Opening the box…
How to install on macOS
CLI and npm module to extract audio from YouTube videos (so you are able to listen them like a podcast)
Saved setup from 7 h ago
Will it work on macOS?
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Needs Git: xcode-select --install
git clone https://github.com/Eomm/youtube-download-playlist.git cd youtube-download-playlist
Node.js >=10.0.0
# needs nvm: brew install nvm (or https://github.com/nvm-sh/nvm) nvm install --lts
npm install
npm test
Run yd --help to see all the options!!
The cli is very simple and quick-and-dirty:
# NPM Global
npm install yt-dl-playlist -g
yd <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
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/bin
yd ZIyyj2FrVI0
You can use this lib as a module also!
const DownloadYTFile = require('yt-dl-playlist')
const downloader = new DownloadYTFile({
outputPath: process.cwd(),
ffmpegPath: './ffmpeg/bin/ffmpeg.exe',
maxParallelDownload: 10,
fileNameGenerator: (videoTitle) => {
return 'a-new-file-name.mp3'
}
})
downloader.on('video-info', (fileInfo, video) => {
console.log({ fileInfo, video })
})
downloader.on('video-setting', (fileInfo, settings) => {
console.log({ fileInfo, settings })
})
downloader.on('start', (fileInfo) => console.log(fileInfo))
downloader.on('progress', (fileInfo) => console.log(fileInfo))
downloader.on('complete', (fileInfo) => console.log(fileInfo))
downloader.on('error', (fileInfo) => console.log(fileInfo.error))
downloader.download(id, inputFileName = null) : Promise<object>
downloader.downloadPlaylist(playlistId) : Promise<Array>
downloader.getPlaylistInfo(playlistId) : Promise<object>
downloader.getVideoInfo(videoId) : Promise<object>
No reports for macOS yet.
GitManual AI Agent reads the 3 key files and writes a step-by-step guide for macOS. Once written, it's saved for everyone.