I have tried many ways to retrieve the video meta data from url like
(http://xxx.xxx.xxx.xxx/streams/xxxx/playlist.m3u8), the project is
useing android 2.3.3 SDK.
1. As I know the MediaMetadataRetriver can solve it with capture_mode
but it needs the android vesion level after 14, but android 2.3.3 is
level 10. (it doesnt work in project).
MediaMetadataRetriever retr = new MediaMetadataRetriever();
retr.setDataSource(mContext ,
video.getUriWithDrmCheck());
retr.setMode(MediaMetadataRetriever.MODE_CAPTURE_FRAME_ONLY);
Bitmap bm = retr.captureFrame();
int wVideo = bm.getWidth();
int hVideo = bm.getHeight();
2. I have been used vetamio to retrieve the video resolution, but the
system crashed.
io.vov.vitamio.MediaPlayer m= new io.vov.vitamio.MediaPlayer(this);
m.prepareAsyc();
m.setDataSource(url);
m.getVideoAspectRatio();
m.release();
3. The default android.media.mediaplayer in android could not retrieve
the url video information.
The video height I got from it is 0.
4. I tried thumbnail method to retrieve the video information, but
the Thumbnail method seems can only phase the localPath, not the url
link path.
Bitmap bMap = ThumbnailUtils.createVideoThumbnail(url,
MediaStore.Video.Thumbnails.MICRO_KIND);
So does any one know how to retrieve a stream video (m3u8 format)
resolution from url link in android?? thank you very much.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en