@yolka/yt-media-cli
v1.0.0
Published
Interactive YouTube downloader with ffmpeg merging support.
Downloads
131
Maintainers
Readme
yt-download-cli
Interactive Node.js CLI for downloading YouTube videos. It uses yt-dlp for format discovery and downloading, and bundled ffmpeg-static for merging separate video/audio streams.
Install
For local development:
npm install
npm linknpm install downloads the correct yt-dlp binary into vendor/ through the package postinstall script.
After publishing to npm, install globally on another machine:
npm install -g @yolka/yt-media-cliUsage
yt-download "https://www.youtube.com/watch?v=JUb3JZYO994"Or without linking:
npm start -- "https://www.youtube.com/watch?v=JUb3JZYO994"Choose one of the shown formats, for example mp4 360p - ready or mp4 1080p - ffmpeg merge, and the file will be saved to downloads/.
During download the CLI prints yt-dlp progress with percent, speed, and ETA. The yt-dlp subprocess timeout is disabled so long videos can finish normally.
Use another output folder:
yt-download "https://www.youtube.com/watch?v=JUb3JZYO994" --output videosNotes
ffmpeg-static is installed as an npm dependency, so you do not need to install ffmpeg separately for normal use.
The package downloads the official yt-dlp executable during install. The CLI passes your local Node.js executable to yt-dlp as a JavaScript runtime, which is required by current YouTube extraction logic.
YouTube often exposes higher qualities like 1080p or 4K as separate video-only streams. Those options appear in the menu as ffmpeg merge choices and are muxed with the best matching audio-only stream.
For post-live videos where YouTube exposes both plain ids and *-dash ids, the menu uses yt-dlp's *-dash formats because the plain video ids can download as empty files.
Publish
Check the package contents:
npm run pack:checkLog in and publish:
npm login
npm publish --access publicThe package publishes under @yolka/yt-media-cli, while the installed binary command remains yt-download.
