How to play RTSP streaming video (MPEG4, basic) from a camera with an Android video ad?

I have a device for streaming real-time video that is on the same network with my Android phone. My version of Android is 4.1.2. The camera transmits video via RTSP, and its format is MP4. Address: rtsp: //192.168.0.102: 8554 / test

I have the following code in the oncreate method of my activity:

     vwMain = (VideoView) findViewById( R.id.videoView );
     vwMain.setMediaController( new MediaController( this ) );
     String strURI = "rtsp://192.168.0.102:8554/test";
     vwMain.setVideoURI( Uri.parse(strURI) );
     vwMain.requestFocus();
     vwMain.start();

I get the error "Sorry this video is not playing." But:

1) When I transfer another video, which also has MP4 format, from my computer connected to the same subnet using the VLC media player, I can play the video (the computer has ip 192.168.0.101 and my rtsp address is "rtsp: / /192.168.0.101: 8554 / test "

2) VLC, , (?)

? , Android :

http://developer.android.com/guide/appendix/media-formats.html

+4
1

?

<uses-permission android:name="android.permission.INTERNET" />
-1

All Articles