SavageCore / node-ffprobe-installer

Platform independent binary installer of FFprobe for node projects
https://www.npmjs.com/package/@ffprobe-installer/ffprobe
72 stars 29 forks source link

Command was killed with SIGSEGV #236

Closed azickri closed 1 month ago

azickri commented 1 year ago

Hello, i was trying execa with ffprobe for get video meta data. And i get response error Command was killed with SIGSEGV. Like in image.

Any solving from this error?

image


Spec VM:


My Code:

import * as execa from 'execa';
import * as ffprobe from '@ffprobe-installer/ffprobe';

private async isValidDuration(videoUrl: string) {
  try {
    if (!videoUrl) return true;

    const params = ['-v', 'error', '-show_format', '-show_streams'];
    const { stdout } = await execa(ffprobe.path, [...params, videoUrl]);

    const duration = stdout.match(/duration="?(\d*\.\d*)"?/)[1];

    if (Number(duration) > 60) {
      return false;
    }

    return true;
  } catch (_) {
    return true;
  }
}
dyc3 commented 1 year ago

Duplicate of #121