5

I have been successfully able to stream RTSP FILES( i.e videos stored on SDCARD having an extension .3gp,.mp3,.mp4 etc) But when I use the same code for streaming a URL such as : rtsp://122.166.229.151:1950/13478f6be4b133f ( without extension) the screen goes blank and after certain interval it says cannot play this video. I am using Samsung Galaxy 551 phone with 2.2 OS for testing. Kindly help

  VideoView videoView = (VideoView) findViewById(R.id.tvvideoView);
     MediaController mediaController = new MediaController(this);
     mediaController.setAnchorView(videoView);
    Uri video = Uri.parse(rtsp://122.166.229.151:1950/13478f6be4b133f);

     videoView.setMediaController(mediaController);
     videoView.setVideoURI(video);

     videoView.start();

This is my code.

Mycoola
  • 1,135
  • 1
  • 8
  • 29
Rashmi.B
  • 1,787
  • 2
  • 18
  • 34
  • I also faced same problem.Are using actual device or emulator ? According to my readings Url have support for progressive downloading. – Ramindu Weeraman Dec 29 '11 at 10:49
  • RAmindu you need to test this on a real device. Emulators do not show the right output because at times they cannot perform encoding decoding correctly. Check on a real phone – Rashmi.B Dec 30 '11 at 05:28
  • @Rashmi.B Hi. Have you got any solution for playing live video stream. I need help with this.I can play any rtsp or links, but I am not able to play live rtsp streaming. Do u have any idea on this. – Andro Selva Jan 03 '12 at 07:53
  • Check if the file you are streaming adheres to suported formats listed [here](http://developer.android.com/guide/appendix/media-formats.html) – peasea Dec 29 '11 at 10:47
  • yeah I have seen the doc. It says H.264 AVC is supported Android 3.0 onwards. I got the streaming using Daroon player from android market. – Rashmi.B Dec 30 '11 at 05:30
  • @AndroSelva : Try playing your video link in Daroon player – Rashmi.B Jan 03 '12 at 09:30
  • See my answer over here - maybe it will help: http://stackoverflow.com/questions/6996320/unable-to-play-youtube-video-in-videoview-using-rtsp-streaming/9264505#9264505 – Andy Weinstein Feb 13 '12 at 16:57

0 Answers0