Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
.pub/

build/
.build/
.swiftpm/

.idea/
*.iml
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## 0.5.9

* Add Swift Package Manager support for iOS while retaining CocoaPods compatibility.

## 0.5.8

* Give the fork unique Android and iOS plugin identifiers so it can coexist with the original `video_thumbnail` package without namespace, duplicate-class, or method-channel conflicts.

## 0.5.7

* Fix the README example images on pub.dev by using absolute upstream image URLs.

## 0.5.6+1

* Rename the maintained fork to `video_thumbnail_gdx_plus`.
* Update package metadata, documentation, imports, example, and iOS podspec for the new package name.
* Add pub.dev topics, including `gdx`.
* Increase the Gradle heap limit for compatibility with current Flutter Android builds.

## 0.5.6
* Actually add the namespace fix for Android
* Bump to 0.5.6
Expand Down
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2019 John Zhong
Copyright (c) 2026 Gurwinder Singh (modifications)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 18 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
video_thumbnail_gdx_plus

This project is a maintained fork of video_thumbnail:
https://github.com/justsoft/video_thumbnail

The original project was created by John Zhong and includes contributions from
Tairs Rzajevs, Grigori, Hafeez Ahmed, Leynier, Andreas Petrov, julek-kal,
Nils Reichardt, Ajb Coder, Brandon Lisonbee, k1zerX, niketatjombay, wangbo4020,
Nailer, ztsyyb, and other contributors recorded in the original repository
history and changelog.

Maintained fork:
Copyright (c) 2026 Gurwinder Singh <contact@gurwinderdevx.com>
https://gurwinderdevx.com/
https://github.com/47gurvinder/video_thumbnail

The source code is distributed under the MIT License in the LICENSE file. The
original copyright notice and license text have been retained.
41 changes: 32 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# video_thumbnail
# video_thumbnail_gdx_plus

This 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.
This maintained fork of [`video_thumbnail`](https://pub.dev/packages/video_thumbnail) generates image thumbnails from video files or URLs on Android and iOS. It returns an image in memory or saves it as a file with customizable format, resolution, and quality.

[![pub ver](https://img.shields.io/badge/pub-v0.5.6-blue)](https://pub.dev/packages/video_thumbnail)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/justsoft/)
[![pub package](https://img.shields.io/pub/v/video_thumbnail_gdx_plus.svg)](https://pub.dev/packages/video_thumbnail_gdx_plus)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

![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)
![Video file thumbnail example](https://raw.githubusercontent.com/justsoft/video_thumbnail/refs/heads/master/video_file.png)
![Video URL thumbnail example](https://raw.githubusercontent.com/justsoft/video_thumbnail/refs/heads/master/video_url.png)

## Acknowledgements

This package is based on the original [`justsoft/video_thumbnail`](https://github.com/justsoft/video_thumbnail) project created by John Zhong. Credit remains with John Zhong and all original contributors. See [NOTICE](NOTICE), [LICENSE](LICENSE), and the preserved changelog for attribution and licensing details. This fork is independently maintained and is not presented as an official release of the original project.

## Methods
|function|parameter|description|return|
Expand All @@ -20,14 +25,14 @@ Warning:
## Usage

**Installing**
add [video_thumbnail](https://pub.dev/packages/video_thumbnail) as a dependency in your pubspec.yaml file.
Add [video_thumbnail_gdx_plus](https://pub.dev/packages/video_thumbnail_gdx_plus) as a dependency in your `pubspec.yaml` file.
```yaml
dependencies:
video_thumbnail: ^0.5.6
video_thumbnail_gdx_plus: ^0.5.9
```
**import**
```dart
import 'package:video_thumbnail/video_thumbnail.dart';
import 'package:video_thumbnail_gdx_plus/video_thumbnail_gdx_plus.dart';
```
**Generate a thumbnail in memory from video file**
```dart
Expand Down Expand Up @@ -68,4 +73,22 @@ final fileName = await VideoThumbnail.thumbnailFile(
```

## Notes
Fork or pull requests are always welcome. Currently it seems have a little performance issue while generating WebP thumbnail by using libwebp under iOS.
Issues and pull requests are welcome in the maintained repository. WebP thumbnail generation using libwebp on iOS may have a performance cost.

## Need help or a custom solution?

Need help integrating this package, maintaining an existing Flutter project, or building a custom web, mobile, or AI solution? Get in touch to discuss your requirements:

- [Contact Gurwinder DevX](https://gurwinderdevx.com/)
- [Hire me on Upwork](https://www.upwork.com/freelancers/gurwinderdevx)

## Author and support

Maintained by **Gurwinder Singh**, a full-stack web and mobile application developer and founder of [Gurwinder DevX](https://gurwinderdevx.com/).

- [GitHub](https://github.com/47gurvinder)
- [LinkedIn](https://www.linkedin.com/in/gurwinderdevx/)
- [Upwork](https://www.upwork.com/freelancers/gurwinderdevx)
- [Buy Me a Coffee](https://buymeacoffee.com/gurwinderdevx)

If this package helps your project, consider supporting its continued development through Buy Me a Coffee.
20 changes: 13 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
group 'xyz.justsoft.video_thumbnail'
group 'com.gurwinderdevx.video_thumbnail_gdx_plus'
version '1.0-SNAPSHOT'

buildscript {
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:8.11.1'
}
Comment thread
47gurvinder marked this conversation as resolved.
}

rootProject.allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion 33
namespace 'xyz.justsoft.video_thumbnail'
namespace 'com.gurwinderdevx.video_thumbnail_gdx_plus'
compileSdk 36

defaultConfig {
minSdkVersion 16
minSdkVersion 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

lintOptions {
disable 'InvalidPackage'
}
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=1G
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = 'video_thumbnail'
rootProject.name = 'video_thumbnail_gdx_plus'
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="xyz.justsoft.video_thumbnail">
package="com.gurwinderdevx.video_thumbnail_gdx_plus">
</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package xyz.justsoft.video_thumbnail;
package com.gurwinderdevx.video_thumbnail_gdx_plus;

import android.content.Context;
import android.graphics.Bitmap;
Expand Down Expand Up @@ -41,7 +41,7 @@ public class VideoThumbnailPlugin implements FlutterPlugin, MethodCallHandler {
public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
context = binding.getApplicationContext();
executor = Executors.newCachedThreadPool();
channel = new MethodChannel(binding.getBinaryMessenger(), "plugins.justsoft.xyz/video_thumbnail");
channel = new MethodChannel(binding.getBinaryMessenger(), "plugins.gurwinderdevx.com/video_thumbnail_gdx_plus");
channel.setMethodCallHandler(this);
}

Expand Down
7 changes: 6 additions & 1 deletion example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.flutter-versions
.pub-cache/
.pub/
/build/

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

# Web related
lib/generated_plugin_registrant.dart

Expand Down
6 changes: 6 additions & 0 deletions example/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## 0.1.0

* Rename the example app for `video_thumbnail_gdx_plus`.
* Update the local package dependency, import, documentation, and app labels.
* Retain the original thumbnail-generation demonstration behavior.
* Increase the Gradle heap limit for current Android build tooling.
19 changes: 10 additions & 9 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# video_thumbnail_example
# video_thumbnail_gdx_plus example

Demonstrates how to use the [video_thumbnail](https://pub.dev/packages/video_thumbnail) plugin.
Demonstrates how to use the [video_thumbnail_gdx_plus](https://pub.dev/packages/video_thumbnail_gdx_plus) plugin maintained by [Gurwinder Singh](https://github.com/47gurvinder).

## Getting Started

This project is a starting point for a Flutter application.
From the package root, run:

A few resources to get you started if this is your first Flutter project:
```sh
cd example
flutter pub get
flutter run
```

- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
The app can generate thumbnails from its default video URL or a video selected from the device.

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
See the [package README](../README.md) for API usage, credits, and license information.
47 changes: 15 additions & 32 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,47 +1,33 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
plugins {
id "com.android.application"
id "dev.flutter.flutter-gradle-plugin"
}

apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
namespace 'xyz.justsoft.video_thumbnail_example'
compileSdk 36
ndkVersion "28.2.13676358"

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "xyz.justsoft.video_thumbnail_example"
minSdkVersion 16
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
minSdkVersion flutter.minSdkVersion
targetSdkVersion 36
versionCode flutter.versionCode
versionName flutter.versionName
}

buildTypes {
Expand All @@ -56,6 +42,3 @@ android {
flutter {
source '../..'
}

dependencies {
}
3 changes: 2 additions & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@

<application
android:name="${applicationName}"
android:label="video_thumbnail_example"
android:label="video_thumbnail_gdx_plus example"
android:usesCleartextTraffic="true"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
Expand Down
17 changes: 3 additions & 14 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
buildscript {
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand All @@ -24,6 +13,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
delete rootProject.buildDir
tasks.register("clean", Delete) {
delete rootProject.layout.buildDirectory
}
6 changes: 5 additions & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=1G
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=false
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=false
3 changes: 1 addition & 2 deletions example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Thu Dec 19 16:33:23 MST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
Loading