4

I'm an android developer but a noob in nodejs.I want to create a live radio appliction so I use android to create the client app and nodejs to create the server.

Step:

  • Android : MediaRecord to record video and transfer to nodejs server.
  • Nodejs server : Receive the stream and transfer it to another clients or save it in the database.

I read the MediaRecord apis and found the native way to send stream videos to server.

Socket socket = new Socket(“xxx.xxx.x.xxx”, 8890);
ParcelFileDescriptor pfd = ParcelFileDescriptor.fromSocket(socket);
MediaRecorder.setOutputFile(pfd.getFileDescriptor()); 

But it the NATIVE socket. NOT suit for nodejs server.

I use the Socket.io to establish the socket server and the socket.io-client in android client to connect to the socket server. But it doesn't support to transfer the stream video info from android to server. Then I found socket.io-stream. It supports to transfer the stream info but no any android api. So I want to know what should I do or what should I use to transfer stream videos from Android to a nodejs server? Do I need to estabilsh my own nodejs socket libs to finish this work?
Any help will be appreciated. Thanks anyway.

CytQ
  • 41
  • 1
  • 2
  • [duplicate] please see here http://stackoverflow.com/questions/23822821/how-to-stream-audio-video-with-socket-io-from-node-js-server-to-html5-page – Heartbit Jan 02 '17 at 12:08
  • @SaeidAlidadi I tried Socket.io-stream before. It's working for html and server. But it's no Android apis. Socket.io has a client lib Socket.io-client. There's Android apis in it. Thanks anyway. – CytQ Jan 02 '17 at 12:21
  • @SaeidAlidadi And I searched StackOverFlow and Google before I asked this question. No answers for ANDROID TO NODEJS SERVER. – CytQ Jan 02 '17 at 12:23
  • did you read here also?http://stackoverflow.com/questions/22245537/transfer-real-time-video-stream-to-server-using-android?rq=1 – Heartbit Jan 02 '17 at 18:14
  • @SaeidAlidadi yeah. I did. The question is I know how to post the stream from Android with the native way and handle it in a j2ee server but I don't know how to handle it with NODEJS SERVER rather than j2ee.So I want to find a lib to help me establish connections between nodejs server and Android client. Like the Socket.io and Socket.io-client, they can help me build a socket server but it's not support to transfer stream. – CytQ Jan 03 '17 at 10:29
  • Is this solved yet? I'm also trying to figure it out. – Jaswant Singh Sep 18 '19 at 08:20

0 Answers0