iknow4x / Android-Video-Trimmer

The Android-Video-Trimmer project implements the selection of clips for long and short videos. It uses MediaMetadataRetriever to obtain video frames, and uses ffmpeg for video cropping and video compression.
Apache License 2.0
1.11k stars 264 forks source link

下面的缩略图显示不出来 #15

Closed LCJustin closed 6 years ago

LCJustin commented 6 years ago

视频裁剪3分钟的视频,下面的缩略图出不来

iknow4x commented 6 years ago

@LCJustin 具体什么现象?是应用死掉了吗?查看一下logcat是不是有异常抛出了

LCJustin commented 6 years ago

我之前用的版本还是不错的,现在新的好像改动有点大?能否请教一下了,952923539,这是我的QQ

iknow4x commented 6 years ago

@LCJustin 之前的版本有些UI上bug一直比较难解决,新版换成RecycleView来显示视频帧。

LCJustin commented 6 years ago

我一个3分钟的视频进行裁剪,拖动下面的裁剪片段,滑到一半就没有缩略图了,黑的,打印信息: MediaMetadataRetrieverJNI: getFrameAtTime: create Bitmap failed! 06-05 18:00:23.778 19651-19697/com.iknow.android W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference 06-05 18:00:23.778 19651-19697/com.iknow.android W/System.err: at com.iknow.android.utils.TrimVideoUtil$2.execute(TrimVideoUtil.java:93) 06-05 18:00:23.778 19651-19697/com.iknow.android W/System.err: at iknow.android.utils.thread.BackgroundExecutor$Task.run(BackgroundExecutor.java:212) 06-05 18:00:23.778 19651-19697/com.iknow.android W/System.err: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428) 06-05 18:00:23.778 19651-19697/com.iknow.android W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237) 06-05 18:00:23.778 19651-19697/com.iknow.android W/System.err: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272) 06-05 18:00:23.778 19651-19697/com.iknow.android W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 06-05 18:00:23.778 19651-19697/com.iknow.android W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 06-05 18:00:23.778 19651-19697/com.iknow.android W/System.err: at java.lang.Thread.run(Thread.java:762)