Skip to content

Commit

Permalink
major bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowtham committed Sep 4, 2020
1 parent 38f9a95 commit 40038d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
+ Add the dependency to your app `build.gradle` file
```gradle
dependencies {
implementation 'com.github.a914-gowtham:Android-video-trimmer:1.0.9'
implementation 'com.github.a914-gowtham:Android-video-trimmer:1.2.0'
}
```
+ Add to project's root `build.gradle` file:
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

<LinearLayout style="@style/VView">

<com.gowtham.videotrimmer.SquareVideoView
<VideoView
android:id="@+id/video_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="300dp" />

<LinearLayout
style="@style/VView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,10 @@ private void validateVideo() {
LogMessage.v("outputPath::" + outputPath);
videoPlayer.setPlayWhenReady(false);
progressView.show();
String[] complexCommand = {"ffmpeg", "-ss", TrimmerUtils.formatCSeconds(lastMinValue)
String[] complexCommand = new String[]{"ffmpeg", "-ss", TrimmerUtils.formatCSeconds(lastMinValue)
, "-i", String.valueOf(uri), "-t",
TrimmerUtils.formatCSeconds(lastMaxValue-lastMinValue), "-async", "1", outputPath};
TrimmerUtils.formatCSeconds(lastMaxValue - lastMinValue),
"-async", "1", "-strict", "-2", "-c", "copy", outputPath};
FFmpegCmd.exec(complexCommand, 0, new OnEditorListener() {
@Override
public void onSuccess() {
Expand Down

0 comments on commit 40038d6

Please sign in to comment.