Giter Club home page Giter Club logo

video-trimmer's People

Contributors

deepandroid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

video-trimmer's Issues

when click on save, application crashed

when click on save, application crashed and shows
java.io.FileNotFoundException: /external/video/media/33131: open failed: ENOENT (No such file or directory)

if file is not here then how its appearing in timeline view please look in this matter

Bug: app can crash on some files

When choosing any of those files, it crashes:
MOV
WEBM
AVI
MPG
MKV
MP4
3GP
...

All of those it crashes.
Here's the log:
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=18, result=-1, data=Intent { dat=content://com.android.providers.downloads.documents/document/raw:/storage/emulated/0/Download/sample videos/SampleVideo_176x144_1mb.3gp flg=0x1 }} to activity {com.deep.videotrimmerexample/com.deep.videotrimmerexample.MainActivity}: java.lang.NumberFormatException: For input string: "raw:/storage/emulated/0/Download/sample videos/SampleVideo_176x144_1mb.3gp"
at android.app.ActivityThread.deliverResults(ActivityThread.java:4398)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4440)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.NumberFormatException: For input string: "raw:/storage/emulated/0/Download/sample videos/SampleVideo_176x144_1mb.3gp"
at java.lang.Long.parseLong(Long.java:594)
at java.lang.Long.valueOf(Long.java:808)
at com.deep.videotrimmer.utils.FileUtils.getPath(FileUtils.java:75)
at com.deep.videotrimmerexample.MainActivity.startTrimActivity(MainActivity.java:114)
at com.deep.videotrimmerexample.MainActivity.onActivityResult(MainActivity.java:150)
at android.app.Activity.dispatchActivityResult(Activity.java:7462)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4391)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4440) 
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6718) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
2019-01-31 14:48:13.260 1924-1924/? E/QtiImsExtUtils: getConfigForPhoneId phoneId is invalid
2019-01-31 14:48:13.261 1924-1924/? E/QtiImsExtUtils: isCarrierConfigEnabled bundle is null

image

Video starts before the trimming start range

I can confirm that the video when paused while changing the range duration, starts few seconds or from 00:00 when played again!

Other similar libraries like k4l-android-trimmer is also plauged by a similar issue.

I thought your library fixes this issue

Fatal Exception: java.lang.RuntimeException on MovieCreator.build()

Hi,

thank you for this cool lib. I've noticed a crash from my community, would you like to have a look at it?

Fatal Exception: java.lang.RuntimeException: A cast to int has gone wrong. Please contact the mp4parser discussion group (3673738558)
       at com.googlecode.mp4parser.util.CastUtils.l2i(CastUtils.java:30)
       at com.googlecode.mp4parser.AbstractBox.parse(AbstractBox.java:110)
       at com.coremedia.iso.AbstractBoxParser.parseBox(AbstractBoxParser.java:107)
       at com.googlecode.mp4parser.BasicContainer.next(BasicContainer.java:185)
       at com.googlecode.mp4parser.BasicContainer.hasNext(BasicContainer.java:161)
       at com.googlecode.mp4parser.util.LazyList.blowup(LazyList.java:30)
       at com.googlecode.mp4parser.util.LazyList.size(LazyList.java:77)
       at com.googlecode.mp4parser.BasicContainer.getBoxes(BasicContainer.java:80)
       at com.googlecode.mp4parser.authoring.samples.DefaultMp4SampleList.<init>(DefaultMp4SampleList.java:36)
       at com.coremedia.iso.boxes.mdat.SampleList.<init>(SampleList.java:33)
       at com.googlecode.mp4parser.authoring.Mp4TrackImpl.<init>(Mp4TrackImpl.java:64)
       at com.googlecode.mp4parser.authoring.container.mp4.MovieCreator.build(MovieCreator.java:57)
       at life.knowledge4.videotrimmer.utils.TrimVideoUtils.genVideoUsingMp4Parser(TrimVideoUtils.java:72)
       at life.knowledge4.videotrimmer.utils.TrimVideoUtils.startTrim(TrimVideoUtils.java:65)
       at life.knowledge4.videotrimmer.K4LVideoTrimmer$5.execute(K4LVideoTrimmer.java:354)
       at life.knowledge4.videotrimmer.utils.BackgroundExecutor$Task.run(BackgroundExecutor.java:212)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:459)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:764)

This thread might help sannies/mp4parser#126

Trimmed video is wrong

     videoTrimmer.setMaxDuration(3)
        videoTrimmer.maxFileSize = 440
        videoTrimmer.setVideoURI(Uri.parse(videoUrl))
        videoTrimmer.setOnTrimVideoListener(this)

when i trimmed the video and look into real device its showing 9 second rather than showing the actual trimmed video value. i tried it many times every time trimmed video is wrong. lets say if i select maximum duration to 3 second some time it trimmed it into 9 some time 19 second etc.

Video trimming not accurate

I'm trying to trim a 1 minute video into 30 seconds video but the resulting one plays for only 23 seconds and sometimes the output video is more than 30 seconds.

Kindly correct me if I'm doing anything wrong else please fix the issue.

This is my code -

    videoTrimmer.setMaxDuration(30);
    videoTrimmer.setVideoURI(Uri.parse(videoPath));
    File file = new File(Environment.getExternalStorageDirectory(),"Videos/Trimmed");
    videoTrimmer.setDestinationPath(file.getAbsolutePath());
    videoTrimmer.setOnTrimVideoListener(this);

Issue after trimming

Hello

I am getting issue while trimming video after trimming video video is not playing it show duration 00:00.

license?

Where's the license to use this library?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.