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

@transloadit/analyze-step

Package Overview
Dependencies
Maintainers
3
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@transloadit/analyze-step - npm Package Compare versions

Comparing version 0.0.21 to 0.0.22

10

analyzeStep.js

@@ -222,3 +222,3 @@ const formatDurationMs = require('@transloadit/format-duration-ms')

if (str.match(/^empty/i)) {
str = 'Original Codec Settings'
str = 'original codec Settings'
}

@@ -262,2 +262,6 @@ if (str.match(/^(flac|mp3|ogg)/i)) {

str = `Slowdown video to half speed`
} else if (_.has(step, 'ffmpeg.filter_complex') && step.ffmpeg.filter_complex.includes('setpts=')) {
str = `Change video speed`
} else if (_.has(step, 'ffmpeg.filter_complex') && step.ffmpeg.filter_complex.includes('atempo=')) {
str = `Change audio speed`
} else if (('width' in step || 'height' in step) && (step.width !== '${file.meta.width}') && (step.height !== '${file.meta.height}')) {

@@ -288,2 +292,6 @@ str = `Resize videos` + humanDimensions(step)

str = `Take a ${_.get(step, 'ffmpeg.t')}s clip out of audio at a specified offset`
} else if (_.has(step, 'ffmpeg.filter_complex') && step.ffmpeg.filter_complex.includes('setpts=')) {
str = `Change video speed`
} else if (_.has(step, 'ffmpeg.filter_complex') && step.ffmpeg.filter_complex.includes('atempo=')) {
str = `Change audio speed`
} else if ('bitrate' in step) {

@@ -290,0 +298,0 @@ str = `Adjust audio bitrates`

@@ -8,3 +8,2 @@ const analyzeStep = require('./analyzeStep.js')

purpose_words: 'Convert, resize, or watermark images',
},

@@ -19,2 +18,6 @@ '/file/filter': {

},
'/video/encode': {
rname : '/video/encode',
purpose_words: 'Transcode, resize, or watermark videos',
},
}

@@ -33,2 +36,26 @@

expect(analyzeStep({
use : ':original',
robot : '/video/encode',
result : true,
preset : 'empty',
ffmpeg_stack: 'v3.3.3',
}, ROBOTS)).toMatch('Transcode videos to original codec Settings')
expect(analyzeStep({
use : ':original',
robot : '/video/encode',
result : true,
preset : 'empty',
ffmpeg_stack: 'v3.3.3',
rotate : false,
ffmpeg : {
filter_complex: '[0:v]setpts=2.0*PTS[v];[0:a]atempo=0.5[a]',
map : [
'[v]',
'[a]',
],
},
}, ROBOTS)).toMatch('Change video speed')
expect(analyzeStep({
robot : '/image/resize',

@@ -35,0 +62,0 @@ width : '75',

4

package.json

@@ -21,4 +21,4 @@ {

},
"version": "0.0.21",
"gitHead": "262a707c720fb52cf7e0e0488c5c870f2b3ffbc6"
"version": "0.0.22",
"gitHead": "0f4e5fc430e70cca68201a8f4e129469a265bbc0"
}
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