question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Local thumbnails not working for AVI, MPG/MPEG, or WMV: ThumbnailUtils: java.io.IOException: Failed to create thumbnail

See original GitHub issue

Description

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:open
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
perracolabscommented, Apr 28, 2021

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

0reactions
mdsheraj123commented, Dec 19, 2020

I had the same problem, turns out that video was corrupted when I checked in the gallery.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found