2

For quite a while now I've been trying to achieve this functionality, I'm perfectly able to play and record a video using Surface view and trying to send that "Video Stream" to a socket address using the ParcelFileDescriptor.

On the android side I need to use the default java socket but for some reason I'm not able to receive the video stream on my node server. Any ideas will be helpful. I just simply want to send what I'm seeing on my screen on Android device using Sockets.

I've read that there's Socket.io and Socket.client to connect to Node server but there's no Socket.stream to stream data. I don't want to use libstream either, Just native APIs and Libraries that come bundled with the Android SDK.

Jaswant Singh
  • 9,900
  • 8
  • 29
  • 50
  • 1
    Have you tried node js streams ? – ireshan pathirana Feb 08 '20 at 02:45
  • 1
    Take a gander over to https://stackoverflow.com/questions/2550847/streaming-video-from-android-camera-to-server for some ideas including multiple libraries. If it's open source, you can read how they did it. It's talking Camera, but might give you an idea from that. – Head Wizard Locke Feb 10 '20 at 18:35
  • @HeadWizardLocke That thread is more of a discussion than a strong solution. Seems like I need to use the webrtc and figure out how to use it. Actually my final goal is to stream the AR Camera to the server not just a plain stream. – Jaswant Singh Feb 11 '20 at 10:15
  • @JaswantSingh Yeah it is not something I have a quick fix for, but that discussion does have some code and libraries you can look into. You could add the AR layer after capturing from the camera. – Head Wizard Locke Feb 14 '20 at 15:30
  • Well, I went ahead and used WebRTC. I also created a wrapper for WebRTC to stream ARCore to the video stream! – Jaswant Singh Jul 07 '23 at 12:24

0 Answers0