2

I am using fluent-ffmpeg to resize a video, split into frames, etc. Here's my code:

ffmpeg("./uploads/video.mp4")
    .output("./uploads/small-video.mp4")
    .noAudio()
    .size('320x?')
    .on('end', function() {
        extractVideoFrames("./uploads/small-video.mp4")
    })
    .run()

I am getting a SIGSEGV error, which I suspect might be because of some weird memory issue? Here's the error:

Error: ffmpeg was killed with signal SIGSEGV
    at ChildProcess.<anonymous> (/home/admin/superformweb/node_modules/fluent-ffmpeg/lib/processor.js:180:22)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)
Emitted 'error' event on FfmpegCommand instance at:
    at emitEnd (/home/admin/superformweb/node_modules/fluent-ffmpeg/lib/processor.js:424:16)
    at /home/admin/superformweb/node_modules/fluent-ffmpeg/lib/processor.js:433:16
    at wrapper (/home/admin/superformweb/node_modules/async/dist/async.js:271:20)
    at next (/home/admin/superformweb/node_modules/async/dist/async.js:5795:24)
    at /home/admin/superformweb/node_modules/async/dist/async.js:327:20
    at wrapper (/home/admin/superformweb/node_modules/async/dist/async.js:271:20)
    at next (/home/admin/superformweb/node_modules/async/dist/async.js:5795:24)
    at /home/admin/superformweb/node_modules/async/dist/async.js:327:20
    at /home/admin/superformweb/node_modules/fluent-ffmpeg/lib/capabilities.js:519:16
    at handleExit (/home/admin/superformweb/node_modules/fluent-ffmpeg/lib/processor.js:170:11)

I have installed ffmpeg first: sudo apt-get install ffmpeg Then I installed node packages:

npm install ffmpeg
npm install fluent-ffmpeg
C G
  • 21
  • 2

0 Answers0