Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stream video to WebRTC from app not browser

I have search high and low and have yet to find a “clear” answer to if this can be done or how to do it (I’m happy to write a app just need to know what to use)

  1. I have a Raspberry Pi, I want to stream video and audio from its USB Web cam to a WebRTC-Server/Client.
  2. My Raspberry Pi has no GUI/Xwindows installed and thus has no web browser (even with a GUI there is no WebRTC browser that works on Raspberry Pi)

So what I want is a way to make an app in Java or Python or JS that needs no GUI… I give it start commands to tell it where the WebRTC server is (IP) and the room to join… or I set them in a config file.. - It could be I need to tell the app/code what video and audio to send as well.

? So what code is out there that would enable me to develop the above solution?

I have seen a few things but I’m not clear if they can be used to so what I’m asking :

  • Janus (Not sure if it’s made for doing what I want) http://janus.conf.meetecho.com/
  • Gstreamer (This may be it but again not sure how I would sent too my RTCserver)
  • Sourcey (close but in C++ and it looked to have problems in using outside WebRTC server http://sourcey.com/webrtc-native-to-browser-video-streaming-example/

Again to explain:

  1. I have small Linux device (RasPi) it has web cam and microphone
  2. It has no GUI No xWindows and so no Browser to do WebRTC on
  3. I want to stream the webcam video and audio to my WebRTC-Server/Client
  4. I don’t need to get video back from the other client.. This is out only.
  5. I am not trying to turn my RasPi into a WebRTC Server, have seen that a lot but it’s not what I’m asking for.

I know Java and Python I’m happy to develop the app in one of them I just need to know what technology to use to send video/audio to a WebRTC server and any supporting info with in is helpful. I will post link to working app here once it’s developed, may be useful to others that want to stream to a WebRTC room from small cheap Linux device.

like image 262
Shane Avatar asked Nov 01 '22 10:11

Shane


1 Answers

UV4L exactly does what you want:

Thanks to a new, special module for UV4L, it is now possible to join a room of any Jitsi Meet Web Conference anywhere (including those on the free, public meet.jit.si service) and broadcast live video and audio from your camera and microphone to all the participants or viewers in the room without the need of any browser!

In your application it's enough to send the proper commands to the UV4L Streaming Server via HTTP/GET to start&stop the streaming and pass the URL of the Jitsi videobridge you want to connect to.

like image 79
strumps Avatar answered Nov 04 '22 06:11

strumps