video_editor
video_editor copied to clipboard
[Refactor] remove ffmpeg_kit dependency and add web implementation
closes #146
This PR contains the following:
- Removed the dependency on the
ffmpeg_kit
package. - Created
FFmpegConfig
to improve video and cover export functionality. - Added an example demonstrating how to export video and cover images using either
ffmpeg_kit
orffmpeg_wasm
, depending on the platform. - Updated the
video_thumbnail
version to 0.6.0. - Updated the project to work on the web.
- Updated the documentation to reflect these changes.
Breaking changes
- Replaced
File
withXFile
inVideoEditorController.file
. - Removed
VideoEditorController.getMetaData
. - Removed
VideoEditorController.exportVideo
. - Removed
VideoEditorController.extractCover
.
Still need:
- [x] Merge PR for redleafsofts/flutter_ffmpeg_wasm#1
- [ ] Merge PR for justsoft/video_thumbnail#135
- [ ] Remove
git
andlocal
path frompubspec.yaml
, this needs the Pull Requests to be merged. - [x] Update documentation how to create custom export, especially the
executeFFmpegWeb
andexecuteFFmpegIO
methods in the example. - [x] When
CropScreen
is closed theVideoPlayer
is black- Problem: flutter/flutter#124210 using two
VideoPlayer
at the same time:CropGridViewer.preview
/CropGridViewer.edit
- Solution: since we never show two video players side by side at the same time, the
VideoPlayer
key must change as soon as we are done cropping
- Problem: flutter/flutter#124210 using two
- [x] Check why
cropStyle: const CropGridStyle(background: Colors.transparent),
is needed on the web. It seems thatPath.combine
breaks on the web.- HTML Renderer: flutter/flutter#44572
- Canvaskit renderer: flutter/flutter#124675
- Solution: Set
Path
'sfillType
toPathFillType.evenOdd
Please refer to the redleafsofts/flutter_ffmpeg_wasm#1 README
for instructions on how to run ffmpeg_wasm
on the web.
This is what it looks like on the web (using HTML renderer):
https://user-images.githubusercontent.com/8436039/231599361-de6faade-c7ed-4514-86e0-7cfce1f6b195.mp4