3

I need to merge two videos (.mp4) into one for my project such that both videos will run together (one video over another). After a very long R&D, I came to know that it is possible through MP4PARSER, so I have attached the MP4PARSER library to my project and implemented many methods from the internet to merge two videos (videos that are in my sdcard) but none of them are working.

Can anybody help me with some link, tutorial, documentary or some code. Any help will be appreciated.

I tried these

  1. how to merge the mp4 videos using mp4parser which are taken from both front and back camera alternatively
  2. https://code.google.com/p/mp4parser/wiki/AppendTracks

and many other also ... output.mp4 file is generating but when I am playing it..."video cannot be played"

Community
  • 1
  • 1
nik
  • 33
  • 1
  • 6

1 Answers1

2

I ran into same problem a while back. It might be that video from the front camera and video from the back camera have different sizes, thus making it unable to play after merging them together.

As Instagram supposedly uses mp4parser for their videos, I have noticed that they won't let you mix front and back camera videos (the button will be gone).

One solution might be to use matrix to rotate video clips, but I haven't tested it myself.

Torsten Ojaperv
  • 1,014
  • 17
  • 24