FFmpegBox icon indicating copy to clipboard operation
FFmpegBox copied to clipboard

Video Save issue..

Open mPixster opened this issue 6 years ago • 6 comments

Video not save properly. we can not read video file when we save inside directory.how can we solve this

mPixster avatar Jul 01 '19 05:07 mPixster

Save related issues have nothing to do with this library, check the official documentation you can know more.

https://developer.android.com/training/data-storage/files

gavinliu avatar Jul 01 '19 06:07 gavinliu

Thank you for your response. yes I have done with this code.but when I save the file...not open in internal storage after some time when we refresh the file manager then we can show the file.how can we update this. I have do many process using this library.

mPixster avatar Jul 01 '19 07:07 mPixster

Could you show me your ffmpeg cmd ?

gavinliu avatar Jul 01 '19 07:07 gavinliu

List<String> cmdList = new ArrayList<>(); StringBuilder sb = new StringBuilder(); StringBuilder sb1 = new StringBuilder(); for (int i = 0; i < outFile.size(); i++) { cmdList.add("-i"); cmdList.add(outFile.get(i)); sb.append("[").append(i).append(":v:0]"); } sb.append("concat=n=").append(outFile.size()).append(":v=1:a=0 [v]"); cmdList.add("-i"); cmdList.add(path_audio); cmdList.add("-filter_complex"); cmdList.add(sb.toString()); cmdList.add("-map"); cmdList.add("[v]"); cmdList.add("-map"); sb1.append(outFile.size()).append(":a"); cmdList.add(sb1.toString()); cmdList.add("-shortest"); cmdList.add("-preset"); cmdList.add("ultrafast"); cmdList.add(path1); sb = new StringBuilder(); for (String str : cmdList) { sb.append(str).append(" "); } String[] cmd = cmdList.toArray(new String[cmdList.size()]);

This is my FFMPEG command. using this command we can merge many videos.

mPixster avatar Jul 01 '19 09:07 mPixster

This is my command for merging..

@SuppressLint("CheckResult") private void mergeMultipleVideoswithoutaudio(List<String> outFile, String path1) {//Merge multiple videos with original sound of video List<String> cmdList = new ArrayList<>(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < outFile.size(); i++) { cmdList.add("-i"); cmdList.add(outFile.get(i)); sb.append("[").append(i).append(":0] [").append(i).append(":1]"); } sb.append(" concat=n=").append(outFile.size()).append(":v=1:a=1 [v] [a]"); cmdList.add("-filter_complex"); cmdList.add(sb.toString()); cmdList.add("-map"); cmdList.add("[v]"); cmdList.add("-map"); cmdList.add("[a]"); cmdList.add("-preset"); cmdList.add("ultrafast"); cmdList.add(path1); sb = new StringBuilder(); for (String str : cmdList) { sb.append(str).append(" "); } String[] cmd = cmdList.toArray(new String[cmdList.size()]); FFmpegBox.Companion.get().exec(cmd).observeOn(AndroidSchedulers.mainThread()). subscribe(new Consumer<Status>() { @Override public void accept(Status status) {

             }


        });

}

On Mon, Jul 1, 2019 at 12:53 PM Liu Yunlong [email protected] wrote:

Could you show me your ffmpeg cmd ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Quickits/FFmpegBox/issues/5?email_source=notifications&email_token=AJH5HWHEGFSOIAZIQ4LMOZTP5GWIRA5CNFSM4H4OW6ZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY5HMSY#issuecomment-507147851, or mute the thread https://github.com/notifications/unsubscribe-auth/AJH5HWCOFW63YATJVWXCVOTP5GWIRANCNFSM4H4OW6ZA .

mPixster avatar Jul 02 '19 10:07 mPixster

it is also takes time for merging video.

On Tue, Jul 2, 2019 at 3:55 PM Mansi joshi [email protected] wrote:

This is my command for merging..

@SuppressLint("CheckResult") private void mergeMultipleVideoswithoutaudio(List<String> outFile, String path1) {//Merge multiple videos with original sound of video List<String> cmdList = new ArrayList<>(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < outFile.size(); i++) { cmdList.add("-i"); cmdList.add(outFile.get(i)); sb.append("[").append(i).append(":0] [").append(i).append(":1]"); } sb.append(" concat=n=").append(outFile.size()).append(":v=1:a=1 [v] [a]"); cmdList.add("-filter_complex"); cmdList.add(sb.toString()); cmdList.add("-map"); cmdList.add("[v]"); cmdList.add("-map"); cmdList.add("[a]"); cmdList.add("-preset"); cmdList.add("ultrafast"); cmdList.add(path1); sb = new StringBuilder(); for (String str : cmdList) { sb.append(str).append(" "); } String[] cmd = cmdList.toArray(new String[cmdList.size()]); FFmpegBox.Companion.get().exec(cmd).observeOn(AndroidSchedulers.mainThread()). subscribe(new Consumer<Status>() { @Override public void accept(Status status) {

             }


        });

}

On Mon, Jul 1, 2019 at 12:53 PM Liu Yunlong [email protected] wrote:

Could you show me your ffmpeg cmd ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Quickits/FFmpegBox/issues/5?email_source=notifications&email_token=AJH5HWHEGFSOIAZIQ4LMOZTP5GWIRA5CNFSM4H4OW6ZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY5HMSY#issuecomment-507147851, or mute the thread https://github.com/notifications/unsubscribe-auth/AJH5HWCOFW63YATJVWXCVOTP5GWIRANCNFSM4H4OW6ZA .

mPixster avatar Jul 02 '19 10:07 mPixster