Skip to content

Commit d15593e

Browse files
Merge remote-tracking branch 'origin/master'
2 parents 8722add + 3a8903b commit d15593e

File tree

1 file changed

+4
-90
lines changed

1 file changed

+4
-90
lines changed

README.md

Lines changed: 4 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
11
[![](https://jitpack.io/v/jZAIKO/android-video-trimmer.svg)](https://jitpack.io/#jZAIKO/android-video-trimmer)
22
[![](https://jitpack.io/v/a914-gowtham/android-video-trimmer.svg)](https://jitpack.io/#a914-gowtham/android-video-trimmer)
33

4-
### Media3 migration work is still in progress
5-
6-
### Deprecated:
7-
8-
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.
185

196

207
# Android-video-trimmer
218

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)
2310

2411
![](https://github.com/a914-gowtham/Android-video-trimmer/blob/master/demo.gif)
2512

@@ -29,11 +16,10 @@ Sorry for the inconvenience.
2916
1. Include the library as local library project.
3017

3118
+ Add the dependency to your app `build.gradle` file
32-
+ Take a look at light weight version of this library [Android-video-trimmer-litr](https://github.com/a914-gowtham/android-video-trimmer-litr)
3319
```gradle
3420
// replace x.y.z with latest available jitpack version
3521
dependencies {
36-
implementation 'com.github.a914-gowtham:android-video-trimmer:x.y.z'
22+
implementation 'com.github.a914-gowtham:android-video-trimmer:1.8.0'
3723
}
3824
```
3925
+ Add to project's root `build.gradle` file:
@@ -78,66 +64,10 @@ allprojects {
7864
```java
7965
TrimVideo.activity(String.valueOf(videoUri))
8066
.setHideSeekBar(true)
67+
.disableCompression() // enabled by default
8168
.start(this,startForResult);
8269
```
8370

84-
85-
86-
## 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(new CompressOption(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(new CompressOption(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
122-
/*int[] wAndh=TrimmerUtils.getVideoWidthHeight(this,Uri.parse(videoUri));
123-
int width=wAndh[0];
124-
int height=wAndh[1];
125-
if(wAndh[0]>800){
126-
width/=2;
127-
width/=2;
128-
.setCompressOption(new CompressOption(30,"1M",width,height))
129-
}else
130-
.setCompressOption(new CompressOption(30,"400k",width,height))
131-
*/
132-
```
133-
134-
## Customization
135-
136-
#### Hide Player Seekbar:
137-
```java
138-
.setHideSeekBar(true) //default value is false
139-
```
140-
14171
### Custom TrimTypes
14272

14373
#### TrimType Default:
@@ -185,22 +115,6 @@ TrimVideo.activity(videoUri)
185115
## License
186116

187117
This library is licensed under the MIT License.
188-
189-
## FFmpeg Notice
190-
191-
This library uses FFmpeg, which is licensed under the LGPL v3.0.
192-
193-
### Obtaining FFmpeg Source Code
194-
195-
You can obtain the source code for FFmpeg from https://github.com/arthenica/ffmpeg-kit
196-
197-
### Relinking Instructions
198-
199-
If you wish to replace or modify the FFmpeg library used in this project, follow these steps:
200-
201-
1. Obtain the modified version of FFmpeg.
202-
2. Replace the existing FFmpeg library maven url in the `library/build.gradle` directory.
203-
3. Rebuild the project.
204118

205119
## Support
206120
Show your support by giving a star to this repository.

0 commit comments

Comments
 (0)