
In your project’s pubspec.yaml file add the following 3 dependencies. Follow the instructions in this article, and you will be able to develop a similar Flutter app.įirst, let us start by adding dependencies to a new Flutter project.


When you tap the Save Video, the preview will refresh with the cropped and trimmed video replacing the original video. Create a Flutter app to trim and crop videos easily. The end result of this tutorial will be a simple app that would look like the following screenshot. Also, you can try out the code used in this article from this GitHub repository. But, it will discuss in brief how to crop the video using the video_trimmer library as well. This article will not cover building any UI for cropping and trimming. Here is a list of packages that we will be using ffmpeg_kit_flutter package for cropping and trimming videos, the path_provider package to get the path to the application or external directory where the video files will be stored, and the video_player package to play the video preview.

In this article we will use the FFmpeg library to crop and trim a video in a Flutter project. If you have dug deeper, you might have come across FFmpeg - a powerful video editing command line tool, that is not the easiest to get started with. In fact, none of the packages on pub.dev, as of today, allow cropping a video in Flutter. This package can trim videos but does not provide video cropping (at least not out-of-the-box). If you are looking for a package that crops and trims videos in Flutter, you must have already come across the video_trimmer Flutter package.
