Frage

I am attempting to make an application which streams to my pc directly from my android camera, is this possible? if so can someone provide me with directions on how to start? or if possible provide some source code for any examples that do so?

Many thanks!

War es hilfreich?

Lösung

There are many different ways to approach this case. It all depends on details of your planned system.

  • Is sending the video to your PC all that you need?
  • Would it be enough to show on PC's screen the video stream from your android device?
  • Or would you need to receive some raw video frames so you can edit it later?
  • and so on...

Based on what you just wrote in the question, I suggest you first take a look at the thing called WebRTC. It allows you to build solutions just like the one you wanted (i think).

You can build an Android client based on it (e.g. you can try to follow this example - but i think there was some problem with one of the needed libraries, I'm not sure...).

The other approach would be to use some third-party library (usually based on WebRTC).

I have personally used TokBox which in current android library version (Beta 2.2) was working really nicely as long as you didn't need the two-way audio communication (there are currently no echo cancellation mechanisms implenented). But I don't think it would be an issue in your case.

There are some other solutions that seem promising. For example Weemo (I haven't tried it, so I'm just suggesting based on what they say about their service).

Andere Tipps

There are a few things you need to consider

  • What is your transmission medium? (Bluetooth, Network, etc)
  • Will you make an accompanying PC/Mac application or will it be web based
  • How do you plan on securing the medium? If you even want to

Video streaming isn't overly difficult, however you will need to know RTSP and RTP pretty well. You will need to make sure that the sending is done over a separate Thread to avoid complete UI Freezing.

Thats just some stuff to start with, good luck!

If you want to do any video chat, the open source Weemo solutions offers strong SDK (iOS/Android/PhoneGap) and JS API.

Here you have their documentation : http://docs.weemo.com

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top