Skip to content

Commit

Permalink
add concurrency to cli and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
transitive-bullshit committed Apr 7, 2018
1 parent ed334ac commit 1006967
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = async (argv) => {
.option('-d, --transition-duration <duration>', 'duration of transition to use in ms', parseInt, 500)
.option('-T, --transitions <file>', 'json file to load transitions from')
.option('-f, --frame-format <format>', 'format to use for temp frame images', /^(raw|png|jpg)$/i, 'raw')
.option('-c, --concurrency <number>', 'concurrency to process videos', parseInt, 4)
.option('-c, --concurrency <number>', 'number of videos to process in parallel', parseInt, 4)
.option('-C, --no-cleanup-frames', 'disables cleaning up temp frame images')
.parse(argv)

Expand All @@ -35,6 +35,7 @@ module.exports = async (argv) => {

await concat({
log: console.log,
concurrency: program.concurrency,

videos,
output: program.output,
Expand Down
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ npm install -g ffmpeg-concat
-d, --transition-duration <duration> duration of transition to use in ms (default: 500)
-T, --transitions <file> json file to load transitions from
-f, --frame-format <format> format to use for temp frame images (default: raw)
-c, --concurrency <number> number of videos to process in parallel (default: 4)
-C, --no-cleanup-frames disables cleaning up temp frame images
-h, --help output usage information

Expand Down Expand Up @@ -189,6 +190,13 @@ Default: `true`

By default, we cleanup temporary frame images. Set this to `false` if you need to debug intermediate results.

##### concurrency

Type: `Number`
Default: `4`

Max number of videos to process in parallel.

##### log

Type: `Function`
Expand Down

0 comments on commit 1006967

Please sign in to comment.