This plugin generates thumbnail from video file or URL. It returns image in memory or writes into a file. It offers rich options to control the image format, resolution and quality. Supports iOS and Android.
MIT License
183
stars
225
forks
source link
AndroidRuntime: java.util.concurrent.TimeoutException: android.media.MediaMetadataRetriever.finalize() timed out after 10 seconds #165
07-03 11:24:16.780 27078 27093 E AndroidRuntime: Process: com.fivegencare.com.motorola.nursery, PID: 27078 07-03 11:24:16.780 27078 27093 E AndroidRuntime: java.util.concurrent.TimeoutException: android.media.MediaMetadataRetriever.finalize() timed out after 10 seconds 07-03 11:24:16.780 27078 27093 E AndroidRuntime: at android.media.MediaMetadataRetriever.native_finalize(Native Method) 07-03 11:24:16.780 27078 27093 E AndroidRuntime: at android.media.MediaMetadataRetriever.finalize(MediaMetadataRetriever.java:1069) 07-03 11:24:16.780 27078 27093 E AndroidRuntime: at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:291) 07-03 11:24:16.780 27078 27093 E AndroidRuntime: at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:278) 07-03 11:24:16.780 27078 27093 E AndroidRuntime: at java.lang.Daemons$Daemon.run(Daemons.java:139) 07-03 11:24:16.780 27078 27093 E AndroidRuntime: at java.lang.Thread.run(Thread.java:923) 07-03 11:24:37.204 31964 31964 I ActivityThread: smart_link is not supported!!! 07-03 11:28:42.580 2225 2225 I ActivityThread: smart_link is not supported!!! 07-03 11:33:34.152 6548 6548 I ActivityThread: smart_link is not supported!!! 07-03 11:40:56.803 9739 9739 I ActivityThread: smart_link is not supported!!! 07-03 11:42:04.672 9739 9783 E AndroidRuntime: FATAL EXCEPTION: FinalizerWatchdogDaemon 07-03 11:42:04.672 9739 9783 E AndroidRuntime: Process: com.fivegencare.com.motorola.nursery, PID: 9739 07-03 11:42:04.672 9739 9783 E AndroidRuntime: java.util.concurrent.TimeoutException: android.media.MediaMetadataRetriever.finalize() timed out after 10 seconds 07-03 11:42:04.672 9739 9783 E AndroidRuntime: at android.media.MediaMetadataRetriever.native_finalize(Native Method) 07-03 11:42:04.672 9739 9783 E AndroidRuntime: at android.media.MediaMetadataRetriever.finalize(MediaMetadataRetriever.java:1069) 07-03 11:42:04.672 9739 9783 E AndroidRuntime: at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:291) 07-03 11:42:04.672 9739 9783 E AndroidRuntime: at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:278) 07-03 11:42:04.672 9739 9783 E AndroidRuntime: at java.lang.Daemons$Daemon.run(Daemons.java:139) 07-03 11:42:04.672 9739 9783 E AndroidRuntime: at java.lang.Thread.run(Thread.java:923) 07-03 11:42:33.173 13369 13369 I ActivityThread: smart_link is not supported!!!
It's happening on some devices when creating a thumbnail from a video mp4 and mov ( xiaomi 12T and honor 50)
public Bitmap createVideoThumbnail(final String video, final HashMap<String, String> headers, int targetH, int targetW, int timeMs) { Bitmap bitmap = null; try (MediaMetadataRetriever retriever = new MediaMetadataRetriever()) { try { if (video.startsWith("/")) { setDataSource(video, retriever); } else if (video.startsWith("file://")) { setDataSource(video.substring(7), retriever); } else { retriever.setDataSource(video, (headers != null) ? headers : new HashMap<String, String>()); }
return bitmap; }
ERROR MESSAGE:
07-03 11:24:16.780 27078 27093 E AndroidRuntime: Process: com.fivegencare.com.motorola.nursery, PID: 27078 07-03 11:24:16.780 27078 27093 E AndroidRuntime: java.util.concurrent.TimeoutException: android.media.MediaMetadataRetriever.finalize() timed out after 10 seconds 07-03 11:24:16.780 27078 27093 E AndroidRuntime: at android.media.MediaMetadataRetriever.native_finalize(Native Method) 07-03 11:24:16.780 27078 27093 E AndroidRuntime: at android.media.MediaMetadataRetriever.finalize(MediaMetadataRetriever.java:1069) 07-03 11:24:16.780 27078 27093 E AndroidRuntime: at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:291) 07-03 11:24:16.780 27078 27093 E AndroidRuntime: at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:278) 07-03 11:24:16.780 27078 27093 E AndroidRuntime: at java.lang.Daemons$Daemon.run(Daemons.java:139) 07-03 11:24:16.780 27078 27093 E AndroidRuntime: at java.lang.Thread.run(Thread.java:923) 07-03 11:24:37.204 31964 31964 I ActivityThread: smart_link is not supported!!! 07-03 11:28:42.580 2225 2225 I ActivityThread: smart_link is not supported!!! 07-03 11:33:34.152 6548 6548 I ActivityThread: smart_link is not supported!!! 07-03 11:40:56.803 9739 9739 I ActivityThread: smart_link is not supported!!! 07-03 11:42:04.672 9739 9783 E AndroidRuntime: FATAL EXCEPTION: FinalizerWatchdogDaemon 07-03 11:42:04.672 9739 9783 E AndroidRuntime: Process: com.fivegencare.com.motorola.nursery, PID: 9739 07-03 11:42:04.672 9739 9783 E AndroidRuntime: java.util.concurrent.TimeoutException: android.media.MediaMetadataRetriever.finalize() timed out after 10 seconds 07-03 11:42:04.672 9739 9783 E AndroidRuntime: at android.media.MediaMetadataRetriever.native_finalize(Native Method) 07-03 11:42:04.672 9739 9783 E AndroidRuntime: at android.media.MediaMetadataRetriever.finalize(MediaMetadataRetriever.java:1069) 07-03 11:42:04.672 9739 9783 E AndroidRuntime: at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:291) 07-03 11:42:04.672 9739 9783 E AndroidRuntime: at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:278) 07-03 11:42:04.672 9739 9783 E AndroidRuntime: at java.lang.Daemons$Daemon.run(Daemons.java:139) 07-03 11:42:04.672 9739 9783 E AndroidRuntime: at java.lang.Thread.run(Thread.java:923) 07-03 11:42:33.173 13369 13369 I ActivityThread: smart_link is not supported!!!