How to live stream a video using RTSP link in andr

2020-07-24 04:37发布

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.

2条回答
▲ chillily
2楼-- · 2020-07-24 05:19

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...

查看更多
等我变得足够好
3楼-- · 2020-07-24 05:28

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

查看更多
登录 后发表回答