New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

youtube-mp3-downloader

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

youtube-mp3-downloader - npm Package Compare versions

Comparing version 0.5.3 to 0.6.2

.circleci/config.yml

20

lib/YoutubeMp3Downloader.js

@@ -9,2 +9,3 @@ "use strict";

var progress = require("progress-stream");
var sanitize = require("sanitize-filename");

@@ -20,4 +21,5 @@ function YoutubeMp3Downloader(options) {

self.progressTimeout = (options && options.progressTimeout ? options.progressTimeout : 1000);
self.fileNameReplacements = [[/"/g, ""], [/'/g, ""], [/\//g, ""], [/\?/g, ""], [/:/g, ""], [/;/g, ""]];
self.fileNameReplacements = [[/"/g, ""], [/\|/g, ""], [/'/g, ""], [/\//g, ""], [/\?/g, ""], [/:/g, ""], [/;/g, ""]];
self.requestOptions = (options && options.requestOptions ? options.requestOptions : { maxRedirects: 5 });
self.outputOptions = (options && options.outputOptions ? options.outputOptions : []);

@@ -103,3 +105,3 @@ if (options && options.ffmpegPath) {

//Derive file name, if given, use it, if not, from video title
var fileName = (task.fileName ? self.outputPath + "/" + task.fileName : self.outputPath + "/" + videoTitle + ".mp3");
var fileName = (task.fileName ? self.outputPath + "/" + task.fileName : self.outputPath + "/" + (sanitize(videoTitle) || info.video_id) + ".mp3");

@@ -133,3 +135,11 @@ ytdl.getInfo(videoUrl, { quality: self.youtubeVideoQuality }, function(err, info) {

});
var outputOptions = [
"-id3v2_version", "4",
"-metadata", "title=" + title,
"-metadata", "artist=" + artist
];
if (self.outputOptions) {
outputOptions = outputOptions.concat(self.outputOptions);
}
//Start encoding

@@ -142,5 +152,3 @@ var proc = new ffmpeg({

.toFormat("mp3")
.outputOptions("-id3v2_version", "4")
.outputOptions("-metadata", "title=" + title)
.outputOptions("-metadata", "artist=" + artist)
.outputOptions(outputOptions)
.on("error", function(err) {

@@ -147,0 +155,0 @@ callback(err.message, null);

{
"name": "youtube-mp3-downloader",
"version": "0.5.3",
"version": "0.6.2",
"description": "Downloads Youtube videos (in parallel, as streams), encodes the audio data as mp3 and stores them in a defineable location",

@@ -21,6 +21,7 @@ "keywords": [

"dependencies": {
"async": "^2.6.0",
"async": "^2.6.2",
"fluent-ffmpeg": "2.1.2",
"progress-stream": "^2.0.0",
"ytdl-core": "^0.20.1"
"sanitize-filename": "^1.6.1",
"ytdl-core": "^0.29.3"
},

@@ -40,3 +41,4 @@ "author": {

"url": "https://github.com/ytb2mp3/youtube-mp3-downloader/issues"
}
},
"types": "./typings/index.d.ts"
}

@@ -127,3 +127,4 @@ # Youtube MP3 Downloader

"queueParallelism": 2, // How many parallel downloads/encodes should be started?
"progressTimeout": 2000 // How long should be the interval of the progress reports
"progressTimeout": 2000, // How long should be the interval of the progress reports
"outputOptions" : ["-af", "silenceremove=1:0:-50dB"] // Additional output options passend to ffmpeg
});

@@ -130,0 +131,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc