Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to trim issue #15

Closed
sumonshil opened this issue Oct 5, 2020 · 5 comments
Closed

Failed to trim issue #15

sumonshil opened this issue Oct 5, 2020 · 5 comments

Comments

@sumonshil
Copy link

Screenshot_20201005-213947
When click on done button for trim result ,it always show me failed to trim . please give me a solution

@a914-gowtham
Copy link
Owner

Could you please send error log

@a914-gowtham
Copy link
Owner

and share the code for opening the trimming screen

@sumonshil
Copy link
Author

// log error.....................
2020-10-06 14:08:56.530 2915-7681/com.magica_technology.icon E/mobile-ffmpeg: /storage/emulated/0/Download/trimmed_video_0.mp4: Permission denied 2020-10-06 14:08:56.561 2915-7681/com.magica_technology.icon E/mobile-ffmpeg: /storage/emulated/0/Download/trimmed_video_0.mp4: Permission denied 2020-10-06 14:08:56.568 1231-3841/? E/InputDispatcher: Window handle Window{43f7d54 u0 com.magica_technology.icon/com.gowtham.library.ui.ActVideoTrimmer} has no registered input channel 2020-10-06 14:08:56.585 1231-3841/? E/InputDispatcher: Window handle Window{43f7d54 u0 com.magica_technology.icon/com.gowtham.library.ui.ActVideoTrimmer} has no registered input channel

//code..........................................

`

@OverRide

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_post_video);
init();
storage= FirebaseStorage.getInstance();
storageReference = storage.getReference();

    vUri =getIntent().getStringExtra("Uri");
    TrimVideo.activity(vUri)
            .setTrimType(TrimType.MIN_MAX_DURATION)
            .setAccurateCut(true)
            .setCompressOption(new CompressOption())
            .setMinToMax(10, 180)  //seconds
            .start(PostVideoActivity.this);

}

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == TrimVideo.VIDEO_TRIMMER_REQ_CODE && data != null) {
        Uri uri = Uri.parse(TrimVideo.getTrimmedVideoPath(data));
    }
}

`

@a914-gowtham
Copy link
Owner

a914-gowtham commented Oct 6, 2020

Have you given android:requestLegacyExternalStorage="true" this AndroidManifest.class inside application tag.and you have to use file provider in your manifest REFER THIS

@sumonshil
Copy link
Author

Thank you
Problem solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants