4

I have two MP4 audio files and one MP4 video file. I need to combine them to reproduce the video and the two sounds at same time (Parallel, Not concatenate), in order to get an only MP4 file.

For example, I have an MP4 audio file with voice, another with music, and another with video. I need that they play all together like a videoclip.

I have been trying to add several audio tracks to movie with MP4Parser with:

video.addTrack(audioTrack1);
video.addTrack(audioTrack2);

But when I play it, I only can hear one of them. Maybe MP4Parser is working correctly and I didn't understand this functionality, for this cause I need an answer about it.

Is it possible to do this with MP4Parser or I am wrong and it is impossible?

If it is possible, please could you give me a working example code?

Thank you in advance.

JuGon_
  • 41
  • 3
  • Did you get any help? – Ahmad Arslan Aug 30 '18 at 06:15
  • No, I didn`t :-( I finally had to use "ffmpeg" – JuGon_ Sep 14 '18 at 21:40
  • This should work. check the volumes of 2 tracks. In my case the previous track had low volume so I was not able to hear that. To confirm, check the final output length, it should be the length of the biggest audio. You can play around with some sample to get things right – Prajyot Tote Nov 26 '20 at 19:39

0 Answers0