Problem with video streaming in android

im developing a simple application that will play video from a vlc streaming server using rtsp streaming ... but while I run the application, it shows me an error similar to this "Media player error (1, -21474648), Video error: 1, - 21474648 "," ARTSPConnectio Status: RTSP / 1.0 461 Unsupported Transport "and MyHandler SETUP (1) are completed with a result of 0" in logCat, and it also displays "this video cannot be played" in the emulator.

I did a lot of Google on it ... but did not find a solution, below is my code

public class VideoDemo extends Activity { private VideoView video; private MediaController ctlr; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); getWindow().setFormat(PixelFormat.TRANSLUCENT); setContentView(R.layout.main); video=(VideoView)findViewById(R.id.video); ctlr=new MediaController(this); video.setMediaController(ctlr); video.setVideoURI(Uri.parse("rtsp://192.168.1.2:5544/sample")); video.requestFocus(); video.start(); } } 

Thank you in advance

+4
source share
1 answer

I think there is no problem with your code. try this URI:

 rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov http://www.wowza.com/_h264/BigBuckBunny_175k.mov 

If you use your own video server, make sure that video streaming is working.

0
source

All Articles