Get information about a video during a streaming, Android - android

and thank u while reading this question.
I want to get information about a video during a streaming process on my Android device.
I've this Media controller, placed in a VideoView:
video = (VideoView) findViewById(R.id.videoView);
video.setVideoPath(url);
ctlr = new MediaController(this);
ctlr.setMediaPlayer(video);
video.setMediaController(ctlr);
video.start();
I wish to get data about the quality of this video and more.
Thank u.

Related

How to retrieving metadata from live streaming video url in android..?

Can any one suggest which player will support to play live streaming video url's in android, That player has to retrieve metadata which is loaded in live streaming video Url's.
I tried with below code.
VideoView mVideoView = (VideoView) findViewById(R.id.videoView);
MediaController mc = new MediaController(this);
mc.setAnchorView(mVideoView);
mc.setMediaPlayer(mVideoView);
Uri video = Uri.parse("http://71.177.216.160:8888/abr/playlist.m3u8");
mVideoView.setMediaController(mc);
mVideoView.setVideoURI(video);
mVideoView.start();
Using the above code, we can play the video. But How can i retrive metadata from the playing video url..??
Can any one help me.
You can try Vitamio SDK to play live streams in Android. Use the MediaMetadataRetriever class to access the metadata like this:
MediaMetadataRetriever retriever = new MediaMetadataRetriever(this);
retriever.setDataSource(path);
retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);
retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_TITLE)

RTSP video link is not playing smoothly in android

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();

live streaming TV channels in android

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

Play video from an Url without webview

I have to play Dailymotion videos in an Android APP, but I must not do it in a WebView . VideoView class just accepts files streamed, and Dailymotion API has'nt got any resource for Android.
Does anyone know how to implement it?
Thanks!
String LINK = "Your_Link_Goes_Here";
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();
Try out this code..
VideoView is the best and in video view you can play streaming url also you can play the local files which you have on device sdcard or embeeded with in your app..
Refer this LINK this a sample
LINK

Android Video Streaming

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();

Categories

Resources