|
|
|
|
@ -76,8 +76,12 @@ function handleProgress(process, cutDuration, onProgress) {
|
|
|
|
|
|
|
|
|
|
const rl = readline.createInterface({ input: process.stderr });
|
|
|
|
|
rl.on('line', (line) => {
|
|
|
|
|
// console.log('progress', line);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const match = line.match(/frame=\s*[^\s]+\s+fps=\s*[^\s]+\s+q=\s*[^\s]+\s+(?:size|Lsize)=\s*[^\s]+\s+time=\s*([^\s]+)\s+/); // eslint-disable-line max-len
|
|
|
|
|
let match = line.match(/frame=\s*[^\s]+\s+fps=\s*[^\s]+\s+q=\s*[^\s]+\s+(?:size|Lsize)=\s*[^\s]+\s+time=\s*([^\s]+)\s+/);
|
|
|
|
|
// Audio only looks like this: "line size= 233422kB time=01:45:50.68 bitrate= 301.1kbits/s speed= 353x "
|
|
|
|
|
if (!match) match = line.match(/(?:size|Lsize)=\s*[^\s]+\s+time=\s*([^\s]+)\s+/);
|
|
|
|
|
if (!match) return;
|
|
|
|
|
|
|
|
|
|
const str = match[1];
|
|
|
|
|
|