live streaming should shifted from 3g to wifi automatically - android

I am working on android application. I am playing a live stream from IP camera over 3g, Now i want that if my wifi connection is enable and my phone is connected to wifi then stream should automatically shifted to wifi. Please help me out!!!
Stream Type : rtsp

Related

How can I continue a WebRTC stream on Android&iOS when I change the mobile network from wifi to 4G

I develop an Android App based WebRTC, I have a problem now, as I in a stream conference with my App, I changed my mobile network, from wifi to 4G or 4G to wifi, the stream is not working, do I have to recreate a new PeerConnection? Thanks for attention.

Streaming live video from an IP camera in android phone

I want to create an android app which will fetch the live streaming from an IP camera connected on the local area network. How can I do it? What are the protocols and technology will be required to do this.

Android: connect to local Wifi and mobile data at the same time

We have a setup with a local IP camera connected over Wifi. From this camera the video stream should be streamed with an Android device over the cellular data network.
In iOS there is a trick to have both networks available by assigning a static IP address to the camera Wifi (iOS: Use WiFi and Mobile Data simultaneously). Is there something similar on Android? I have tried to set a static IP address and also the Android "Download booster" mode, but both without success.
Regards,

RTSP audio streaming is not working with wifi but does work with mobile network

I am using following code to play rtsp stream using media player.
mediaPlayer = new MediaPlayer();
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.setDataSource(streamurl);
mediaPlayer.prepare();
mediaPlayer.start();
It plays fine on Mobile Network. But in wifi it is not playing, and shows error while preparing media player. Why it is? Does anyone know the solution for it?
RTSP (RTP/UDP) works like this
1) Session Management on TCP layer
2) Media on UDP layer
If you don't have the NAT correctly done on your wifi network the UDP traffic may not be received to the device.
In this case
1) Device tries to fall back to RTSP tunneling over TCP.
2) If the streaming server doesn't support RTP over TCP the device will fail to stream
Solution 1
Configure our Wifi router to NAT the UDP ports to your device. I am not certain which ports you can try 1024-65355
Solution 2
Find a streaming server which allow RTP over TCP
Your Mobile network might not be doing any NATing or it is doing smart NATing which doesn't break RTSP
mediaplayer can not play if streamurl start with "rtsp://blahblah.com/blah.3gp" on wifi.
change streamurl "http://blahblah"

announcing rtsp. A way to overcome blocked ports?

If all incoming ports are blocked on a ip camera (due to cellular network stuff), is it possible to have the ip camera initiate the connection to the client-viewer?
I am looking at using a android phone as a ip camera, (there are plenty of examples for the rtsp portion) but will need to figure out how to control the phone from the client-viewer using control connection initiated by the phone itself.
Would SDP announce work?
In this situation, you need an RTSP server, which can accept announcements from the IP camera, and relay the RTP streams from the IP camera to the RTSP client.
Otherwise, the RTSP client cannot reach the Ip camera directly.

Categories

Resources