{"id":32309246,"url":"https://github.com/justsoft/video_thumbnail","last_synced_at":"2026-02-23T17:26:29.117Z","repository":{"id":36523803,"uuid":"189207001","full_name":"justsoft/video_thumbnail","owner":"justsoft","description":"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.","archived":false,"fork":false,"pushed_at":"2025-05-10T06:00:29.000Z","size":337,"stargazers_count":194,"open_issues_count":69,"forks_count":413,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-10T07:26:17.102Z","etag":null,"topics":["file","flutter","jpeg","plugin","png","thumbnail","url","video","webp"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justsoft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-05-29T10:51:08.000Z","updated_at":"2025-05-10T06:00:33.000Z","dependencies_parsed_at":"2024-06-18T13:45:13.594Z","dependency_job_id":"f38d6a7c-91c0-4b5d-a17c-2be6b6929014","html_url":"https://github.com/justsoft/video_thumbnail","commit_stats":{"total_commits":65,"total_committers":18,"mean_commits":3.611111111111111,"dds":"0.36923076923076925","last_synced_commit":"09953b413ccb51c9b0dbc864974895f978258066"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/justsoft/video_thumbnail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justsoft%2Fvideo_thumbnail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justsoft%2Fvideo_thumbnail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justsoft%2Fvideo_thumbnail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justsoft%2Fvideo_thumbnail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justsoft","download_url":"https://codeload.github.com/justsoft/video_thumbnail/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justsoft%2Fvideo_thumbnail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29749028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file","flutter","jpeg","plugin","png","thumbnail","url","video","webp"],"created_at":"2025-10-23T08:19:28.017Z","updated_at":"2026-02-23T17:26:29.111Z","avatar_url":"https://github.com/justsoft.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# video_thumbnail\n\nThis plugin generates image thumbnails from video files or URLs on both Android and iOS. It returns an image in memory or saves it as a file with customizable format, resolution, and quality.\n\n  [![pub ver](https://img.shields.io/badge/pub-v0.5.6-blue)](https://pub.dev/packages/video_thumbnail)\n  [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/justsoft/)\n\n![video-file](https://github.com/justsoft/video_thumbnail/blob/master/video_file.png?raw=true) ![video-url](https://github.com/justsoft/video_thumbnail/blob/master/video_url.png?raw=true)\n\n## Methods\n|function|parameter|description|return|\n|--|--|--|--|\n|thumbnailData|String `[video]`, optional Map\u003cString, dynamic\u003e `[headers]`, ImageFormat `[imageFormat]`(JPEG/PNG/WEBP), int `[maxHeight]`(0: for the original resolution of the video, or scaled by the source aspect ratio), [maxWidth]`(0: for the original resolution of the video, or scaled by the source aspect ratio), int `[timeMs]` generates the thumbnail from the frame around the specified millisecond, int `[quality]`(0-100)|generates thumbnail from `[video]`|`[Future\u003cUint8List\u003e]`|\n|thumbnailFile|String `[video]`, optional Map\u003cString, dynamic\u003e `[headers]`, String `[thumbnailPath]`(folder or full path where to store the thumbnail file, null to save to same folder as the video file), ImageFormat `[imageFormat]`(JPEG/PNG/WEBP), int `[maxHeight]`(0: for the original resolution of the video, or scaled by the source aspect ratio), int `[maxWidth]`(0: for the original resolution of the video, or scaled by the source aspect ratio), int `[timeMs]` generates the thumbnail from the frame around the specified millisecond, int `[quality]`(0-100)|creates a file of the thumbnail from the `[video]` |`[Future\u003cString\u003e]`|\n\nWarning:\n\u003e Giving both the `maxHeight` and `maxWidth` has different result on Android platform, it actually scales the thumbnail to the specified maxHeight and maxWidth.\n\u003e To generate the thumbnail from a network resource, the `video` must be properly URL encoded.\n\n## Usage\n\n**Installing**\nadd [video_thumbnail](https://pub.dev/packages/video_thumbnail) as a dependency in your pubspec.yaml file.\n```yaml\ndependencies:\n  video_thumbnail: ^0.5.6\n```\n**import**\n```dart\nimport 'package:video_thumbnail/video_thumbnail.dart';\n```\n**Generate a thumbnail in memory from video file**\n```dart\nfinal uint8list = await VideoThumbnail.thumbnailData(\n  video: videofile.path,\n  imageFormat: ImageFormat.JPEG,\n  maxWidth: 128, // specify the width of the thumbnail, let the height auto-scaled to keep the source aspect ratio\n  quality: 25,\n);\n```\n\n**Generate a thumbnail file from video URL**\n```dart\nfinal fileName = await VideoThumbnail.thumbnailFile(\n  video: \"https://flutter.github.io/assets-for-api-docs/assets/videos/butterfly.mp4\",\n  thumbnailPath: (await getTemporaryDirectory()).path,\n  imageFormat: ImageFormat.WEBP,\n  maxHeight: 64, // specify the height of the thumbnail, let the width auto-scaled to keep the source aspect ratio\n  quality: 75,\n);\n```\n\n**Generate a thumbnail file from video Assets declared in pubspec.yaml**\n```dart\nfinal byteData = await rootBundle.load(\"assets/my_video.mp4\");\nDirectory tempDir = await getTemporaryDirectory();\n\nFile tempVideo = File(\"${tempDir.path}/assets/my_video.mp4\")\n  ..createSync(recursive: true)\n  ..writeAsBytesSync(byteData.buffer.asUint8List(byteData.offsetInBytes, byteData.lengthInBytes));\n\nfinal fileName = await VideoThumbnail.thumbnailFile(\n  video: tempVideo.path,\n  thumbnailPath: (await getTemporaryDirectory()).path,\n  imageFormat: ImageFormat.PNG,  \n  quality: 100,\n);\n```\n\n## Notes\nFork or pull requests are always welcome. Currently it seems have a little performance issue while generating WebP thumbnail by using libwebp under iOS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustsoft%2Fvideo_thumbnail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustsoft%2Fvideo_thumbnail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustsoft%2Fvideo_thumbnail/lists"}