1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-22 02:12:30 +01:00
This commit is contained in:
Mikael Finstad 2019-11-04 19:31:43 +08:00
parent d0667d0f21
commit b33df356d5

View File

@ -5,6 +5,7 @@ const fileType = require('file-type');
const readChunk = require('read-chunk');
const flatMap = require('lodash/flatMap');
const sum = require('lodash/sum');
const sortBy = require('lodash/sortBy');
const readline = require('readline');
const moment = require('moment');
const stringToStream = require('string-to-stream');
@ -119,9 +120,10 @@ async function cut({
}
async function cutMultiple({
customOutDir, filePath, format, segments, videoDuration, rotation,
customOutDir, filePath, format, segments: segmentsUnsorted, videoDuration, rotation,
includeAllStreams, onProgress, stripAudio, keyframeCut,
}) {
const segments = sortBy(segmentsUnsorted, 'cutFrom');
const singleProgresses = {};
function onSingleProgress(id, singleProgress) {
singleProgresses[id] = singleProgress;