I am trying to develop an app which the user chooses a video and displays it , and several operations can be performed, the first one is to trim the video Where you can choose a starting point and an ending point, and the output is a video between them how can I trim the video I feel completely lost in this question
Asked
Active
Viewed 726 times
-2
-
Does this help? https://stackoverflow.com/questions/21675480/start-the-trim-video-activity-with-an-intent/21752769#21752769 & https://stackoverflow.com/questions/11205299/android-sdk-cut-trim-video-file – Heniam Apr 28 '20 at 01:45
-
Yes thank you so much – Abdull Rahman Adnan Apr 30 '20 at 04:04
1 Answers
0
Try this git link to trim video in android studio
Follow these steps
implement gradle
implementation 'life.knowledge4:k4l-video-trimmer:1.0'
Add View in layout
<life.knowledge4.videotrimmer.K4LVideoTrimmer
android:id="@+id/timeLine"
android:layout_height="match_parent"
android:layout_width="match_parent" />
Set the K4LVideoTrimmer selected video Uri.
K4LVideoTrimmer videoTrimmer = ((K4LVideoTrimmer) findViewById(R.id.timeLine));
if (videoTrimmer != null) {
videoTrimmer.setVideoURI(Uri.parse(path));
}
Implements OnTrimVideoListener methods
@Override
public void getResult(final Uri uri) {
// handle K4LVideoTrimmer result.
}
@Override
public void cancelAction() {
// handle K4LVideoTrimmer cancel action
}

Android Geek
- 8,956
- 2
- 21
- 35