ffmpeg.js icon indicating copy to clipboard operation
ffmpeg.js copied to clipboard

Cannot read property 'write' of undefined

Open liyang9331 opened this issue 3 years ago • 2 comments

image

liyang9331 avatar Jul 29 '22 01:07 liyang9331

image

liyang9331 avatar Jul 29 '22 01:07 liyang9331

If you look at the example, the print and printErr functions are set. If you don't set those, process.stderr and process.stdout are used by default, which are undefined in browser:

For example, you can do this:

let stdout = "";
let stderr = "";

ffmpeg({
  arguments: ["-version"],
  print: function(data) { stdout += data + "\n"; },
  printErr: function(data) { stderr += data + "\n"; },
});

genu avatar Sep 19 '22 14:09 genu