我有存储在特定的文件夹在SD卡中的视频。目前,我有路径作为唯一的参数(例如:SD卡/测试/ sample.mp4),单独使用的URL是否有可能获取图像的缩略图
I have the video which is stored under specific folder in sdcard. Currently i have the path as only parameter(Ex:"sdcard/test/sample.mp4"), by using url alone is it possible to retrieve the thumbnail of the image.
我也想表现出的Android视频preVIEW显示,任何一个提供一些例子来做这个事情。
I also want to show the video preview display in android ,any one provide some example to do this thing.
感谢
ThumbnailUtils是用来从任意一个文件系统路径缩略图一个易于使用的API。它是在API 8级可用。
ThumbnailUtils is an easy-to use API for generating thumbnails from arbitrary filesystem paths. It is available in API level 8.
查看ThumbnailUtils.createVideoThumbnail:
Bitmap thumb = ThumbnailUtils.createVideoThumbnail(path,
MediaStore.Images.Thumbnails.MINI_KIND);