Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Exception: MissingPluginException(No implementation found for method file on channel video_thumbnail) #65

Closed
nanian opened this issue Mar 24, 2021 · 7 comments

Comments

@nanian
Copy link

nanian commented Mar 24, 2021

final uint8list = await VideoThumbnail.thumbnailFile(
video: photoBean.path,
imageFormat: ImageFormat.JPEG,
// specify the width of the thumbnail, let the height auto-scaled to keep the source aspect ratio
quality: 55,
);
我用的video_thumbnail: ^0.3.1最新版,现在还是有这个问题老哥,能在修复下吗
E/wagnfei==(21391): {"imageList":[{"name":"VID_20210226_193823.mp4","path":"/storage/emulated/0/DCIM/Camera/VID_20210226_193823.mp4","type":"-1"},{"name":"1591193340707.mp4","path":"/storage/emulated/0/tencent/MicroMsg/WeiXin/1591193340707.mp4","type":"-1"}]}
I/flutter (21391): resultImageState=/storage/emulated/0/DCIM/Camera/VID_20210226_193823.mp4
D/ThumbnailPlugin(21391): buildThumbnailFile( format:0, maxh:0, maxw:75, timeMs:0, quality:55 )
D/ThumbnailPlugin(21391): buildThumbnailData( format:0, maxh:0, maxw:75, timeMs:0, quality:55 )
D/ThumbnailPlugin(21391): original w:1080, h:1920 => 75, 133
E/flutter (21391): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: MissingPluginException(No implementation found for method file on channel video_thumbnail)
E/flutter (21391): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:7)
E/flutter (21391):
E/flutter (21391): #1 VideoThumbnail.thumbnailFile (package:video_thumbnail/video_thumbnail.dart:44:12)
E/flutter (21391):
E/flutter (21391): #2 _EvaluationWidgetState._pickAsset (package:flutter111/widget/EvaluationWidget.dart:421:27)
E/flutter (21391):
E/flutter (21391):
QQ:390774562

@justsoft
Copy link
Owner

Please check the video is playable on your device.

@nanian
Copy link
Author

nanian commented Mar 25, 2021 via email

@nanian
Copy link
Author

nanian commented Mar 25, 2021 via email

@nanian
Copy link
Author

nanian commented Mar 25, 2021 via email

@justsoft
Copy link
Owner

Please take a look my example.

@ForeverZhangXun
Copy link

I also encountered this problem. Finally, I found that it was due to the problem of quality setting. If I set the quality to 200, It would fail. If I set the quality to 100, It would success.
await VideoThumbnail.thumbnailFile(
video: _videoPath,
thumbnailPath: (await getTemporaryDirectory()).path,
imageFormat: ImageFormat.JPEG,
maxHeight: 1000,
quality: 100,
)

@justsoft
Copy link
Owner

justsoft commented May 2, 2022

Thanks for the finding, the quality should be 100 or less, it is the percentage of quality of the original image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants