baby Iype baby Iype -4 years ago 95
Android Question

how to stream a video from an RTSP link

I have to stream video from an RTSP link from into a TextureView.


is my path. I tried with URL connection method, which cannot be applied to RTSP

Please help me to stream the video

Answer Source

You can use setDataSource(path) method of MediaPlayer Class to load the url and streaming will work.

Please refer this:

     private static final String path = "rtsp://";
    private void prepareTextureView(SurfaceTexture surface) {
            Surface s = new Surface(surface);
            mediaPlayerTexture = new MediaPlayer();
            try {

            } catch (IOException e) {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download