1

I've built a media player using VideoView to stream from VLC using multicast. I've provided the url and the application does stream the video. But when I check the Network Activity (In the resource monitor) it shows that VLC is connected to both the multicast address as well as the IP of the android device therefore the application is streaming in unicast.

The code I'm using:

VideoView videoView = (VideoView) findViewById(R.id.video);

Uri uri= Uri.parse("rtsp://192.168.137.159:8554/test.sdp");
videoView.setVideoURI(uri);
videoView.start();

I've also made sure that multicast packets are not filtered out using this code:

WifiManager wifi = (WifiManager)getSystemService( Context.WIFI_SERVICE );
if(wifi != null)
{
    WifiManager.MulticastLock lock = wifi.createMulticastLock("Log_Tag");
    lock.acquire();
}

Is there something else I'm missing in order tell the VideoView to stream from the multicast address and not directly from the server?

I've set up VLC to stream to a multicast address using these parameters: #rtp{mux=ts,dst=239.255.12.42,sdp=rtsp://:8554/test.sdp}

user2132921
  • 11
  • 1
  • 2

1 Answers1

0

I think the whole point of RTSP consists of setting up unicast streams on demand. This works as expected. Use RTP multicast, nor RTSP, if you want that.

Mohsen
  • 61
  • 1
  • 5