mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 10:22:31 +01:00
Fix #195
This commit is contained in:
parent
d0667d0f21
commit
b33df356d5
@ -5,6 +5,7 @@ const fileType = require('file-type');
|
|||||||
const readChunk = require('read-chunk');
|
const readChunk = require('read-chunk');
|
||||||
const flatMap = require('lodash/flatMap');
|
const flatMap = require('lodash/flatMap');
|
||||||
const sum = require('lodash/sum');
|
const sum = require('lodash/sum');
|
||||||
|
const sortBy = require('lodash/sortBy');
|
||||||
const readline = require('readline');
|
const readline = require('readline');
|
||||||
const moment = require('moment');
|
const moment = require('moment');
|
||||||
const stringToStream = require('string-to-stream');
|
const stringToStream = require('string-to-stream');
|
||||||
@ -119,9 +120,10 @@ async function cut({
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function cutMultiple({
|
async function cutMultiple({
|
||||||
customOutDir, filePath, format, segments, videoDuration, rotation,
|
customOutDir, filePath, format, segments: segmentsUnsorted, videoDuration, rotation,
|
||||||
includeAllStreams, onProgress, stripAudio, keyframeCut,
|
includeAllStreams, onProgress, stripAudio, keyframeCut,
|
||||||
}) {
|
}) {
|
||||||
|
const segments = sortBy(segmentsUnsorted, 'cutFrom');
|
||||||
const singleProgresses = {};
|
const singleProgresses = {};
|
||||||
function onSingleProgress(id, singleProgress) {
|
function onSingleProgress(id, singleProgress) {
|
||||||
singleProgresses[id] = singleProgress;
|
singleProgresses[id] = singleProgress;
|
||||||
|
Loading…
Reference in New Issue
Block a user