How to live stream a video using RTSP link in android?

匿名 (未验证) 提交于 2019-12-03 07:50:05

问题:

I try to develop an application for live video streaming, and it's work for certain links. But some other links are doesn't work.

Here is my code

Uri stream = Uri.parse("rtsp://208.77.20.52:1935/dmm1/ten"); Intent videointent = new Intent(Intent.ACTION_VIEW,stream);  startActivity(videointent);

It shows can't play this video. But when I use "rtsp://cdn.m.yupptv.tv/liveorigin/we2" Url it's works fine. Actually what is the problem?? the Link or my code??

I also use Video view with and without mediacontroller to do this but the result is same, and I try to Play this video in VLC player in my PC, then also the first link doesn't work, and the other works.

If this link ("rtsp://208.77.20.52:1935/dmm1/ten") is expired, then anybody know how to get the working rtsp link for Ten cricket channel..?? I get this links from http://rtsp-links-free-forum-mobile-tv-and-pc-tv-streaming-vlc.39851.x6.nabble.com/RTSP-Links-Indian-Channel-List-for-Mobile-TV-and-PC-TV-Streaming-VLC-td8.html

Please give me a solution. Is there is any other protocol to do this??

Thanks in advance and sorry for my poor English.

回答1:

I think that URL is expired. and there is no problems in your program... please change that url. Try this URL for live cricket

rtsp://85.25.199.31:1935/rtp-live/willow.stream

Please note that this url will also change at any time... So keep updating



回答2:

try this,

video1=(VideoView)findViewById(R.id.videoview); video1.setVideoURI(Uri.parse("rtsp://208.77.20.52:1935/dmm1/ten")); video1.requestFocus(); video1.start();

If it is showing same error message, post error log, so I can help you more...



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!