ibm-early-programs / node-red-contrib-media-utils

A collection of Node-RED media nodes that can be used with IBM Watson services
6 stars 5 forks source link

ffmpeg segment node : TypeError [ERR_INVALID_ARG_TYPE]: The "cb" argument must be of type function #21

Open bmarolleau opened 1 year ago

bmarolleau commented 1 year ago

Hi,

I'm trying to split a WAV file into multiple smaller files using the ffmpeg segment node , and I'm getting this error with either a buffer or URL as msg.payload input, and msg.times = [1,3,5] for example. The output files and csv are generated and it crashes before sending any output buffers. Any ideas ? thx.

 [error] TypeError [ERR_INVALID_ARG_TYPE]: The "cb" argument must be of type function. Received undefined
    at makeCallback (node:fs:198:3)
    at Object.unlink (node:fs:1867:14)
    at .node-red/node_modules/node-red-contrib-media-utils/ffmpeg-segment/ffmpeg-segment.js:112:14
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

node -v
v18.17.1
ffmpeg --version
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
  built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
chughts commented 1 year ago

Do you have a sample flow so that the error can be recreated?