Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to create thumbnail from video URL?

Want to create tumbnails from url from any sites. I am using following code

Bitmap bmThumbnail;
bmThumbnail = ThumbnailUtils.createVideoThumbnail(videoLink, 
MediaStore.Video.Thumbnails.MICRO_KIND);

But its not working,please suggest any other ways if present.

like image 264
sushma1008 Avatar asked Mar 08 '23 09:03

sushma1008


1 Answers

Use Glide : https://github.com/bumptech/glide

Shortest Method To get Video thumbnails

RequestOptions requestOptions = new RequestOptions();
requestOptions.isMemoryCacheable();
Glide.with(context).setDefaultRequestOptions(requestOptions).load("Url").into(image);
like image 109
Nikunj Paradva Avatar answered Mar 23 '23 12:03

Nikunj Paradva