From f2ac570a97b5c935c7a47743f19291cb7e6e5e8a Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Mon, 23 May 2022 23:12:21 -0700 Subject: [PATCH] improve smart cut speed #126 --- src/ffmpeg.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ffmpeg.js b/src/ffmpeg.js index c46c895a..22abca9b 100644 --- a/src/ffmpeg.js +++ b/src/ffmpeg.js @@ -823,9 +823,9 @@ export async function cutEncodeSmartPart({ filePath, cutFrom, cutTo, outPath, ou // No progress if we set loglevel warning :( // '-loglevel', 'warning', - // cannot use -ss before -i here (will lead to issues) + '-ss', cutFrom.toFixed(5), // if we don't -ss before -i, seeking will be slow for long files, see https://github.com/mifi/lossless-cut/issues/126#issuecomment-1135451043 '-i', filePath, - '-ss', cutFrom.toFixed(5), + '-ss', '0', // If we don't do this, the output seems to start with an empty black after merging with the encoded part '-t', (cutTo - cutFrom).toFixed(5), ...mapStreamsArgs,