“Tapioca”, the flutter package to edit videos easily and not using FFmpeg
Tags: Ffmpeg, Flutter, Dart, Video Editing

“Tapioca”, the flutter package to edit videos easily and not using FFmpeg あんはる Feb 14·3 min read

https://pub.dev/packages/tapioca

Introduction

Hi, I’m Anharu.

I’m a Japanese junior-high-school student.

I developed "tapioca", the flutter package to edit videos easily and not using FFmpeg.

I personally published this package to capture a video and apply text and color filters to it in the beauty app I had developed.

Surprisingly, many people seem to get and try my package! (Unfortunately, I cannot know a count of the package downloaded because pub.dev does not publish it )

my package is introduced in websites for engineers, such as StackOverflow.

https://stackoverflow.com/questions/64068672/how-to-get-coordinates-scale-and-rotation-data-of-a-widget-in-flutter

https://flutterforum.co/t/flutter-video-filters/2878

Features

Not depend on FFmpeg

> FFmpeg is licensed under the GNU Lesser General Public License (LGPL) version 2.1 or later. ( https://ffmpeg.org/legal.html )

if an application relies on FFmpeg, you should follow the license. (https://video.stackexchange.com/questions/14802/can-i-use-ffmpeg-in-a-commercial-product) It’s complex and troublesome.

So, in order to get rid of the troublesome problems, “Tapioca” does not depend on FFmpeg.

before editing

Apply a filter

apply a pink filter

import 'package:tapioca/tapioca.dart';

import 'package:path_provider/path_provider.dart';



final tapiocaBalls = [

TapiocaBall.filter(Filters.pink)

];

var tempDir = await getTemporaryDirectory();

final path = '${tempDir.path}/result.mp4';

final cup = Cup(Content(videoPath), tapiocaBalls);

cup.suckUp(path).then((_) {

print("finish processing");

});

pink filter

Apply a blue filter

import 'package:tapioca/tapioca.dart';

import 'package:path_provider/path_provider.dart';



final tapiocaBalls = [

TapiocaBall.filter(Filters.blue)

];

var tempDir = await getTemporaryDirectory();

final path = '${tempDir.path}/result.mp4';

final cup = Cup(Content(videoPath), tapiocaBalls);

cup.suckUp(path).then((_) {

print("finish processing");

});

blue filter

Overlay texts

import 'package:tapioca/tapioca.dart';

import 'package:path_provider/path_provider.dart';



final tapiocaBalls = [

TapiocaBall.textOverlay("text",100,10,500,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");

});

overly texts

Overlay images

import 'package:tapioca/tapioca.dart';

import 'package:path_provider/path_provider.dart';



final tapiocaBalls = [

TapiocaBall.imageOverlay(imageBitmap, 300,0),

];

var tempDir = await getTemporaryDirectory();

final path = '${tempDir.path}/result.mp4';

final cup = Cup(Content(videoPath), tapiocaBalls);

cup.suckUp(path).then((_) {

print("finish processing");

});

overlay the image

Development

I’ve developed a mobile app with Flutter, but I’ve never developed an app with iOS(Swift) and Android(Kotlin).

So, it is hard to develop the package because I need to use Swift and Kotlin to implement MethodChannel. more info about MethodChannel↓

In order to process videos, in Android, the package depends on Mp4Composer-android , and in iOS, the package depends on AVFoundation.

[wanted] Looking for collaborators

now, Due to studying for college entrance exams(Feb 2022), I can not manage the repository.

I want to develop the repo to add new features after finishing the exam.

So, I am looking for collaborators

if you’re interested in this, please comment on the issue or contact me↓↓

My Twitter → https://twitter.com/_anharu