Search code examples
androidrtsp

can't play video through rtsp


Hi i've got problem with streaming. When i'm running video through http it works but i need to run it through rtsp. When application starts i have bar with buttons but time is 0:00 and i haven't got any image. I haven't got any errors like "video can't be played", what should i do?

String SrcPath = "rtsp://v5.cache1.c.youtube.com/CjYLENy73wIaLQnhycnrJQ8qmRMYESARFEIJbXYtZ29vZ2xlSARSBXdhdGNoYPj_hYjnq6uUTQw=/0/0/0/video.3gp";
   @Override
   public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.main);


       VideoView myVideoView = (VideoView)findViewById(R.id.myvideoview);
       myVideoView.setVideoURI(Uri.parse(SrcPath));
       myVideoView.setMediaController(new MediaController(this));
       myVideoView.requestFocus();
       myVideoView.start();


   }

Solution

  • Ok i found solve. I had such problem because of my tablet, it can't play anything through rtsp, don't know why. On other device it works good.

    EDIT:

    IT IS FAULT OF ANDROID 2.3.4 i found the information about that and this version of android can't use rtsp. I heard that there is a need to add some decoder. Or just try another version