https://github.com/anharu2394/tapioca
a Flutter plugin for video editing on Android and iOS.
https://github.com/anharu2394/tapioca
video video-editing video-filtering video-processing
Last synced: 5 months ago
JSON representation
a Flutter plugin for video editing on Android and iOS.
- Host: GitHub
- URL: https://github.com/anharu2394/tapioca
- Owner: anharu2394
- License: mit
- Created: 2020-04-28T04:00:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-09-28T00:46:46.000Z (about 2 years ago)
- Last Synced: 2024-08-03T14:10:06.702Z (about 1 year ago)
- Topics: video, video-editing, video-filtering, video-processing
- Language: Kotlin
- Homepage: https://pub.dev/packages/tapioca
- Size: 33.6 MB
- Stars: 123
- Watchers: 9
- Forks: 53
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Tapioca - a Flutter plugin for video editing
[](https://pub.dev/packages/tapioca)
[](https://pub.dev/packages/tapioca)
[](https://discord.gg/3Be9nP5cjb)
[](https://tippin.me/@_anharu)[](https://codecov.io/gh/anharu2394/tapioca)
Tapioca is a Flutter plugin for video editing on Android and iOS.*Note:* Feedback welcome and Pull Requests are most welcome!
## Previews
No filter
Apply pink filter
Apply blue filter
Apply text filter
Apply image filter## Features
- Develop for iOS and Android from a single codebase
- Edit videos(Apply filter, Overlay text and images)## Installation
First, add `tapioca` as a [dependency in your pubspec.yaml file.](https://flutter.dev/docs/development/packages-and-plugins/using-packages)
### iOS
Add the following entry to your _Info.plist_ file, located in `/ios/Runner/Info.plist`:
- NSPhotoLibraryUsageDescription - Specifies the reason for your app to access the user’s photo library. This is called `Privacy - Photo Library Usage Description` in the visual editor.
- NSPhotoLibraryAddUsageDescription - Specifies the reason for your app to get write-only access to the user’s photo library. This is called `Privacy - Photo Library Additions Usage Description` in the visual editor.### Android
Step 1. Ensure the following permission is present in your Android Manifest file, located in `/android/app/src/main/AndroidManifest.xml`:
```xml
```
Step 2. Add the JitPack repository to your Android build file, located in `/android/build.gradle`:
```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}```
## Usage
```dart
import 'package:tapioca/tapioca.dart';
import 'package:path_provider/path_provider.dart';final tapiocaBalls = [
TapiocaBall.filter(Filters.pink),
TapiocaBall.imageOverlay(imageBitmap, 300, 300),
TapiocaBall.textOverlay("text",100,10,100,Color(0xffffc0cb)),
];
var tempDir = await getTemporaryDirectory();
final path = '${tempDir.path}/result.mp4';
final cup = Cup(Content(videoPath), tapiocaBalls);
cup.suckUp(path).then((_) {
print("finish processing");
});
```### TapiocaBall
TapiocaBall is a effect to apply to the video.
| TapiocaBall | Effect |
| :------------------------------------------------------------------------ | :----------------: |
| TapiocaBall.filter(Filters filter) | Apply color filter |
| TapiocaBall.textOverlay(String text, int x, int y, int size, Color color) | Overlay text |
| TapiocaBall.imageOverlay(Uint8List bitmap, int x, int y) | Overlay images |## Content
Content is a class to wrap a video file.
## Cup
Cup is a class to wrap a `Content` object and `List` object.
You can edit the video by executing `.suckUp()`.
## Supported Formats
- On iOS, the backing video editor is [AVFoundation](https://developer.apple.com/documentation/avfoundation).
please refer [here](https://developer.apple.com/documentation/avfoundation/avfiletype) for list of supported video formats.
- On Android, the backing video editor is [Mp4Composer-android](https://github.com/MasayukiSuda/Mp4Composer-android),
The supported format is only MP4.## Articles
- [“Tapioca”, the flutter package to edit videos easily and not using FFmpeg](https://medium.com/@anharu/tapioca-the-flutter-package-to-edit-videos-easily-and-not-using-ffmpeg-2e1a85824796)
## Contributing
Contributions are welcomed!- Report bugs and scenarios that are difficult to implement
- Report parts of the documentation that are unclear
- Update the documentation / add examples
- Implement new features by making a pull-requestPlease see the following guidelines when modifying the repository
[Contributing](CONTRIBUTING.md)## Community
Questions and proposals are most welcome!
[](https://discord.gg/3Be9nP5cjb)