Search code examples
javascriptwebrtcrtmpjanus

broswer push camera stream to media server


everyone .I need some help for some stream problems, here is my to do list. I want stream my camera stream,microphone stream via broswer to a media server, and a python server need to pull this stream to do some asr, tts things. After that ,It generate a reply stream and push back to media server ,and the broswer pull this stream. My plan is like this.

  1. broswer stream to rtmp server use rtmp protocol
  2. python server pull this stream use rtmp
  3. python server push its reply to rtmp server
  4. broswer pull it

but, my question is how can broswer stream rtmp to rtmp server? cause As far as I know I can just use webrtc to do this in broswer?

so the process maybe like this?

  1. broswer stream to janus(or other webrtc server) use webrtc
  2. python use webrtc to pull this stream
  3. python server push its reply to janus
  4. broswer pull this stream use webrtc

but, I'm not sure whether step 2 or step 3 can be done, cause I don't know how to use webrtc in a python environment and without a broswer and use my own stream(not a camera stream)

or can janus convert and push webrtc stream to rtmp server ?

Any helps will be appraciated, thanks.


Solution

  • I know that with mediasoup you can send the camera to the server with webrtc. Then you can use the server to retransmit it to your algos with rtp and lastly send the response back to the client using webrtc again.