[coil-video] Fails to load preview for video
See original GitHub issueDescribe the bug When I’m trying to load preview for video that I picked from my device I’m getting an exception:
2020-05-22 23:40:14.907 27387-27387/com.example.android I/System.out: load uri: content://com.android.providers.media.documents/document/video%3A158545
2020-05-22 23:40:14.956 27387-27462/com.example.android D/skia: --- Failed to create image decoder with message 'unimplemented'
2020-05-22 23:40:14.956 27387-27462/com.example.android D/skia: --- Failed to create image decoder with message 'unimplemented'
2020-05-22 23:40:14.965 27387-27387/com.example.android I/RealImageLoader: 🚨 Failed - content://com.android.providers.media.documents/document/video%3A158545 - java.lang.IllegalStateException: BitmapFactory returned a null Bitmap. Often this means BitmapFactory could not decode the image data read from the input source (e.g. network or disk) as it's not encoded as a valid image format.
2020-05-22 23:40:14.967 27387-27387/com.example.android E/RealImageLoader: java.lang.IllegalStateException: BitmapFactory returned a null Bitmap. Often this means BitmapFactory could not decode the image data read from the input source (e.g. network or disk) as it's not encoded as a valid image format.
at coil.decode.BitmapFactoryDecoder.decode(BitmapFactoryDecoder.kt:177)
at coil.RealImageLoader$loadData$2.invokeSuspend(RealImageLoader.kt:349)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
2020-05-22 23:40:17.922 27387-27523/com.example.android V/FA: Inactivity, disconnecting from the service
Expected behavior Would like to see thumbnail
To Reproduce The code is pretty standard
val imageLoader = ImageLoader.Builder(requireContext())
.componentRegistry {
add(VideoFrameFileFetcher(requireContext()))
add(VideoFrameUriFetcher(requireContext()))
}
.build()
val request = LoadRequestBuilder(requireContext())
.data(uri)
.videoFrameMillis(2000)
.target(myImageView)
.build()
imageLoader.execute(request)
Version coil-version 0.11.0 Android 9 coil-video is added
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (4 by maintainers)
Top Results From Across the Web
Video Frames - Coil
If a frame time isn't specified, the first frame of the video is decoded. The ImageLoader will automatically detect any videos and extract...
Read more >Coil does not load video frame in Image - Stack Overflow
I'm trying to load video frame from video, provided in previewUrl = "https://<..>.mp4" , but nothings happens. I've tried removing/changing ...
Read more >Image Processing with Coil in Android - Section.io
This tutorial will guide you on how to process images in Android using a fast, lightweight, and powerful open-source library known as Coil....
Read more >"Unable to preview the video" upload error - Google Support
Video previewsVideo previews let you see a 3-second preview of a video before watching. When you hover over a video's thumbnail on your...
Read more >Video Previews not working - Google Groups
Have got all working now apart from the video previews. I do get a still thumbnail preview for any videos that i try...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
how to make such a concept in compose ? remember function of painter do any one have the answer?
@OhhhThatVarun OK thanks.