ffmpeg – i want to convert my webcam video into rtmp format i use react as client and node js as server but facing issue I/ error

const ffStreamYouTube = ffmpeg()
.setFfmpegPath(ffmpegPath)
.input(dataStream)
.inputFormat(“bin”)
// .inputFPS(30)
.videoFilters(scale=${desiredWidth}:${desiredHeight})
.videoCodec(“libx264”)
.outputFormat(“flv”)
.output(“rtmp://localhost:1935/live”)
.on(“end”, () => {
console.log(“YouTube streaming finished”);
})
.on(“error”, (err) => {
console.error(“Error:”, err.message);
});

ffStreamYouTube.run();
this is the server side code i got the data as binary 
enter code here
FFmpeg Error: Error: ffmpeg exited with code 1: rtmp://localhost:1935/live: I/O error

at ChildProcess.<anonymous> (C:\Users\abhimanue\Desktop\Livenex\LiveNex\server\live-stream\node_modules\fluent-ffmpeg\lib\processor.js:182:22)
at ChildProcess.emit (node:events:512:28)
at ChildProcess._handle.onexit (node:internal/child_process:293:12) can anyone help me

Read more here: Source link