I am trying to build an android app that will stream video from RTSP web link. I have used vitamio library and video is streaming but the problem is, it is not streaming smoothly. Playback speed changes while streaming.
How to get rid from this?
Code is given below,
videoView = (VideoView) findViewById(R.id.VideoView);
videoView.setVideoURI(Uri.parse(liveUrl));
videoView.setOnBufferingUpdateListener(this);
videoView.setOnCompletionListener(this);
videoView.setOnCompletionListener(this);
videoView.setOnPreparedListener(this);
MediaController mediaController = new MediaController(this);
videoView.setMediaController(mediaController);
videoView.start();
videoView.setVideoQuality(-16);
videoView.setBufferSize(2048);
videoView.requestFocus();
Related
I am making live tv channel streaming app.
But when i try to play the .sdp files in the android videoview it gives the error that "Sorry can't play this video".But it is playing .mp4 and .3gp videos successfully.
What should i do.I googled alot but in vain.
String VideoURL = "rtsp://pull.newclear.tv/live/livestream2_160p";
//"rtsp://pull.newclear.tv/live/livestream2_160p";
//.sdp links are also giving same error
//links of above type are not working
This is my code for videoview
MediaController mediacontroller = new MediaController(
VideoViewActivity.this);
mediacontroller.setAnchorView(videoview);
// Get the URL from String VideoURL
Uri video = Uri.parse(VideoURL);
videoview.setMediaController(mediacontroller);
videoview.setVideoURI(video);
Can I play Mp4 video in android with android:minSdkVersion="8". I have looked arround but facing "This video cannot be played"
My code is,
VideoView videoView = (VideoView) findViewById(R.id.videoView);
videoView.setVideoPath(path);
videoView.setMediaController(new MediaController(this));
videoView.requestFocus();
videoView.start();
I am getting multiple Youtube URL from Json through this link!
First Thing is that when i play one url VideoView . I am getting ## Sorry ! this video cannot played##. I have searched for this where RTSP url support VideoView.
Now How I'll get RTSP Url. & How to Play Multiple Videos?
My VideoView Code Is:-
VideoView videoView = (VideoView) findViewById(R.id.VideoView);
Button youtube=(Button)findViewById(R.id.button1);
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
Uri video = Uri.parse("http://m.youtube.com/details?v=LKLHoNy5xpE");
videoView.setMediaController(mediaController);
videoView.setVideoURI(video);
videoView.start();
Hello i am new android developer. And I don't know about Live Streaming Hindi TV channels. I find on net but not get perfect idea.
Can anybody give me idea about how android works with live Streaming channels.
THanks in advance.
Dimple
You can use VideoView for this. Try following:
String LINK = "type_here_the_link";
setContentView(R.layout.mediaplayer);
VideoView videoView = (VideoView) findViewById(R.id.video);
MediaController mc = new MediaController(this);
mc.setAnchorView(videoView);
mc.setMediaPlayer(videoView);
Uri video = Uri.parse(LINK);
videoView.setMediaController(mc);
videoView.setVideoURI(video);
videoView.start();
For more info, please see this: how to play video from url
I need HTTP/RTSP Video Streaming with Android. Any Ideas ?
Is that possible to go with JMF with Android ? Any Working examples ?
Already tried with
http://davanum.wordpress.com/2007/12/29/android-videomusic-player-sample-from-local-disk-as-well-as-remote-urls/
Its not working with my case. Are there any specific types of videos that Android can stream ?
Thanks.
You don't necessarily need JMF. Android has built in support for HTTP/RTSP video streaming.
Try this:
String LINK = "type_here_the_link";
setContentView(R.layout.mediaplayer);
VideoView videoView = (VideoView) findViewById(R.id.video);
MediaController mc = new MediaController(this);
mc.setAnchorView(videoView);
mc.setMediaPlayer(videoView);
Uri video = Uri.parse(LINK);
videoView.setMediaController(mc);
videoView.setVideoURI(video);
videoView.start();