| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -82,7 +82,7 @@ function getExtensionForFormat(format) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					async function cut({
 | 
					 | 
					 | 
					 | 
					async function cut({
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  filePath, outFormat, cutFrom, cutTo, videoDuration, rotation,
 | 
					 | 
					 | 
					 | 
					  filePath, outFormat, cutFrom, cutTo, videoDuration, rotation,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  onProgress, copyStreamIds, keyframeCut, outPath,
 | 
					 | 
					 | 
					 | 
					  onProgress, copyStreamIds, keyframeCut, outPath, appendFfmpegCommandLog,
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}) {
 | 
					 | 
					 | 
					 | 
					}) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  console.log('Cutting from', cutFrom, 'to', cutTo);
 | 
					 | 
					 | 
					 | 
					  console.log('Cutting from', cutFrom, 'to', cutTo);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -126,7 +126,11 @@ async function cut({
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    '-f', outFormat, '-y', outPath,
 | 
					 | 
					 | 
					 | 
					    '-f', outFormat, '-y', outPath,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  ];
 | 
					 | 
					 | 
					 | 
					  ];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  console.log('ffmpeg', ffmpegArgs.join(' '));
 | 
					 | 
					 | 
					 | 
					  const mapArg = arg => (/[^0-9a-zA-Z-_]/.test(arg) ? `'${arg}'` : arg);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  const ffmpegCommand = `ffmpeg ${ffmpegArgs.map(mapArg).join(' ')}`;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  console.log(ffmpegCommand);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  appendFfmpegCommandLog(ffmpegCommand);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  onProgress(0);
 | 
					 | 
					 | 
					 | 
					  onProgress(0);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -142,6 +146,7 @@ async function cut({
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					async function cutMultiple({
 | 
					 | 
					 | 
					 | 
					async function cutMultiple({
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  customOutDir, filePath, segments: segmentsUnsorted, videoDuration, rotation,
 | 
					 | 
					 | 
					 | 
					  customOutDir, filePath, segments: segmentsUnsorted, videoDuration, rotation,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  onProgress, keyframeCut, copyStreamIds, outFormat, isOutFormatUserSelected,
 | 
					 | 
					 | 
					 | 
					  onProgress, keyframeCut, copyStreamIds, outFormat, isOutFormatUserSelected,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  appendFfmpegCommandLog,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}) {
 | 
					 | 
					 | 
					 | 
					}) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  const segments = sortBy(segmentsUnsorted, 'cutFrom');
 | 
					 | 
					 | 
					 | 
					  const segments = sortBy(segmentsUnsorted, 'cutFrom');
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  const singleProgresses = {};
 | 
					 | 
					 | 
					 | 
					  const singleProgresses = {};
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -174,6 +179,7 @@ async function cutMultiple({
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      cutTo,
 | 
					 | 
					 | 
					 | 
					      cutTo,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      // eslint-disable-next-line no-loop-func
 | 
					 | 
					 | 
					 | 
					      // eslint-disable-next-line no-loop-func
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      onProgress: progress => onSingleProgress(i, progress),
 | 
					 | 
					 | 
					 | 
					      onProgress: progress => onSingleProgress(i, progress),
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      appendFfmpegCommandLog,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    });
 | 
					 | 
					 | 
					 | 
					    });
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    outFiles.push(outPath);
 | 
					 | 
					 | 
					 | 
					    outFiles.push(outPath);
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |