ffmpeg-android-java
ffmpeg-android-java copied to clipboard
Merge Multiple Audios and Video
Does anybody know how to merge 3 or more audio with video writing a command. Also I am working on Android Studio so command must be like this. String command[ ] = {" ", " ", " "};
please check the below command to merge 2 audio with 1 video.
String[] cmd = new String[]{"-i", videoPath, "-i", firstAudio, "-i", secondAudio "-filter_complex", "[0:a]volume=20dB[a0];[1:a]volume=10dB[a1];[2:a]volume=10dB[a2];[a0][a1][a2]amix=inputs=3[a]", "-map", "0:v", "-map", "[a]", "-c:v", "copy", "-threads", "50", "-preset", "ultrafast", finalVideoPath};
This command merge 2 audio with 1 video(with sound). You can merge as many audio as you want. just add the input using "-i", file name and add this into the filter_complex tag.
This command is not working, do you have any other command?
No packets were sent for some of the attached pictures
This error came along with this one below
Error writing trailer of /storage/emulated/0/AudioReplacingTest/MultipleAudioWithVideo1595589437585.mp3: Invalid argument
@yadavkohi ?? Can you elaborate, how can we solve this error.
No packets were sent for some of the attached pictures
This error came along with this one below
Error writing trailer of /storage/emulated/0/AudioReplacingTest/MultipleAudioWithVideo1595589437585.mp3: Invalid argument
@yadavkohi ?? Can you elaborate, how can we solve this error.