a914-gowtham / android-video-trimmer

Helps to trim local videos with compress option on Android applications using Exoplayer 2 and FFmpeg.
Other
380 stars 117 forks source link

The video is not cutting by 30seconds based onn FIXED_GAP_DURATION #5

Closed Dangujba closed 4 years ago

Dangujba commented 4 years ago

I try to use fixed gap duration by 30 sec so that it can trim by 30 no matter where you seelect is not working.

a914-gowtham commented 4 years ago

can you please send the intent data which you sent to the trimmerActivity

a914-gowtham commented 4 years ago

this is the correct snippet to use fixedgap Intent intent = new Intent(this, ActVideoTrimmer.class); intent.putExtra(TrimmerConstants.HIDE_PLAYER_SEEKBAR, true); intent.putExtra(TrimmerConstants.TRIM_VIDEO_URI, String.valueOf(your video uri)); intent.putExtra(TrimmerConstants.TRIM_TYPE, 1); intent.putExtra(TrimmerConstants.FIXED_GAP_DURATION, 15L); startActivityForResult(intent,TrimmerConstants.REQ_CODE_VIDEO_TRIMMER);

Dangujba commented 4 years ago

I tried the given code it doesn't working still. Description of the problem in details I am working on a App, and i want to add feature like WhatsApp video trimmer, which means no matter where you moved the range selection icon the range will stay between 30 seconds, and the FIXED_GAP_DURATION is working normal, the problem is that after getting the results of the video then found out that the trimmed video length is more than 30 seconds. Sometimes the output length is 2minutes+ i think it given the results based on length of the video because the video i used to test are having length of 5 minute and 30seconds+ so it seems like it calculating something like 30 * video minutes. What is the solution?

a914-gowtham commented 4 years ago

thanks for the explanation...it will be solved by tonight

Dangujba commented 4 years ago

Okay let me be informed when you fixed it. And Please i am asking for some features such as adding Caption and some editing features. Thanks

a914-gowtham commented 4 years ago

send me a mail to gowtham6672@gmail.com with your requirements .i try to make it if possible

Dangujba commented 4 years ago

Sir, have you fixed the bug?

a914-gowtham commented 4 years ago

yea use this implementation 'com.github.a914-gowtham:Android-video-trimmer:1.2.0'

Dangujba commented 4 years ago

Good Sir, Is now working perfectly. If it is possible it need improvement, because the trimming take much longer time sometime it can take up 80 seconds or 2 minute. Thanks

a914-gowtham commented 4 years ago

that's a temporary solution.here's the solution implementation 'com.github.a914-gowtham:Android-video-trimmer:1.2.1'