我写在使用spawn创建的流中。他在nodeJs应用程序中阻止了其他用户的请求。如何启动该过程并写入该过程以避免阻塞?
recorder = spawn("ffmpeg", [
"-y", "-i", videoPath, "-r", videoFps,
"-f", "image2pipe", "-framerate", videoFps, "-i", "-",
"-filter_complex", "overlay", '-threads', '4', "-vcodec", "h264",
pathToDrawingVideo
]);
...
for (let i = 0; i < framesCount; i++) {
....
recorder.stdin.write(data, "binary");
}
recorder.stdin.end();
我希望nodejs进程不会被蜜蜂阻止,但实际会被阻止