yangjie10930 / EpMedia

Android上基于FFmpeg开发的视频处理框架,简单易用,体积小,帮助使用者快速实现视频处理功能。包含以下功能:剪辑,裁剪,旋转,镜像,合并,分离,变速,添加LOGO,添加滤镜,添加背景音乐,加速减速视频,倒放音视频。 The video processing framework based on FFmpeg developed on Android is simple, easy to use, and small in size, helping users quickly realize video processing functions. Contains the following functions: editing, cropping, rotating, mirroring, merging, separating, variable speed, adding LOGO, adding filters, adding background music, accelerating and decelerating video, rewinding audio and video.
MIT License
2.4k stars 536 forks source link

EpEditor.merge()方法一直是Failure #152

Open CatyVon opened 6 years ago

CatyVon commented 6 years ago

for (Integer key : dataList.keySet()) { String path = dataList.get(key).getFile().getRecordFile().getPath(); EpVideo epVideo = new EpVideo(path); long start = dataList.get(key).getStart(); long end = dataList.get(key).getEnd() - start; epVideo.clip(start, end); mList.add(epVideo); }

这块是将录制的mp3文件遍历出来 然后根据时长进行裁切 之后调用merge方法 EpEditor.merge( mList, new EpEditor.OutputOption(outPath), new OnEditorListener() {}

但是一直走的是失败 @Override public void onFailure() { Log.d(TAG, "合成出现问题"); }

请问大佬这个有具体log查看失败原因么

yangjie10930 commented 6 years ago

发log,ffmpeg

CatyVon commented 6 years ago

07-18 10:00:05.282 15933-16267/com.harmight.dubbing E/IJKMEDIA: SDL_Overlay(ffmpeg): overlay_free_l(0x79a86b35c0) SDL_Overlay(ffmpeg): overlay_free_l(0x79a86b3630) SDL_Overlay(ffmpeg): overlay_free_l(0x79a86b36a0) 07-18 10:00:47.785 15933-16453/com.harmight.dubbing E/FFmpeg_EpMedia: Stream specifier ':v' in filtergraph description [0:v]scale=480:360,setdar=480/360[outv0];[1:v]scale=480:360,setdar=480/360[outv1];[2:v]scale=480:360,setdar=480/360[outv2];[3:v]scale=480:360,setdar=480/360[outv3];[4:v]scale=480:360,setdar=480/360[outv4];[outv0][outv1][outv2][outv3][outv4]concat=n=5:v=1:a=0[outv];[0:a][1:a][2:a][3:a][4:a]concat=n=5:v=0:a=1[outa] matches no streams.

这是点击合成之后的log 麻烦大佬看一下

发送自 Windows 10 版邮件应用

发件人: Yang 发送时间: 2018年7月18日 8:14 收件人: yangjie10930/EpMedia 抄送: Monce; Author 主题: Re: [yangjie10930/EpMedia] EpEditor.merge()方法一直是Failure (#152)

发log,ffmpeg — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

yangjie10930 commented 6 years ago

用mergeByLc()试试

CatyVon commented 6 years ago

感谢大佬 换成mergeByLc()目前合成成功 不然都差点要被领导开了 真心感谢大佬 还有个小问题想问问 就是如何插入空白 因为每段的MP3是针对视频字幕录制的 字幕中间都是有间隔的 第一段是1秒开始的 第二段是5秒开始的 每段视频中间都会有间隔 目前这个间隔时间可以获取到 那么大佬能指点一下 如何插入时间呢 万分感谢

yangjie10930 commented 6 years ago

这个我也没有太好的办法,你可以试试弄个没声音的音频合进去

CatyVon commented 6 years ago

我也是这个思路 但是哪个空的音频没办法弄 毕竟要给一个路径地址的 并且那个时间长度也不好把控

发送自 Windows 10 版邮件应用

发件人: Yang 发送时间: 2018年7月30日 17:50 收件人: yangjie10930/EpMedia 抄送: Monce; Author 主题: Re: [yangjie10930/EpMedia] EpEditor.merge()方法一直是Failure (#152)

这个我也没有太好的办法,你可以试试弄个没声音的音频合进去 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

CatyVon commented 6 years ago

EpVideo.clip(flout a,flout b)这个函数是什么意思呢?是按照指定参数对音频文件进行裁剪还是?

发送自 Windows 10 版邮件应用

发件人: Yang 发送时间: 2018年7月30日 17:50 收件人: yangjie10930/EpMedia 抄送: Monce; Author 主题: Re: [yangjie10930/EpMedia] EpEditor.merge()方法一直是Failure (#152)

这个我也没有太好的办法,你可以试试弄个没声音的音频合进去 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

yangjie10930 commented 6 years ago

也可以理解为截取,比如裁剪第2秒到第5秒