android k4l-video-trimmer库的问题

时间:2017-08-01 09:22:25

标签: android android-layout android-fragments android-studio-3.0

是否有人使用https://github.com/titansgroup/k4l-video-trimmer库在Android上裁剪视频?

昨天一切正常。今天我打开项目,创建构建,没有任何更改,运行它并尝试裁剪视频并获得异常

 08-01 15:53:20.515 13722-14119/com.urazito.matreshka E/AndroidRuntime: FATAL EXCEPTION: pool-4-thread-1
Process: com.urazito.matreshka, PID: 13722
java.lang.RuntimeException: A cast to int has gone wrong. Please contact the mp4parser discussion group (4009305683)
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:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

怎么可能?没有变化。在所有..

在CastsUtil中我找到了这个方法

public static int l2i(long l) {
    if (l > Integer.MAX_VALUE || l < Integer.MIN_VALUE) {
        throw new RuntimeException("A cast to int has gone wrong. Please contact the mp4parser discussion group (" + l + ")");
    }
    return (int) l;
}

0 个答案:

没有答案