Closed Yentis closed 3 months ago
Does this video fail to load using MediaMetadataRetriever
directly? If so there's not much we can do unfortunately as the issue is in the underlying decoder. I'd prefer to avoid supporting custom video decoders like FFmpegMediaMetadataRetriever
as it adds maintenance burden. FFmpegMediaMetadataRetriever
itself also imports large native libraries. If you'd like to use it you can add a custom Fetcher
/Decoder
that implements support.
Yes, it fails with MediaMetadataRetriever
as well
Unfortunately there's not much we can do to fix this in Coil. You could report the issue to AOSP or modify the existing VideoFrameDecoder to use FFmpegMediaMetadataRetriever
and add it to your ComponentRegistry
.
Describe the bug When attempting to get a video frame for specific mp4 files (in this case a screen recording on my phone), the process fails and I see this message in logcat:
getFrameAtTime: videoFrame is a NULL pointer
.In standard Android this is fixable by using FFmpegMediaMetadataRetriever but this option isn't present for coil-video.
To Reproduce
Version 2.6.0
Sample video that fails to read frames
https://github.com/coil-kt/coil/assets/158149375/0d01ea98-f91a-46df-97cd-b73715288789