You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Future<List<File>> getTwoFrame(String videoPath) async {
final MediaInfo info = await VideoCompress.getMediaInfo(videoPath);
var duration = info.duration;
if (duration == null) {
throw StateError("no duration detected");
}
var f1 = await VideoCompress.getFileThumbnail(videoPath, position: -1);
var f2 = await VideoCompress.getFileThumbnail(videoPath,
position: (duration / 2).toInt());
assert(f1.path != f2.path);
return [f1, f2];
}
the assert here will always be false. you can't extract multiple thumbnails from a video using getFileThumbnail because they will overwrite themselves. getFileThumbnail should generate files with a unique file name to avoid this issue
The text was updated successfully, but these errors were encountered:
the assert here will always be false. you can't extract multiple thumbnails from a video using
getFileThumbnail
because they will overwrite themselves.getFileThumbnail
should generate files with a unique file name to avoid this issueThe text was updated successfully, but these errors were encountered: