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

Video Trimmer 2.0.0 #180

Merged
merged 16 commits into from
Oct 29, 2022
Merged
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
140 changes: 76 additions & 64 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,108 +1,120 @@
## 2.0.0

* **BREAKING CHANGE:** Overhaul of the entire video trimmer implementation.
* Two types of `TrimViewer` are available: `FixedTrimViewer` & `ScrollableTrimViewer`. By default it's set to `auto` so that it switches between these two based on the total video length and the maximum trim duration allowed.
* Rename `TrimEditor` to `TrimViewer`. Check out [this diagram](https://raw.githubusercontent.com/sbis04/video_trimmer/new_editor/screenshots/trim_viewer_preview_small.png) for better understanding of the keywords/terms.
* Separate the properties of into two types, `TrimEditorProperties` & `TrimAreaProperties`. Helps in identifying where the properties belong to easily.
* Fix some bugs related to wrong trimmer length while initialization.
* Add more customization options.
* Improve the documentation.
* Update the example project.
* Bug Fix: Use `circleSizeOnDrag` only on the selected holder.

## 1.2.0

* Update plugin versions
* Update plugin versions.

## 1.1.3

* Changing `path` version to `1.8.0` (latest is `1.8.1`) because it creates a conflict with `flutter_test` as it uses the older version
* Changing `path` version to `1.8.0` (latest is `1.8.1`) because it creates a conflict with `flutter_test` as it uses the older version.

## 1.1.2

* Update plugin versions
* Update plugin versions.

## 1.1.1

* Format file (to pass static analysis)
* Format file (to pass static analysis).

## 1.1.0

* Update ffmpeg_kit_flutter to 4.5.1-LTS
* Update other plugin versions
* Update Readme
* Update ffmpeg_kit_flutter to 4.5.1-LTS.
* Update other plugin versions.
* Update Readme.

## 1.0.0

* **BREAKING CHANGE:** Migrate to [FFmpegKit for Flutter](https://pub.dev/packages/ffmpeg_kit_flutter).
`saveTrimmedVideo()` method is not async now, you'll need to use the callback `onSave: (outputPath) {}` to get the trimmed video output path.
* Add playback timestamp in the `showDuration`
* Simply configuration
* Update the plugin versions
* Update Docs
* Add playback timestamp in the `showDuration`.
* Simply configuration.
* Update the plugin versions.
* Update Docs.

## 0.6.0

* Update the plugin versions
* Using flutter_lints
* Update the plugin versions.
* Using flutter_lints.

## 0.5.4

* Update Docs
* Update Docs.

## 0.5.3

* Add `borderWidth` and `scrubberWidth` properties under `TrimEditor` widget
* Fix padding and border decoration of `VideoViewer`
* Update the plugin versions
* Add `borderWidth` and `scrubberWidth` properties under `TrimEditor` widget.
* Fix padding and border decoration of `VideoViewer`.
* Update the plugin versions.

## 0.5.2

* Fix iOS error while loading thumbnails in `TrimEditor`
* Remove an unused dependency
* Update packages
* Fix iOS error while loading thumbnails in `TrimEditor`.
* Remove an unused dependency.
* Update packages.

## 0.5.1

* Update the example in Readme
* Update the plugin versions
* Update the example in Readme.
* Update the plugin versions.

## 0.5.0

* Global refactoring, example is now a standalone screen
* Fixed the staggering issue when dragging the frame
* The whole frame can now be dragged in addition to the sides
* Updated packages
* Updated the example
* Global refactoring, example is now a standalone screen.
* Fixed the staggering issue when dragging the frame.
* The whole frame can now be dragged in addition to the sides.
* Updated packages.
* Updated the example.

## 0.4.0

* Migrate to null safety
* Fix video thumbnail loading issues
* Bump up all dependencies
* Upgrade example
* Migrate to null safety.
* Fix video thumbnail loading issues.
* Bump up all dependencies.
* Upgrade example.

## 0.3.5

* Update example app (small bug fixes)
* Update to latest plugin versions
* Update example app (small bug fixes).
* Update to latest plugin versions.

## 0.3.4

* Fixed the issue with video getting struck for a few initial frames during playback
* Fixed the issue with video getting struck for a few initial frames during playback.

## 0.3.3

* Updated plugin versions
* Updated plugin versions.

## 0.3.2

* Minor changes
* Minor changes.

## 0.3.1

* Improve the file structure of the package
* Now, you just have to import one file for using the package
* Improve the file structure of the package.
* Now, you just have to import one file for using the package.

## 0.3.0

* Update the plugin versions
* Update example app (now includes how to retrieve the trimmed video)
* Update Readme
* Fixes some memory leak issues
* Update the plugin versions.
* Update example app (now includes how to retrieve the trimmed video).
* Update Readme.
* Fixes some memory leak issues.

## 0.2.7

* Add a new property called `maxVideoLength` for specifying the max length of the output video.
* Update Docs
* Update Docs.

## 0.2.6

Expand All @@ -111,62 +123,62 @@

**NOTE:** Applying this will take significantly greater amount of time to process the output video.

* Improve Docs
* Improve Docs.

## 0.2.5

* Update Docs
* Reverted the FFmpeg trimmed video start & end position to **milliseconds** (earlier it was changed to **seconds** in `v0.2.4` to fix video freezing, but after testing it was found that the issue still persists)
* Update Docs.
* Reverted the FFmpeg trimmed video start & end position to **milliseconds** (earlier it was changed to **seconds** in `v0.2.4` to fix video freezing, but after testing it was found that the issue still persists).

## 0.2.4

* Fix output video freezing during start and end
* Update the example app to use LTS version of FFmpeg (for wider device support)
* Update Readme
* Fix output video freezing during start and end.
* Update the example app to use LTS version of FFmpeg (for wider device support).
* Update Readme.

## 0.2.3

* Fix issue with path returned
* Fix issue with path returned.

## 0.2.2

* Change implementation of the `saveTrimmedVideo()` method
* `saveTrimmedVideo()` now returns the output video path
* Update Docs
* Change implementation of the `saveTrimmedVideo()` method.
* `saveTrimmedVideo()` now returns the output video path.
* Update Docs.

## 0.2.1

* Fix over-scrolling && scroll-over issue
* Fix over-scrolling && scroll-over issue.

## 0.2.0

* BREAKING CHANGE: `loadVideo()` method implementation changed.
Now, you can pass the video file to the method.
* Fix issue related to animation controller improperly disposing
* Update Docs
* Fix issue related to animation controller improperly disposing.
* Update Docs.

## 0.1.5

* Fix for paths having white spaces
* Fix for paths having white spaces.

## 0.1.4

* Smoothen the scrubber animation
* Smoothen the scrubber animation.

## 0.1.3

* Code improvements
* Update Readme
* Code improvements.
* Update Readme.

## 0.1.2

* Changed `StorageDir` format naming
* Update documentation
* Changed `StorageDir` format naming.
* Update documentation.

## 0.1.1

* Correct documentation
* Correct documentation.

## 0.1.0

* Initial Open Source release
* Initial Open Source release.
59 changes: 27 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,22 @@

### Features

* Customizable video trimmer
* Video playback control
* Retrieving and storing video file
* Customizable video trimmer.
* Supports two types of trim viewer, fixed length and scrollable.
* Video playback control.
* Retrieving and storing video file.

Also, supports conversion to **GIF**.

<h4 align="center">TRIM EDITOR</h4>
> **Migrating to v2.0.0:** If you were using 1.x.x version of this package, checkout the BREAKING CHANGES by going to the **Changelog** tab on the `pub.dev` package page.

Following image shows the structure of the `TrimViewer`. It consists of the `Duration` on top (displaying the start, end, and scrubber time), `TrimArea` consisting of the thumbnails, and `TrimEditor` which is an overlay that let's you select a portion from the video.

<p align="center">
<img src="https://raw.githubusercontent.com/sbis04/video_trimmer/new_editor/screenshots/trim_viewer_preview.png" alt="Trim Editor" />
</p>

<h4 align="center">TRIM VIEWER</h4>

<p align="center">
<img src="https://github.com/sbis04/video_trimmer/raw/master/screenshots/editor_demo.gif" alt="Trim Editor" />
Expand All @@ -37,7 +46,7 @@ Also, supports conversion to **GIF**.
<img src="https://github.com/sbis04/video_trimmer/raw/master/screenshots/trimmer.png" alt="Trimmer"/>
</p>

<h4 align="center">CUSTOMIZABLE VIDEO EDITOR</h4>
<h4 align="center">CUSTOMIZABLE VIDEO TRIMMER</h4>

<p align="center">
<img src="https://github.com/sbis04/video_trimmer/raw/master/screenshots/trim_editor.gif" alt="Trim Editor" />
Expand All @@ -49,7 +58,7 @@ Add the dependency `video_trimmer` to your **pubspec.yaml** file:

```yaml
dependencies:
video_trimmer: ^1.1.0
video_trimmer: ^2.0.0
```

### Android configuration
Expand Down Expand Up @@ -184,22 +193,15 @@ VideoViewer(trimmer: _trimmer)
### Display the video trimmer area

```dart
TrimEditor(
TrimViewer(
trimmer: _trimmer,
viewerHeight: 50.0,
viewerWidth: MediaQuery.of(context).size.width,
maxVideoLength: Duration(seconds: 10),
onChangeStart: (value) {
_startValue = value;
},
onChangeEnd: (value) {
_endValue = value;
},
onChangePlaybackState: (value) {
setState(() {
_isPlaying = value;
});
},
maxVideoLength: const Duration(seconds: 10),
onChangeStart: (value) => _startValue = value,
onChangeEnd: (value) => _endValue = value,
onChangePlaybackState: (value) =>
setState(() => _isPlaying = value),
)
```

Expand Down Expand Up @@ -351,22 +353,15 @@ class _TrimmerViewState extends State<TrimmerView> {
child: VideoViewer(trimmer: _trimmer),
),
Center(
child: TrimEditor(
child: TrimViewer(
trimmer: _trimmer,
viewerHeight: 50.0,
viewerWidth: MediaQuery.of(context).size.width,
maxVideoLength: Duration(seconds: 10),
onChangeStart: (value) {
_startValue = value;
},
onChangeEnd: (value) {
_endValue = value;
},
onChangePlaybackState: (value) {
setState(() {
_isPlaying = value;
});
},
maxVideoLength: const Duration(seconds: 10),
onChangeStart: (value) => _startValue = value,
onChangeEnd: (value) => _endValue = value,
onChangePlaybackState: (value) =>
setState(() => _isPlaying = value),
),
),
TextButton(
Expand Down
6 changes: 3 additions & 3 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.5;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -545,7 +545,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.5;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -578,7 +578,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.5;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
Expand Down
Loading