Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@brainsights/media-tools

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brainsights/media-tools - npm Package Compare versions

Comparing version 3.4.5 to 3.4.6

24

media-track.js

@@ -23,3 +23,3 @@ const _ = require("lodash");

let rank = [
displayProfile.width/inputSize.width,
displayProfile.width/inputSize.width,
displayProfile.height/inputSize.height

@@ -36,3 +36,3 @@ ];

const computeOutputDisplaySize = (displayProfile, inputSize) =>
const computeOutputDisplaySize = (displayProfile, inputSize) =>
{

@@ -137,7 +137,7 @@ let width, height;

.addOptions([
`-map 0:${info.index}`,
`-map 0:${info.index}`,
])
.videoCodec(profile.video.codec)
.fps(Math.min(30, info.frame_rate))
.addOptions([
.addOptions([
`-quality ${profile.video.quality}`,

@@ -161,3 +161,3 @@ `-threads ${displayProfile.threads}`,

.addOptions([
`-pass 1`,
`-pass 1`,
`-passlogfile ${passlogFile}`,

@@ -189,3 +189,3 @@ `-speed 4`,

let pass2 = ffmpeg.clone()
.addOptions([
.addOptions([
`-speed ${profile.video.speed}`,

@@ -244,3 +244,3 @@ `-auto-alt-ref ${profile.video.autoAltRef}`,

let ffmpeg = new Ffmpeg({ source: __.get(this).media.path })
let ffmpeg = new Ffmpeg({ source: __.get(this).media.path })
.addOptions([

@@ -277,3 +277,3 @@ `-map 0:${info.index ? info.index : "a"}`,

pass1.on("progress", (progress) => {
context.progress(100*moment.duration(progress.timemark).as("milliseconds")/info.duration);
context.progress(progress.percent);
});

@@ -311,8 +311,8 @@ pass1.on("start", (command) => {

pass2.on("progress", (progress) => {
context.progress(100*moment.duration(progress.timemark).as("milliseconds")/info.duration);
context.progress(progress.percent);
});
pass2.on("start", (command) => {
debug(`audio pass 2: ${command}`);
});
pass2.saveToFile(outputFile);
});
pass2.saveToFile(outputFile);
}));

@@ -379,3 +379,3 @@

{
}

@@ -382,0 +382,0 @@ }

@@ -18,3 +18,3 @@ const path = require("path");

// const mediainfo = (path) =>
// const mediainfo = (path) =>
// {

@@ -134,3 +134,3 @@ // return new Promise((resolve, reject) => {

} else if(this.isImage()) {
let imageTrack = this.tracks.defaultImage();
let imageTrack = this.tracks.defaultImage();
let imageOutputFile = `${tempy.file({ extension: profile.image.fileExtension })}`;

@@ -183,3 +183,3 @@ tasks.push(imageTrack.transcode(profile, imageOutputFile));

.saveToFile(outputFile);
});
});
} else {

@@ -186,0 +186,0 @@ let item = media[0];

{
"name": "@brainsights/media-tools",
"version": "3.4.5",
"version": "3.4.6",
"description": "Tools for reading metadata and transcoding media files.",

@@ -5,0 +5,0 @@ "main": "index.js",

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