fix smartcut with segment between keyframes

due https://github.com/mifi/lossless-cut/issues/126
pull/1198/head
firstzerg 4 years ago committed by Mikael Finstad
parent 60b73dae3d
commit c9175d4270

@ -390,6 +390,13 @@ function useFfmpegOperations({ filePath, enableTransferTimestamps }) {
const smartCutSegmentsToConcat = [smartCutEncodedPartOutPath, smartCutMainPartOutPath];
if (smartCutFrom > cutTo) {
if (!detectedFps) throw new Error('Smart cut is not possible when FPS is unknown');
const file = getSegmentOutPath();
await cutEncodeSmartPart({ filePath, cutFrom: desiredCutFrom, cutTo, outPath: file, outFormat, videoCodec, videoBitrate, videoStreamIndex, videoTimebase, allFilesMeta, copyFileStreams: copyFileStreamsFiltered, ffmpegExperimental });
return file;
}
// for smart cut we need to use keyframe cut here
await cutSingle({
cutFrom: smartCutFrom, cutTo, chaptersPath, outPath: smartCutMainPartOutPath, copyFileStreams: copyFileStreamsFiltered, keyframeCut: true, avoidNegativeTs: false, videoDuration, rotation, allFilesMeta, outFormat, appendFfmpegCommandLog, shortestFlag, ffmpegExperimental, preserveMovData, movFastStart, customTagsByFile, customTagsByStreamId, dispositionByStreamId, videoTimebase, onProgress: onCutProgress,

Loading…
Cancel
Save