1

I'm developing a small demo player for Video Multicast Stream.

In the current state:

  1. I have a working UDP Multicast socket (Android) and a video Streamer (PC).
  2. I have a Video player (MediaPlayer/VideoView) that can open HTTP/RTSP Streams.
  3. The Video is streamed in MPEG 2 TS - I can open the video using HTTP Stream.

The problem is that I can't open the UDP Stream with the player.

Here is the code:

VideoView videoView = (VideoView) findViewById(R.id.VideoView);
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);

Uri video = Uri.parse("udp://239.192.1.31:1234");
videoView.setMediaController(mediaController);
videoView.setVideoURI(video);
videoView.start();

Note: I used tcpdump to make sure I was receiving the UDP Multicast stream.

inversus
  • 1,287
  • 2
  • 15
  • 27

2 Answers2

0

The udp:// protocol is not supported in the android MediaPlayer, you have to use a library like Vitamio instead http://www.vitamio.org/en/

Paul Gregoire
  • 9,715
  • 11
  • 67
  • 131
0

you can also use exoplayer . It is an open source player managed by google only. You can also extend by writing your own extractor and data source

hkishn
  • 29
  • 4