I wanna develop a simple two way video call functionality and integrate it within my app.
I found two solutions:
Using Android SIP - i will need to handle sending and receiving streams
Using XMPP - Jingle - i will need to implement the whole protocol
Problem is that i am pretty new to SIP and do know really understand what the SIP protocol on android already handles and how much of development will be needed. I know on the other hand that XMPP on android is not easy as well especially when working with video streams.
I would love to have people thoughts on which solution would be the best to implement knowing that i want:
1. a simple working 2way video chat at first
2. extend the functionality to a system of users (i was thining that using XMPP with openfire will cover this easily but im kind of scared regarding the ammount of work to integrate jingle)
If you have any easier solution to integrate audio/video functionality on android i would be glad to hear from you.
Both solutions are the same in a lot of ways.
SIP and XMPP both take care only of the signaling. The media part (video streams, UDP, etc) are done "elsewhere" and with the same set of protocols: RTP and RTCP for transport and control. H.264/VP8 for the video codec, some other codec for voice.
I'd look into WebRTC to see if it has any available code on Android - that would take care of the media parts nicely.
Related
I have to build an application for android to stream video and audio to a desktop application through a server. Latency is important. I also have to make sure that android streaming can be controlled from pc (user should be able to switch the camera or turn off the microphone).
I thought to use the WebRTC protocol for communication but it seems I'm gonna have to write signalling server myself to support that requirement mentioned above.
Is there a better way to implement this whole thing? Also, I can't find any good docs or libraries for android streaming (no retrofit analogies obviously).
P.S. I'm thinking about using Javafx via Tornadofx for a desktop application.
You certainly don't need to create your own signaling server. I would suggest using something like Kurento Streaming Server or a derivation of Kurento like OpenVidu. It's open source and free and has lot's of great and active support via google groups. Depending on how much specific customization you may need one or the other might be better for you. OpenVidu allows for less customization since most of the stuff under the hood is already done for you, whereas Kurento allows you to modify and customize almost everything under the hood and on the front end using examples that can be changed at the code level. I have used it extensive on projects on the past and would think it meets most, if not all of your requirements. Scaling can be a bit challenging, but is still mush easier than just P2P webRTC since everything is relayed through a central server and most certainly doable depending on your requirements and implementation. Additionally you can record, process and transcode video server side.
i am working on one android application with the functionality of p2p video chat just like Skype. while researching on google, i got some libraries but not getting anything for android native.
i decided to go with WebRTC with the use of PubNub api. how can i create a video chat native android client with the use of there libraries?
i found one code for native video chat client,
https://github.com/pchab/AndroidRTC
this demo application require url with IP:PORT so i have one confusion about that how the server will be?
can anyone help me?
as I understand you need some signaling server which allows to detect peers, exchange session descriptions to setup media ports; and helps share everything used for initial handshake. You can find more information here: https://www.webrtc-experiment.com/docs/WebRTC-Signaling-Concepts.html. There a lot of open source implementations e.g. https://janus.conf.meetecho.com/.
Hope this helps.
#Alexey Osminin and #Pubnub are right: you need a signal protocol service (PubNub) and you need a hosted WebRTC solution for the audio/video streams.
Your best bet is to start with this awesome blog, BUILDING AN ANDROID WEBRTC VIDEO CHAT APP, by Kevin Gleason who is the one that did the AndroidRTC and WebRTC research for PubNub as an intern.
PubNub & WebRTC
There is a lot of confusion around what PubNub offers in the WebRTC arena and we have compiled everything you need to know into a single knowledge base article.
I have thesis to do this year. I want to create an android VOIP application. But I need it to be secure. I intent to use the SIP. Maybe I wasn't searching good enough but I have to find some information fast. Do you know some way to encrypt the voice using SIP? A few times I found some information about ZRTP but the information wasn't really useful. Any help would be useful. I have three months to finish the project (but I can't work all the time because I go to school).
Signalling and Media are to be managed differently to build a secure voip application.
Signaling - SIP is a signaling protocol and carried over UDP [usually]. Adding a layer of protection to this can be done by using TLS as the transport to make the message exchange secure. The SIP packets are all encrypted and makes it secure over the transmission.
RTP - Usually the media is carried as RTP. But the secure flavor is the SRTP and in that ZRTP is a particular mechanism to handle encryption of the packets.
Coming to building the VoIP Application, i would recommend with going with a stack like PJSIP or numerous other options and this should help you have the prototype faster and understand the concepts better. Good luck.
I want to implement my own encryption rule before the call data go into GSM network i.e. I want the call stream in the form of bits, I will implement my own encryption algo, and then send on to the network, my app on the other side(reciever's end) will recieve the data, decrypt it and make it into audio.
I want to know is it feasible, if it is how? I mean I want to use cell phone network as in like Airtel, Vodafone etc.
If it is not possible It will be of great help, if I can do it using internet (2G or 3G) ?
Any guidance in this, I want just direction.
Thanks in advance.
You can quickly create a chat application using Adobe Flex which will create an Adobe Air app that can run on Android (and also compile an iOS version if desired). The core strength of Adobe Flex is sending audio (and video) data with very little effort on the developers part.
You can configure your application to use SSL using the rtmps protocol if you want the data being transmitted to be encrypted.
This page shows you how you can create a simple video chat app for android using Flex http://coenraets.org/blog/2010/07/video-chat-for-android-in-30-lines-of-code/ - if you specifically don't want video you can send audio only data.
I can't imagine any reason why this wouldn't be possible as the networks are just passing data around, I don't think they care if it's encrypted or not encrypted - it's just a series of 1s and 0s.
As to how, that's a little beyond the remit of Stack Exchange - if you have a specific problems then post them with code.
There are other similar questions which you could look at:
Basic encryption on Android
https://stackoverflow.com/search?q=android+encryption
On Android, calls using the GCM (or other) network are handled by the baseband processor, which you don't have direct access to. You talk to it via the rild (Radio Interface Layer daemon) which uses proprietary library to talk to the actual hardware. So in practice you cannot mess with the mobile network.
A VOIP application would use the data connection and you can send/receive pretty much anything you want. If you use a standard technology such as SIP, there are ways to use TLS for the communication channel(s), so that traffic is encrypted. If you are creating your own, you might do something similar by using SSL sockets.
The 'how' part doesn't really fit the SO format, since it's very open ended and depends on how you decide to implement this.
After carrying out a lot of research I have come to the conclusion that Java and the Java Media Framework (JMF) is not suitable for developing a streaming server that supports the RTSP protocol on the server side for streaming video and audio. I have read very good things about Live555 media server and the testOnDemandRTSPServer source code for a basis of design. My only worry is that this is written in C++ and I am a predominantly Java programmer. This server is a large portion of my final year project at university so my degree kind of hangs on its successful implementation and I am running out of time. If any one has any experience with implementing a RTSP server that can stream to an android handset or belive they can point me in the right direction to learn how to do it, please let me know. Thanks in advance.
My project also has the RTSP server module to be run on Android phone. I think we can build rtsp library as name.so file and can interface with java by using JNI.
This also works for Android!
http://net7mma.codeplex.com/
You can see the article on CodeProject # http://www.codeproject.com/Articles/507218/Managed-Media-Aggregation-using-Rtsp-and-Rtp
The live555 RTSP server is a fully fledged RTSP server that implements most payloads (H.263, H.264, MPEG2, PCM, AMR, AAC, etc. You can read up on the website whether it already supports the media types you want to stream. It also features an RTSP client. With respect to streaming to an android handset: that is the whole point of RTSP: it doesn't matter what type of client you're streaming to, and as for the server side development, there isn't really much dev to do, unless you need to implement an unsupported media type. The code can be quite complex if you're not well versed in c++, but it sounds like your goal is more related to setting up streaming to android as opposed to implementing the RTSP server and client? So check if live555 supports your media types and if it does, I wouldn't bother writing one in JAVA, that can be quite involved. If you do choose to go that route, your best friend is of course the RFC (http://tools.ietf.org/html/rfc2326).
As for the client, I'm not sure if android already has an RTSP library/client. The one other thing you have to consider is which media types are supported by android.