'Sending MediaStream from React to Flask server
So, I'm trying to implement an Application using Next.js (React) client and Flask for server. I have implemented for now a basic client and backend just like in this tutorial https://github.com/nim-f/webrtc-react.
My goal is to take input from users' webcams (the stream) and process it with some Computer Vision and Machine Learning techniques (using OpenCV and PyTorch in Python). It would be best if I could process users' stream on my Flask server such that I could use some existing modules from Pytorch.
On client:
const stream = await navigator.mediaDevices.getUserMedia({ video: true })
// Send the stream to server
const getProcessedStream = getStreamFromServer(stream)
// And then I'd pass it to client
My problem is that I cannot find a solution that would send stream or user video data from client to backend. I have only found this answer but I am not sure this is the approach I would like to take.
Is there a possibility to implement what I want or should I stick to what is proposed in that answer?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
