1

I am trying to program an Android app that will be able to open the webcam and upload the recording live to another server.

Right now I have only found solutions where Android providing the stream on its port, instead of sending it. So to clarify, I would like to send the data to the server (upload).

I don't want to use a closed source program, but rather program it myself. I have some medium android programming knowledge, but the theoretical knowledge about how to accomplish this is missing.

Could anybody please point me out to the right direction. Is this even possibe?

Regards

Edit: Maybe some sort of RTP/RTSP setup would be possibel. I do not care about compatibility on android versions. So everything in that direction is welcome too.

Edit2: Sorry to have been so unclear in the first place. I do have to implement it myself, but I can use existing code. What I cannot do is use already closed source implementations.

lockdoc
  • 1,539
  • 1
  • 18
  • 31

2 Answers2

1

using MediaRecorder, you can capture video to a file. here's a post about it,

Android: Does anyone know how to capture video?

to "stream" it to a server, you could recorder a (never ending) series of short videos, say 10s each, and upload the chunks to the server. if you wanted to get fancy, you could have the server stitch them together.

Community
  • 1
  • 1
Jeffrey Blattman
  • 22,176
  • 9
  • 79
  • 134
  • 10s would be too long. I somehow need to be able to directly stream the webcam into the server, which will then store it to disk or ramdisk (depending on the scenario). – lockdoc Oct 30 '12 at 19:55
  • i don't see an obvious way to accomplish that with the SDK. doesn't mean it's not possible :) good luck. – Jeffrey Blattman Oct 31 '12 at 04:17
  • Hi Jeffrey, thanks for your replies so far. I have done more research on this which is not too clear to me right now. As far as I have read, I can use MediaRecorder, but intstead of writing the output to many files, I can write the output to a single listening socket on the phone itself, which will take the data and wrap it into a RTP packet and send it to the server. Any more thoughts about this theoretical approach? – lockdoc Oct 31 '12 at 09:34
  • sounds reasonable, but i don't see a way to do that w/ the Android SDK. – Jeffrey Blattman Nov 01 '12 at 13:10
-2

Install Bambuser. Ask them what intents are available to launch it. Done.

If you really need the video stored on your own server, maybe you could make some sort of arrangement with Bambuser.

Edward Falk
  • 9,991
  • 11
  • 77
  • 112