Closed kashsbd closed 4 years ago
What are your expectations?
Given what input, what is your expected output?
No reply to follow-up question for close to 2 years. Closing.
I'd like to make a thumbnail of a single frame of a video (let's say .mp4 H264). Can I do this with thumbnailator?
@andreas-mausch I think NO. And from Android Q, you can use ThumbnailUtils
directly, no need additional libraries:
For example:
import android.media.ThumbnailUtils
val videoFile = File("path/to/video.mp4")
val videoThumbnail: Bitmap = ThumbnailUtils.createVideoThumbnail(videoFile, Size(100, 100), null)
val audioFile = File("path/to/music.mp3")
val audioThumbnail: Bitmap = ThumbnailUtils.createAudioThumbnail(audioFile, Size(100, 100), null)
val imageFile = File("path/to/photo.jpeg")
val imageThumbnail: Bitmap = ThumbnailUtils.createImageThumbnail(imageFile, Size(100, 100), null)
@andreas-mausch Probably no. Thumbnailator relies on the Java Image I/O to read images, and I'm not aware of an image reader that supports video files.
Does it support video to convert to image file??