You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library is deprecated, it was depended on [ffmpeg-kit](https://github.com/arthenica/ffmpeg-kit?tab=readme-ov-file). Since ffmpeg-kit has been removed, due to ffmpeg license issue.
9
-
hereafter, users will encounter a "failed to resolve" issue.
10
-
11
-
### Alternates:
12
-
1.https://github.com/Hassaan-Javed/gowtham-video-trimmer-fork - instead of FFmpeg, [LiTr library](https://github.com/linkedin/LiTr) is used in this fork.
13
-
14
-
2. Fork this repo and replace video processing part with [Media3 library](https://android-developers.googleblog.com/2025/03/media-processing-performance-jetpack-media3-transformer.html) or local FFmpeg
15
-
16
-
17
-
Sorry for the inconvenience.
4
+
### Starting from latest version 1.8.0 this library is using [media3](https://developer.android.com/media/media3/transformer/transformations) for media transcoding. Previously it was using [ffmpeg](https://github.com/arthenica/ffmpeg-kit?tab=readme-ov-file) which is deprecated now.
18
5
19
6
20
7
# Android-video-trimmer
21
8
22
-
##### Helps to trim local videos with many customizations on Android applications using exoplayer2 and FFmpeg [Demo app](https://github.com/a914-gowtham/android-video-trimmer/releases/tag/1.7.14)
9
+
##### Helps to trim local videos with many customizations on Android applications using exoplayer2 and FFmpeg [Demo app](https://github.com/a914-gowtham/android-video-trimmer/releases)
## Using Different Modes (Ordered By Output Speed):
87
-
88
-
#### Default Mode:
89
-
```java
90
-
TrimVideo.activity(String.valueOf(videoUri))
91
-
.setHideSeekBar(true)
92
-
.start(this,startForResult);
93
-
```
94
-
1. Fastest processing, No losses in quality((no compression), will be low accurate(2-3 secs)
95
-
96
-
#### Accuracy Mode:
97
-
```java
98
-
TrimVideo.activity(String.valueOf(videoUri))
99
-
.setAccurateCut(true)
100
-
.setHideSeekBar(true)
101
-
.start(this,startForResult);
102
-
```
103
-
1. Faster processing, No losses in quality(no compression), accurate trimming.
104
-
105
-
106
-
#### Video Compress Mode:
107
-
```java
108
-
.setCompressOption(newCompressOption(frameRate,bitRate,width,height)) //pass empty constructor for default compressoption
109
-
```
110
-
*`FrameRate` Recommeded frameRate is 30
111
-
*`BitRate` Bitrate Can be between 150k to 1000k or 1M to 10M.Lower bitrate can reduce the quality and size of the video.
112
-
Use 1M for decent quality output
113
-
*`Width` Width of the video output video.
114
-
*`Height` Height of the video output video.Use `TrimmerUtils.getVideoWidthHeight(this,Uri.parse(videoUri));` method to get the width and height of the video
115
-
1. Video compressing process will take more time and duration will be accurate
116
-
```java
117
-
TrimVideo.activity(String.valueOf(videoUri))
118
-
.setCompressOption(newCompressOption(30,"1M",460,320)) //pass empty constructor for default compress values
119
-
.setHideSeekBar(true)
120
-
.start(this,startForResult);
121
-
//You could divide the width and height by 2. when try to compress a large resolution videos ex:Taken from camera
0 commit comments