如何在Android中使用RTSP链接直播视频? [英] How to live stream a video using RTSP link in android?
问题描述
我尝试开发一个用于实时视频流的应用程序,并且该应用程序适用于某些链接.但是其他一些链接不起作用.
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.
这是我的代码
Uri stream = Uri.parse("rtsp://208.77.20.52:1935/dmm1/ten");
Intent videointent = new Intent(Intent.ACTION_VIEW,stream);
startActivity(videointent);
显示无法播放此视频.但是,当我使用"rtsp://cdn.m.yupptv.tv/liveorigin/we2"
Url时,效果很好.
其实是什么问题?链接或我的代码?
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??
我也使用带有和不带有mediacontroller的视频"视图来执行此操作,但是结果是相同的,我尝试在PC上的VLC播放器中播放此视频,然后第一个链接不起作用,其他链接也起作用.
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.
如果此链接("rtsp://208.77.20.52:1935/dmm1/ten")已过期,那么任何人都知道如何获得有效的 rtsp 链接十个板球频道.我从
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.
推荐答案
我认为URL已过期.并且您的程序没有任何问题...请更改该网址.尝试使用此网址进行实时板球比赛
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
这篇关于如何在Android中使用RTSP链接直播视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!