Unable to load thumbnail image from video URL
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
Observed on Glide version 4.10 - 4.12
Observed on Android 7 samsung and Android 9 pixel with video file format profile `QuickTime` . Ok on Pixel 11 with file format profile `Base Media / Version 2`
Trying to load thumbnails images from video URLs but fails with
**Implementation:**
val time = 1L
Glide.with(context).asBitmap()
.load(url)
.apply(RequestOptions()
.frame(time)
)
.placeholder(R.color.grey)
.fallback(R.drawable.image_load_failed)
.into(this)
**Result:**
The imageView displays fallback image
**Error logs:**
E/MediaMetadataRetrieverJNI: getFrameAtTime: videoFrame is a NULL pointer
W/Glide: Load failed for https://tourmalet-beta.imgix.net/C563ECE0-5180-4A2B-86C2-88297D7809D3?w=1080&h=810&q=75&&fm=pjpg with size [1038x810]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
There were 4 root causes:
com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException(MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details)
com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException(MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details)
com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException(MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details)
com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException(MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{DirectByteBuffer->Bitmap->Bitmap}, DATA_DISK_CACHE, https://tourmalet-beta.imgix.net/C563ECE0-5180-4A2B-86C2-88297D7809D3?w=1080&h=810&q=75&&fm=pjpg
There was 1 root cause:
com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException(MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->Bitmap->Bitmap}
There was 1 root cause:
com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException(MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException: MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details
Cause (2 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{FileInputStream->Bitmap->Bitmap}, DATA_DISK_CACHE, https://tourmalet-beta.imgix.net/C563ECE0-5180-4A2B-86C2-88297D7809D3?w=1080&h=810&q=75&&fm=pjpg
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->Bitmap->Bitmap}
Cause (3 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{ParcelFileDescriptor->Bitmap->Bitmap}, DATA_DISK_CACHE, https://tourmalet-beta.imgix.net/C563ECE0-5180-4A2B-86C2-88297D7809D3?w=1080&h=810&q=75&&fm=pjpg
There was 1 root cause:
com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException(MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor->Bitmap->Bitmap}
There was 1 root cause:
com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException(MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException: MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details
2021-03-31 14:58:59.899 14556-14556/com.playsportsnetwork.tourmalet W/Glide: Cause (4 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{DirectByteBuffer->Bitmap->Bitmap}, REMOTE, https://tourmalet-beta.imgix.net/C563ECE0-5180-4A2B-86C2-88297D7809D3?w=1080&h=810&q=75&&fm=pjpg
There was 1 root cause:
com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException(MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->Bitmap->Bitmap}
There was 1 root cause:
com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException(MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException: MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details
Cause (5 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{FileInputStream->Bitmap->Bitmap}, REMOTE, https://tourmalet-beta.imgix.net/C563ECE0-5180-4A2B-86C2-88297D7809D3?w=1080&h=810&q=75&&fm=pjpg
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->Bitmap->Bitmap}
Cause (6 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{ParcelFileDescriptor->Bitmap->Bitmap}, REMOTE, https://tourmalet-beta.imgix.net/C563ECE0-5180-4A2B-86C2-88297D7809D3?w=1080&h=810&q=75&&fm=pjpg
There was 1 root cause:
com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException(MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor->Bitmap->Bitmap}
There was 1 root cause:
com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException(MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException: MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details
2021-03-31 14:58:59.899 14556-14556/com.playsportsnetwork.tourmalet I/Glide: Root cause (1 of 4)
com.bumptech.glide.load.resource.bitmap.VideoDecoder$VideoDecoderException: MediaMetadataRetriever failed to retrieve a frame without throwing, check the adb logs for .*MetadataRetriever.* prior to this exception for details
at com.bumptech.glide.load.resource.bitmap.VideoDecoder.decodeFrame(VideoDecoder.java:222)
at com.bumptech.glide.load.resource.bitmap.VideoDecoder.decode(VideoDecoder.java:175)
at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:92)
at com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:70)
at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:59)
at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:76)
at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:57)
at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:529)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:493)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:479)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:430)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:394)
at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:94)
at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:62)
at com.bumptech.glide.load.engine.DataCacheGenerator.startNext(DataCacheGenerator.java:74)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:277)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:235)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Contributor guide
Assessment
This issue has not been assessed yet.