Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
kokesh
Old
#1  
kokesh's Avatar
Senior Member - OP
Thanks Meter 256
Posts: 562
Join Date: Jul 2010

 
DONATE TO ME
Cool Android - merge two MP4 files

Does anybody know about way to merge two MP4 video files directly in the phone? i've tried cat in Terminal emulator, it joined the files, but than the playbackl stops after the first file contained in the result, quite logically.
Anybody has some other way?

I know that mencoder can join two clips, but I can't find android binary for it.
 
rusboy
Old
#2  
Junior Member
Thanks Meter 1
Posts: 12
Join Date: Sep 2010
Location: Nizhny Novgorod
Hello,

Have you found how it can be done?

Regards,
Ruslan
 
dateno1
Old
#3  
Senior Member
Thanks Meter 42
Posts: 214
Join Date: Oct 2010
i thinkg you will remove head from 2nd-file before merge
 
ericlaw02
Old
#4  
Junior Member
Thanks Meter 16
Posts: 21
Join Date: Mar 2011
Wouldn't it require the removal of the MP4 headers though?
 
rusboy
Old
#5  
Junior Member
Thanks Meter 1
Posts: 12
Join Date: Sep 2010
Location: Nizhny Novgorod
I tryied it:
1. Create new file.mp4
2. Copy first.mp4 into file.mp4 (A read full bytes from file and write it)
3. Repeat point 2 fot second.mp4

Yes, it is stupid.. But this file will be played by Windows Media Player(I tested it).

So, How can I undestand what kind of bytes is header of second.mp4?
Does mp4 contains special separator?
 
kokesh
Old
#6  
kokesh's Avatar
Senior Member - OP
Thanks Meter 256
Posts: 562
Join Date: Jul 2010

 
DONATE TO ME
I am afraid, that it simply stops playing the final product at "the right time", marked by header in the beginning of the file (=first clip). I think that to merge them without reencoding, we would have to "clip" the second header & redo the first one, to match the total length.
 
rusboy
Old
#7  
Junior Member
Thanks Meter 1
Posts: 12
Join Date: Sep 2010
Location: Nizhny Novgorod
May be do you know some Android plugins(I mean .jar files e.g. ) witch can merge mp4 files or 3gp..?
 
kokesh
Old
#8  
kokesh's Avatar
Senior Member - OP
Thanks Meter 256
Posts: 562
Join Date: Jul 2010

 
DONATE TO ME
I know, that mencoder can join two MP4 files quite easily. But I can't find any version working on Android.
 
DroidMayu
Old
#9  
Junior Member
Thanks Meter 5
Posts: 28
Join Date: May 2011
Location: Colombo, Sri Lanka
If anyone found out a solution please share it here
 
kokesh
Old
#10  
kokesh's Avatar
Senior Member - OP
Thanks Meter 256
Posts: 562
Join Date: Jul 2010

 
DONATE TO ME
no, nobody did I believe. To merge two MP4s you need to modify at least the header, probably even more. What we need is ffmpeg, which can be run in the terminal.
Device: SGS2 i9100
Provider: Halebop [swe]
ROM: CM10.1 Nightly
KERNEL: CM10.1
Recovery: Clockwork Mod
My Work: http://www.hms.se

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Boot Animation Paradise for your Android Device

The default boot animations on any device, no matter whichmanufacturer, are generally pretty … more

Flash Custom ROM and Recovery to Samsung Galaxy S 4

After reading about Dan Rosenberg’s bootloader exploit for the Samsung Galaxy S 4,I … more

Windows-Based Multi-Tool for the Sony Xperia U

If you are a flashaholic and an owner of the Sony Xperia U, you may be interested in the … more