@transloadit/analyze-step
Advanced tools
Comparing version 0.0.21 to 0.0.22
@@ -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', |
@@ -21,4 +21,4 @@ { | ||
}, | ||
"version": "0.0.21", | ||
"gitHead": "262a707c720fb52cf7e0e0488c5c870f2b3ffbc6" | ||
"version": "0.0.22", | ||
"gitHead": "0f4e5fc430e70cca68201a8f4e129469a265bbc0" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56636
570