|
|
@ -32,6 +32,7 @@ const cli = meow(` |
|
|
--fps FPS which all videos will be converted to |
|
|
--fps FPS which all videos will be converted to |
|
|
--font-path Set default font to a .ttf |
|
|
--font-path Set default font to a .ttf |
|
|
--audio-file-path Add an audio track |
|
|
--audio-file-path Add an audio track |
|
|
|
|
|
--keep-source-audio Keep audio from source files |
|
|
|
|
|
|
|
|
--fast, -f Fast mode (low resolution and FPS, useful for getting a quick preview) |
|
|
--fast, -f Fast mode (low resolution and FPS, useful for getting a quick preview) |
|
|
--verbose, -v |
|
|
--verbose, -v |
|
|
@ -45,6 +46,7 @@ const cli = meow(` |
|
|
`, {
|
|
|
`, {
|
|
|
flags: { |
|
|
flags: { |
|
|
verbose: { type: 'boolean', alias: 'v' }, |
|
|
verbose: { type: 'boolean', alias: 'v' }, |
|
|
|
|
|
keepSourceAudio: { type: 'boolean' }, |
|
|
fast: { type: 'boolean', alias: 'f' }, |
|
|
fast: { type: 'boolean', alias: 'f' }, |
|
|
transitionDuration: { type: 'number' }, |
|
|
transitionDuration: { type: 'number' }, |
|
|
clipDuration: { type: 'number' }, |
|
|
clipDuration: { type: 'number' }, |
|
|
@ -92,7 +94,7 @@ const cli = meow(` |
|
|
params.clips = clips.map((clip) => ({ layers: [clip] })); |
|
|
params.clips = clips.map((clip) => ({ layers: [clip] })); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const { verbose, transitionName, transitionDuration, clipDuration, width, height, fps, audioFilePath, fontPath, fast, out: outPath } = cli.flags; |
|
|
|
|
|
|
|
|
const { verbose, transitionName, transitionDuration, clipDuration, width, height, fps, audioFilePath, fontPath, fast, out: outPath, keepSourceAudio } = cli.flags; |
|
|
|
|
|
|
|
|
if (transitionName || transitionDuration != null) { |
|
|
if (transitionName || transitionDuration != null) { |
|
|
params.defaults.transition = {}; |
|
|
params.defaults.transition = {}; |
|
|
@ -110,6 +112,7 @@ const cli = meow(` |
|
|
|
|
|
|
|
|
if (outPath) params.outPath = outPath; |
|
|
if (outPath) params.outPath = outPath; |
|
|
if (audioFilePath) params.audioFilePath = audioFilePath; |
|
|
if (audioFilePath) params.audioFilePath = audioFilePath; |
|
|
|
|
|
if (keepSourceAudio) params.keepSourceAudio = true; |
|
|
if (width) params.width = width; |
|
|
if (width) params.width = width; |
|
|
if (height) params.height = height; |
|
|
if (height) params.height = height; |
|
|
if (fps) params.fps = fps; |
|
|
if (fps) params.fps = fps; |
|
|
|