Local thumbnails not working for AVI, MPG/MPEG, or WMV: ThumbnailUtils: java.io.IOException: Failed to create thumbnail
See original GitHub issueDescription
I’m trying to load some thumbnails from video file but I notice that some video formats throws a runtime exception:
W/ThumbnailUtils: java.io.IOException: Failed to create thumbnail
at android.media.ThumbnailUtils.createVideoThumbnail(ThumbnailUtils.java:331)
at android.media.ThumbnailUtils.createVideoThumbnail(ThumbnailUtils.java:286)
at com.facebook.imagepipeline.producers.LocalVideoThumbnailProducer$1.getResult(LocalVideoThumbnailProducer.java:81)
at com.facebook.imagepipeline.producers.LocalVideoThumbnailProducer$1.getResult(LocalVideoThumbnailProducer.java:61)
at com.facebook.common.executors.StatefulRunnable.run(StatefulRunnable.java:43)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:51)
at java.lang.Thread.run(Thread.java:919)
Caused by: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
at android.media.MediaMetadataRetriever.setDataSource(Native Method)
at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:75)
at android.media.ThumbnailUtils.createVideoThumbnail(ThumbnailUtils.java:309)
at android.media.ThumbnailUtils.createVideoThumbnail(ThumbnailUtils.java:286)
at com.facebook.imagepipeline.producers.LocalVideoThumbnailProducer$1.getResult(LocalVideoThumbnailProducer.java:81)
at com.facebook.imagepipeline.producers.LocalVideoThumbnailProducer$1.getResult(LocalVideoThumbnailProducer.java:61)
at com.facebook.common.executors.StatefulRunnable.run(StatefulRunnable.java:43)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:51)
at java.lang.Thread.run(Thread.java:919)
So I had to dig deeper to test with different video formats and for me, AVI, MPG/MPEG, and WMV throws this exception every time.
Reproduction
Load a thumbnail from the following video file formats: AVI, MPG/MPEG, or WMV.
Additional Information
- Fresco version: 1.13.0
- Platform version: API Q on Android Studio Emulator
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
All Video MPEG,AVI and WMV Thumbnails will not show in ...
I have this problem with Windows Explorer not showing any MPEG,AVI and MWV video files,picture files are unaffected.All thumbnails will show ...
Read more >ThumbnailUtils.createVideoThumbnail not working for nougat ...
The exact same condition I have faced, Only it was unable to create video thumbnail in higher version or high rated device.
Read more >FIX: Missing Thumbnails for Videos (WMV, AVI, MPG) in ...
While poking around in the Registry trying to fix this issue, I noticed that Thumbnails for AVI files worked, while no others did....
Read more >Windows Thumbnail Generator Crack With License Code Free ...
thumbnail. Users can select a folder to generate the thumbnail for. The utility was created via the open source ImageMagick and.
Read more >ThumbnailUtils - Android Developers
Callers should migrate to using createAudioThumbnail(java.io. ... IOException, If any trouble was encountered while generating or loading the thumbnail, ...
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 FreeTop 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
Top GitHub Comments
I added a pull request fixing the issue, just needs to get accepted. Check the description for an explanation about the cause: https://github.com/facebook/fresco/pull/2594
I had the same problem, turns out that video was corrupted when I checked in the gallery.