Stream urls of live tv channels from their official website

9k views Asked by At

I am working an android app in which live tv channels will be played. I am using vitmio api for this purpose. I am able to play some of channels using this api (using mms and rtsp urls). but some of channels I am not able to played yet. I am using url helper for getting rtsp urls from source website. the url helper is giving me rtsp url but those rtsp urls I am unable to played. like for example I have a channel GEO TV

I am getting its rtsp like this one

rtmp://cdn.eboundservices.com/geonews?wmsAuthSign=c2VydmVyX3RpbWU9MTIvMTgvMjAxMyA3OjU4OjEzIEFNJmhhc2hfdmFsdWU9M01CbWVpbVV6eUtQUzRhWFd5UllvZz09JnZhbGlkbWludXRlcz0yMA==/geonews_sub

but vitmio media player is not playing this rtmp url what should I do to play this channel using vitmio player ???

2

There are 2 answers

2
Jitesh Dalsaniya On

you should use vitamio library for this issue vitamio library from here http://www.vitamio.org/en/docs/Basic/2013/0509/4.html

If links are rtsp:// then you can easily use MediaPlayer. Try something like this:

MediaPlayer m = new MediaPlayer(); 
m.setDataSource("rtsp://host.name.com/stream/name"); 
m.prepare(); 
m.start(); 
3
VishalKale On

You can try this:

 String link = "rtmp://cdn.eboundservices.com/geonews?wmsAuthSign=c2VydmVyX3RpbWU9MTIvMTgvMjAxMyA3OjU4OjEzIEFNJmhhc2hfdmFsdWU9M01CbWVpbVV6eUtQUzRhWFd5UllvZz09JnZhbGlkbWludXRlcz0yMA==/geonews_sub";


videoView = (VideoView) findViewById(R.id.videoview);
MediaController mc = new MediaController(this);
mc.setAnchorView(videoView);
mc.setMediaPlayer(videoView);
Uri video = Uri.parse(link);
videoView.setMediaController(mc);
videoView.setVideoURI(video);
videoView.requestFocus();
videoView.start();