FLUTTER ECOSYSTEM

anharu2394/tapioca

一个用于 Android 和 iOS 上视频编辑的 Flutter 插件。

木薯 项目封面
Stars
129
Forks
57
最近推送(UTC)
2026年2月21日
项目状态
未归档
An Haru GitHub avatar
GITHUB User

An Haru ↗

I love Rust!!

Tokyo, Japan
语言KotlinDartSwiftRubyObjective-C

技术话题

此仓库发布的插件

使用的依赖

依赖清单 2 项
  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

Tapioca - a Flutter plugin for video editing

Version Generic badge Discord tippin.me

codecov Tapioca is a Flutter plugin for video editing on Android and iOS.

Note: Feedback welcome and Pull Requests are most welcome!

Previews

https://raw.githubusercontent.com/anharu2394/tapioca/master/assets/non_filter.gif
No filter
https://raw.githubusercontent.com/anharu2394/tapioca/master/assets/pink_filter.gif
Apply pink filter
https://raw.githubusercontent.com/anharu2394/tapioca/master/assets/blue_filter.gif
Apply blue filter
https://raw.githubusercontent.com/anharu2394/tapioca/master/assets/text_filter.gif
Apply text filter
https://raw.githubusercontent.com/anharu2394/tapioca/master/assets/tapioca_filter.gif
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.

iOS

Add the following entry to your Info.plist file, located in <project root>/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 <project root>/android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Step 2. Add the JitPack repository to your Android build file, located in <project root>/android/build.gradle:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Usage

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<TapiocaBall> object.

You can edit the video by executing .suckUp().

Supported Formats

  • On iOS, the backing video editor is AVFoundation. please refer here for list of supported video formats.
  • On Android, the backing video editor is Mp4Composer-android, The supported format is only MP4.

Articles

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-request

Please see the following guidelines when modifying the repository
Contributing

Community

Questions and proposals are most welcome!
Discord Banner 4