video_thumbnail
video_thumbnail copied to clipboard
MissingPluginException and null pointer
When requesting a specific timsMs
, i am consistently facing a MissingPluginException and null pointer exception.
E[/MediaMetadataRetrieverJNI]()(14809): getFrameAtTime: videoFrame is a NULL pointer
When i am using this video (https://drive.google.com/file/d/1rcQb3E14Kmv-5qtJqxax3xSB9WzsY3Q5/view?usp=sharing
) at 8357
ms time.

✅ The error occurs on a Galaxy S7 Edge running Android 8 ❌ The error does not occurs on a Galaxy S8 running Android 9
Hi LeGoffMael,
Is it still an issue regarding the following error? Thanks
When requesting a specific timsMs, i am consistently facing a MissingPluginException and null pointer exception.
E[/MediaMetadataRetrieverJNI]()(14809): getFrameAtTime: videoFrame is a NULL pointer
I get the same error with a direct firebase url like https://firebasestorage.googleapis.com/v0/b/myprojec-68aa.appspot.com/o/XXX%2FXXXX?alt=media&token=1d51-ccadade-4drd-8ade2-bdf4afa7f1ba89
and as you see there is already %2F but anyway I got the following exception
Error: MissingPluginException(No implementation found for method data on channel plugins.justsoft.xyz/video_thumbnail) at Object.throw_ [as throw] (http://localhost:50532/dart_sdk.js:5067:11) at MethodChannel._invokeMethod (http://localhost:50532/packages/flutter/src/services/restoration.dart.lib.js:1560:21) at _invokeMethod.next (<anonymous>) at http://localhost:50532/dart_sdk.js:40571:33 at _RootZone.runUnary (http://localhost:50532/dart_sdk.js:40441:59) at _FutureListener.thenAwait.handleValue (http://localhost:50532/dart_sdk.js:35363:29) at handleValueCallback (http://localhost:50532/dart_sdk.js:35931:49) at Function._propagateToListeners (http://localhost:50532/dart_sdk.js:35969:17) at _Future.new.[_completeWithValue] (http://localhost:50532/dart_sdk.js:35817:23) at async._AsyncCallbackEntry.new.callback (http://localhost:50532/dart_sdk.js:35838:35) at Object._microtaskLoop (http://localhost:50532/dart_sdk.js:40708:13) at _startMicrotaskLoop (http://localhost:50532/dart_sdk.js:40714:13) at http://localhost:50532/dart_sdk.js:36191:9
and I call like this
var arr = await VideoThumbnail.thumbnailData( video: url, imageFormat: ImageFormat.JPEG, // maxWidth: 128, quality: 80, );
The reason I call thumbnailData method is that I am doing for the web. So I upload videos to the firebase cloud and get the link and create thumbnail by this link. I know that I cannot give the path to save the thumbnail, that's why I try to do with uint8list. I dont know if it is the reason or something else.
Otherwise, I have to create my own webservice to this job.
Waiting for a quick help...
PS: using version 0.5.0
Hi LeGoffMael,
Is it still an issue regarding the following error? Thanks
When requesting a specific timsMs, i am consistently facing a MissingPluginException and null pointer exception. E[/MediaMetadataRetrieverJNI]()(14809): getFrameAtTime: videoFrame is a NULL pointer
I confirm that i am still facing this issue, it is quite tricky to get it because it depends of the ms time frame and of the video and of the device. I only faced this issue on Android for the moment.
@LeGoffMael @ertan2002 Have you tried this fix? https://github.com/justsoft/video_thumbnail/issues/94#issuecomment-1120537449
@LeGoffMael @ertan2002 Have you tried this fix? #94 (comment)
I do not have problem ios or taking photo ... It happens when I use a firebase link (direct url). anyway I wrote my webservice and now it does the job. But if you have a fix, let me know.
You can reprocedure the error. Upload a video to firebase and copy the URL and let see what happens.
@LeGoffMael @ertan2002 Have you tried this fix? #94 (comment)
Same for me, the error only occurs on android
This is also an issue on Xiaomi Redmi 9T (Android 11), but not Google Pixel 5 (Android 11 - emulator)
Same here on Android Pixel2.
When I try to get a still at a timeMs I get the error
getFrameAtTime: videoFrame is a NULL pointer
Is there a fix?
Same issue here, it occurs on some videos, but not on others.
in my case, i have an error file mp4 so this lib can't get thumbnail image. But instead of move next to another video, it throw exception and break the loop. So i just add try catch when i get thumbnail, and it works
In my case, this is a very strange phenomenon, if a single video will continue to appear this error, but when a video can normally get the sketch, the video that could not get the sketch will also successfully get the sketch, and will not report a null pointer error(If it cannot be obtained for the first time, it can be obtained after being refreshed again).
At the same time, using the code implementation in the plug-in, when testing native Android, the wrong video can be obtained a slightly abbreviated image.
We don't know why yet...