Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Newbies
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th July 2017, 21:25   #1  |  Link
Cyber Akuma
Registered User
 
Cyber Akuma's Avatar
 
Join Date: May 2002
Posts: 167
Need to join several MP4 files - mp4box or ffmpeg? Or neither?

I am running on a Windows machine.

I need to join several mp4 files that my camcorder split into 4GB files (though I don't know why since my SDcard is formatted in exFAT). No need for any transitions in-between or re-encoding or anything like that, they are one continious video and I just want to combine the files themselves into a single one, there should be no gaps from when my camcorder split them.

Would it be better to use mp4box or ffmpeg for this? Or is there another better solution?

I tried using mp4box but I can't figure out the proper syntax, everything I Google uses a different one. Namely, it's not clear if you should use -add for the first file and -cat for all the others, or just use -cat for all of the files.

E.G.:

MP4Box -add file1.mp4 -cat file2.mp4 -cat file3.mp4 -cat file4.mp4 -new output.mp4
vs
MP4Box -cat file1.mp4 -cat file2.mp4 -cat file3.mp4 -cat file4.mp4 -new output.mp4

Is there even a difference between what would happen if I used one or the other?
__________________
"A train station is where a train stops. A bus station is where a bus stops. On my desk I have a workstation..." - ComradOtter
Cyber Akuma is offline   Reply With Quote
Old 18th July 2017, 02:38   #2  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
Maybe you should try out MP4Joiner...
www.mp4joiner.org

Cheers
manolito
manolito is offline   Reply With Quote
Old 24th July 2017, 04:54   #3  |  Link
pc_speak
Old Batch Hacker
 
Join Date: Oct 2006
Location: At Home
Posts: 78
Code:
for %%a in (*.mp4) do echo file '%%a' >> list.txt
ffmpeg -safe 0 -f concat -i list.txt -vcodec copy -acodec copy video.mp4
del list.txt
Cheers
pc_speak is offline   Reply With Quote
Old 24th July 2017, 06:01   #4  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
Quote:
for %%a in (*.mp4) do echo file '%%a' >> list.txt
ffmpeg -safe 0 -f concat -i list.txt -vcodec copy -acodec copy video.mp4
del list.txt
In theory all programs and solutions work, in reality only the one below:

https://forum.doom9.org/showthread.php?t=174644

ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 14th August 2017, 07:56   #5  |  Link
SaundraChaffin
Registered User
 
SaundraChaffin's Avatar
 
Join Date: Aug 2017
Posts: 1
Quote:
Originally Posted by Ghitulescu View Post
In theory all programs and solutions work, in reality only the one below:

https://forum.doom9.org/showthread.php?t=174644

ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4
Oh, that's quite handy!
Thanks!
SaundraChaffin is offline   Reply With Quote
Reply


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

Forum Jump


All times are GMT +1. The time now is 00:14.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.