Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to concat or merge two or more video files in Android?

I want to merge two or more video files (they may be two mp4 or two 3gp, or any other format).

like image 848
Mahesh Avatar asked Nov 22 '12 13:11

Mahesh


People also ask

Can you merge videos on Android?

Filmora Go This is an amazing video editing app available for Android. The app has many features besides combining videos, from editing the sounds on videos to adding effects on videos. Filmora Go lets you merge several videos at a go, and you get to edit their transitions using smooth effects from the app.

How do you combine videos on Android Gallery?

To combine two videos, open one in the Gallery and then tap the edit button. Then tap "Add" to combine additional videos. You can also add transitions between the video clips before saving your project.


1 Answers

The most generic tool you can use is ffmpeg (as noted by @Jeremy above), but using it on the mobile handset will require some work; also it is LGPL licensed and some of its encoders (notably x264) are GPL.

A simpler solution, if both files you want to concatenate are using similar encoding, and are contained in file formats derived from MP4 (3GP is such), is to use a pure-java MP4 parser and concatenate the videos without touching the media stream itself. Have a look at mp4parser, an open-source parser that is pure-java, licensed under Apache license and even has an example for concatenating videos in its wiki.

like image 149
onon15 Avatar answered Oct 21 '22 11:10

onon15