
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
yt-dl-streamer
Advanced tools
Script to capture yt-dl-core readable streams and write them to '.flv' or '.mp3' files on your disk.
Script to capture yt-dl-core readable streams and write them to ".flv" or ".mp3" files on your disk.
Basically a module that downloads Youtube audio and/or video to your disk using progress-stream to show you the progress.
$: npm i --save yt-dl-streamer
const Streamer = require("yt-dl-streamer").Streamer;
try {
const link = "4oMJIyVOWL4";
const outPath = "/home/bgiannoti/Work/myStuff/videos";
const format = "Video";
const quality = "Highest";
const timeoutBetweenProgressEmits = 1000;
const ytStream = new Streamer(format, quality, outPath, timeoutBetweenProgressEmits, null);
ytStream.download(link);
ytStream.runQueue();
ytStream.on("finished", (err, data) => {
console.log(JSON.stringify(data));
process.exit(0);
});
ytStream.on("error", (error) => {
console.log(error);
});
ytStream.on("progress", (progress) => {
console.log(JSON.stringify(progress));
});
} catch (e) {
console.error(e)
process.exit(1);
}
const Streamer = require("./tsc/Streamer").Streamer;
try {
const link = "4oMJIyVOWL4";
const outPath = "/home/bgiannoti/Work/bdv-yt-dl-streamer-to-file/videos";
const format = "Audio";
const quality = "Highest";
const pathToFfmpeg = "/snap/bin/ffmpeg";
const timeoutBetweenProgressEmits = 1000;
const ytStream = new Streamer(format, quality, outPath, timeoutBetweenProgressEmits, pathToFfmpeg);
ytStream.download(link);
ytStream.runQueue();
ytStream.on("finished", (err, data) => {
console.log(data);
process.exit(0);
});
ytStream.on("error", (error) => {
console.log(error);
});
ytStream.on("progress", (progress) => {
console.log(progress);
});
} catch (e) {
console.error(e)
process.exit(1);
}
In Javascript:
const Streamer = require("./tsc/Streamer").Streamer;
In Typescript:
import Streamer from "./src/Streamer;
The Streamer class is instantiated by passing the following parameters:
"format": <const string>,
"quality": <const string>,
"out": <string>,
"timeout": <number>,
"codecPath"?: <string>
format accepts only two possible values: 'Audio' or 'Video'.quality - accepts only two possible values: 'highest' or 'lowest''out' - the strigified path of the output on your disk you want files to be saved to. If you present a invalid path, the script will try to create it for you.'timeout' - the timeout between each progress log emit of your downloaded file.'codecPath' - Not mandatory, only if you want a .mp3 conversion. In that case you need to provide the path in your disk for the ffmpeg installation. (https://www.ffmpeg.org/download.html)[Streamer].download(link: <string>): null
download method is responsible for pushing your link to the download queue.[Streamer].runQueue(link: <string>): null
runQueue method is responsible for actively executing the binded download links in order.[Streamer].on("progress", [Function])
[Streamer].on("finished", [Function])
[Streamer].on("error", [Function])
Brunodev09 - Bruno Mayol Giannotti
MIT
FAQs
Script to capture yt-dl-core readable streams and write them to '.flv' or '.mp3' files on your disk.
We found that yt-dl-streamer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.