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.7 to 3.4.8

8

media-track.js

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

const debug = require("debug")("media-tools:media-track");
const fs = require("fs-extra");
const __ = new WeakMap();

@@ -130,6 +131,8 @@

let info = __.get(this).info;
let passlogFile = tempy.file();
let displayProfile = selectBestDisplayProfile(profile.DISPLAY_TRACK_SETTINGS, info);
let tasks = [];
let cleanupFiles = [];
let passlogFile = tempy.file();
let ffmpeg = new Ffmpeg({ source: __.get(this).media.path })

@@ -207,3 +210,4 @@ .addOptions([

});
pass2.on("end", () => {
pass2.on("end", async () => {
await fs.remove(passlogFile);
context.progress(100);

@@ -210,0 +214,0 @@ context.resolve(outputFile);

@@ -118,5 +118,7 @@ const path = require("path");

let tasks = [];
let cleanupFiles = [];
if(this.isVideo()) {
let videoTrack = this.tracks.defaultVideo();
let videoOutputFile = `${tempy.file({ extension: profile.video.fileExtension })}`;
cleanupFiles.push(videoOutputFile);
tasks.push(videoTrack.transcode(profile, videoOutputFile));

@@ -127,2 +129,3 @@

let audioOutputFile = `${tempy.file({ extension: profile.audio.fileExtension })}`;
cleanupFiles.push(audioOutputFile);
tasks.push(audioTrack.transcode(profile, audioOutputFile));

@@ -133,2 +136,3 @@ }

let audioOutputFile = `${tempy.file({ extension: profile.audio.fileExtension })}`;
cleanupFiles.push(audioOutputFile);
tasks.push(audioTrack.transcode(profile, audioOutputFile));

@@ -138,2 +142,3 @@ } else if(this.isImage()) {

let imageOutputFile = `${tempy.file({ extension: profile.image.fileExtension })}`;
cleanupFiles.push(imageOutputFile);
tasks.push(imageTrack.transcode(profile, imageOutputFile));

@@ -155,2 +160,5 @@ }

media = await Media.merge(await Promise.all(_.map(outputFiles, Media.load)), outputFile, options);
for(let file of cleanupFiles) {
await fs.remove(file);
}
} catch(e) {

@@ -157,0 +165,0 @@ console.trace(e);

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

@@ -22,3 +22,6 @@ "main": "index.js",

"tmp-promise": "1.0.4"
},
"volta": {
"node": "10.24.1"
}
}

Sorry, the diff of this file is not supported yet

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