1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-22 02:12:30 +01:00

Don't cut start if start time is 0

To cause issue with black video in the beginning
https://github.com/mifi/lossless-cut/issues/50
This commit is contained in:
Mikael Finstad 2017-11-21 22:28:42 +01:00
parent 9bc63240d4
commit fdd0794a13

View File

@ -64,9 +64,12 @@ async function cut(customOutDir, filePath, format, cutFrom, cutTo, onProgress) {
console.log('Cutting from', cutFrom, 'to', cutTo); console.log('Cutting from', cutFrom, 'to', cutTo);
// https://github.com/mifi/lossless-cut/issues/50
const cutFromArgs = cutFrom === 0 ? [] : ['-ss', cutFrom];
const ffmpegArgs = [ const ffmpegArgs = [
'-i', filePath, '-y', '-vcodec', 'copy', '-acodec', 'copy', '-i', filePath, '-y', '-vcodec', 'copy', '-acodec', 'copy',
'-ss', cutFrom, '-t', cutTo - cutFrom, ...cutFromArgs, '-t', cutTo - cutFrom,
'-map_metadata', '0', '-map_metadata', '0',
'-f', format, '-f', format,
outPath, outPath,