VideoEditor
FFmpeg is a powerful multimedia framework which allows us to decode, encode, transcode, stream, filter and play most of the media content available now. With the help of these tools, you can develop and application that can manipulate any form of media to the desired output. Sky is not the limit when using FFmpeg. I prefer FFmpeg-all which is a Bible for FFmpeg but it is difficult to read if you do not know what you are looking for. To make it easy, I will summarise the basics of video manipulations using FFmpeg which, then you can use in your own applications or libraries that you are working on. I have developed a simple library that enables you to trim and crop a video, additionally you can compress any video and convert it into any format that you desire.
Install / Use
/learn @tizisdeepan/VideoEditorREADME
Simple Video Trimmerw
<table> <tr><td align="center"><img src="https://github.com/mohamed0017/SimpleVideoEditor/blob/master/Screenshots/Screenshot_2023-08-26-16-58-44-339_com.video.sample%20(1).jpg" alt="Video Editor" width="50%"></td> <tr><td align="center"><b>Video Editor</b></td> </table>About Library
Simple video editor Library contains the following features (cropping/trimming/compressing) videos, using FFmpegKit Libary.
Implementation
[1] In your app module gradle file
dependencies {
implementation 'com.github.mohamed0017:SimpleVideoEditor:<latest_version>'
}
[2] In your project level gradle file
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
[3] Use VideoTrimmer in your layout.xml
<com.video.trimmer.view.VideoEditor
android:id="@+id/videoTrimmer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/header"/>
[4] Implement OnVideoEditedListener on your Activity/ Fragment
class MainActivity : AppCompatActivity(), OnTrimVideoListener {
...
override fun onTrimStarted(){
}
override fun getResult(uri: Uri){
}
override fun cancelAction(){
}
override fun onError(message: String){
}
override fun onProgress(percentage: Int){
}
}
[5] Create instances and set default values for the VideoTrimmer in your Activity/ Fragment
videoTrimmer.setTextTimeSelectionTypeface(FontsHelper[this, FontsConstants.SEMI_BOLD])
.setOnTrimVideoListener(this)
.setOnVideoListener(this)
.setVideoURI(Uri.parse(path))
.setVideoInformationVisibility(true)
.setMaxDuration(10)
.setMinDuration(2)
.setVideoQuality(VideoQuality.Medium) // set video quality
.setDestinationPath(Environment.getExternalStorageDirectory().path + File.separator + Environment.DIRECTORY_MOVIES)
[8] Create instances and set default values for the VideoCropper in your Activity/ Fragment
videoCropper.setVideoURI(Uri.parse(path))
.setOnCropVideoListener(this)
.setMinMaxRatios(0.3f, 3f)
.setDestinationPath(Environment.getExternalStorageDirectory().path + File.separator + Environment.DIRECTORY_MOVIES)
Voila! You have implemented an awesome Video Editor for your Android Project now!
Related Skills
docs-writer
99.6k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
342.0kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
arscontexta
2.9kClaude Code plugin that generates individualized knowledge systems from conversation. You describe how you think and work, have a conversation and get a complete second brain as markdown files you own.
cursor-agent-tracking
134A repository that provides a structured system for maintaining context and tracking changes in Cursor's AGENT mode conversations through template files, enabling better continuity and organization of AI interactions.
