RootEncoder icon indicating copy to clipboard operation
RootEncoder copied to clipboard

Streaming to web browser?

Open ToysoftInc opened this issue 2 years ago • 9 comments

Is there a way stream the camera to a web page with this library? thx

ToysoftInc avatar Nov 13 '21 16:11 ToysoftInc

This question is a bit confuse. What do you mean with a web page?

  • If you mean stream to platform like YouTube, Facebook or Twitch. Yes, you can do it with RTMP protocol.
  • If you mean to your own web player. Yes you can do it using this library and a media server.
  • If you want stream to a web player without media server. You need find a RTSP player for web browser I think it is difficult but you can find one. Check this extension of the library: https://github.com/pedroSG94/RTSP-Server

pedroSG94 avatar Nov 13 '21 16:11 pedroSG94

I have a webserver running on my Android device and I want to stream the camera eg: preview from a webpage. When I connect from my desktop computer to the webserver I want to see the camera.

Or it is as simple as making a webview on the server and access the camera?

ToysoftInc avatar Nov 13 '21 16:11 ToysoftInc

First of all. If you want use this library you need a media server: https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/wiki/Media-servers-tested

I don't understand what do you mean with "preview from webpage" or which type of "webserver" you are using but your media server must support RTMP or RTSP push. To reproduce the stream you need a player compatible with your media server depend of pull protocols supported in your media server.

Your second option, as mentioned above, is use the extension of this library that create a RTSP media server in your device and you can connect a RTSP player to that server: https://github.com/pedroSG94/RTSP-Server

pedroSG94 avatar Nov 13 '21 17:11 pedroSG94

I'm creating my own web server app that runs on Android. When I connect to the web server from a desktop browser i want to show the camera preview. The web server and browser are on the same wifi network.

I already have your rtsp server and it works fine but I want to know if it is possible to use your lib and show the camera in on a web page so that anyone connecting the web server will see the live camera feed.

ToysoftInc avatar Nov 13 '21 23:11 ToysoftInc

In that case you can use: https://github.com/pedroSG94/RTSP-Server But you need a RTSP player and I don't know if it is possible on browser.

pedroSG94 avatar Nov 13 '21 23:11 pedroSG94

I'm creating my own web server app that runs on Android. When I connect to the web server from a desktop browser i want to show the camera preview. The web server and browser are on the same wifi network.

I already have your rtsp server and it works fine but I want to know if it is possible to use your lib and show the camera in on a web page so that anyone connecting the web server will see the live camera feed.

please use wasm or this this

zhubinsheng avatar Nov 23 '21 02:11 zhubinsheng

I will recommend to pass the media-projection data to webrtc using either lib-jinggle and then read the remote stream on web browser.

maddygoround avatar Nov 24 '21 13:11 maddygoround

I need to do all this on the Android device. I can not stream to a server ( I can do this with rtmp server lib). The web server will be the actual device.

So in summary: I want to let users connect to my web server running on the Android device and view live camera feed from their own web browser.

ToysoftInc avatar Dec 11 '21 16:12 ToysoftInc

RTMP as server is not supported, I only have RTSP as server so you can't do it.

pedroSG94 avatar Dec 11 '21 19:12 pedroSG94