rurico / flutter_video_compress

Generate a new file by compressed video, and provide metadata. Get video thumbnail from a video path, supports JPEG/GIF. To reduce app size not using FFmpeg in IOS.
MIT License
185 stars 72 forks source link

[Bug] 'Position' in the method getThumbnailWithFile seems to be invalid #101

Open haoyuanwu opened 3 years ago

haoyuanwu commented 3 years ago

Description

No matter how many 'position' parameters are passed in, the acquired image will not change.

Platform

IOS|Android

Code Example (if has)

Future _getVideoImage(bool isHeader) async { await FlutterVideoCompress().getThumbnailWithFile( widget.videoPath, position: isHeader ? 0 : widget.videoLongTime ?? 60000000 // default(-1) ).then((value) { setState(() { print(value.path); widget.imagePath = value.path; isVideoHeader = isHeader ? true : false; }, ); }); }

Expected solution

flutter: /private/var/mobile/Containers/Data/Application/09678862-FB0B-428D-910E-7DB718538AF4/tmp/flutter_video_compress/trim.1566DF16-FA8E-4429-AD06-3BABFFE3461A.jpg flutter: /private/var/mobile/Containers/Data/Application/09678862-FB0B-428D-910E-7DB718538AF4/tmp/flutter_video_compress/trim.1566DF16-FA8E-4429-AD06-3BABFFE3461A.jpg flutter: /private/var/mobile/Containers/Data/Application/09678862-FB0B-428D-910E-7DB718538AF4/tmp/flutter_video_compress/trim.1566DF16-FA8E-4429-AD06-3BABFFE3461A.jpg flutter: /private/var/mobile/Containers/Data/Application/09678862-FB0B-428D-910E-7DB718538AF4/tmp/flutter_video_compress/trim.1566DF16-FA8E-4429-AD06-3BABFFE3461A.jpg