NodeJS : Fail to write byte array input from webcam to ffmpeg spawn process
I’am using NodeJS server to display a html page which has webcam option. Once user visited to my NodeJS server, it will serve html page. User can allow webcam option and see webcam view on the page. In the backend, I send webcam stream (byte array) using socket.io. I receive byte array successfully in backend with the help of socket.io. BUT MY PROBLEM IS, I can’t pipe this byte array to the ffmpeg spawn process. I don’t know how to properly pipe this data to the ffmpeg. Once it done, all my problem will be solved. On the other side, I have node-media-server as RTMP server to publish this stream to VLC player and other devices. Kindly help me to complete this task. I will attach all my code to this question. Kindly run this in your environment and answer the question.