Log in

View Full Version : All my attempts to join MP4 files are utter failure


Cyber Akuma
28th August 2014, 08:05
I have several MP4 files which use the exact same video and audio codecs and settings that I want to join together into one, without re-encoding them.

When I tried YAMB, no matter if I choose "Creation -> Click to create an MP4 file with multiple video, audio, subtitle, and chapter streams" or "Editing -> Click to join supported files" the results were the same. A single short video that had multiple video and audio streams.

Then I tried Mp4Box GUI, and while it did create one long video steam, the audio streams were still multiple separate steams instead of one long stream like the video.

Is there any easy way to do this without re-encoding?

Reino
29th August 2014, 22:50
...and while it did create one long video steam, the audio streams were still multiple separate steams instead of one long stream like the video.
If I try to concatenate 3 mp4-files, one of which has a samplerate of 44100Hz, while the other 2 48000Hz, I get exactly that; one long video-stream with 3 separate audio-streams. So are you absolutely sure the audio-stream properties (codec, channels and samplerate) are the same for all inputs? If so, the following would suffice:
mp4box.exe -cat input1.mp4 -cat input2.mp4 -cat input3.mp4 output.mp4
Download Mp4Box (http://gpac.wp.mines-telecom.fr/downloads/gpac-nightly-builds/).
You don't have to install the entire program. In my case, the win32 binary, extracting js.dll, libeay32.dll, libgpac.dll, ssleay32.dll and of course mp4box.exe from the win32 exe-file with 7-zip is enough to make it work.

tuco76
24th September 2014, 07:10
You could edit your stuff in MKVmerge (part of MKVToolnix), a bundle of easy tools giving you all possibilities like merge, split, append, join, whatev. segments-
MKV-containers are much more versatile and quite easie to handle/ edit, especially when increasing nr. of vid/audio/sub streams are involved, MKV is way to go.
MKVmerge, [part of MKVToolnix], accepts also MP4 input, you might wanna try edit your files in MKV-container. When you're done,
in case you still prefer, put it back to MP4 container and check it out :)

hello_hello
25th September 2014, 03:44
MKVmerge, [part of MKVToolnix], accepts also MP4 input, you might wanna try edit your files in MKV-container. When you're done,
in case you still prefer, put it back to MP4 container and check it out :)

That's what I tend to do. MP4 does my head in. I try to avoid it.

Video To Video Converter (http://www.videotovideo.org/) is quite good at remuxing files. I'm not sure about appending them, but I'm pretty sure you can open an MKV and remux it as an MP4 without needing to extract streams first. Just pick "direct stream copy" from the list of conversion presets and your desired output container.

I'm not sure how good MP4 muxers are when it comes to maintaining audio sync if there's gaps in the audio where it was appended.... that sort of thing. If the audio loses sync try extracting it from the MKV with HD Streams Extractor (http://forum.doom9.org/showthread.php?t=141829). It uses eac3to for the work and it'll "fix" the audio in the process. You could then mux the extracted audio and the appended video as a new MKV/MP4.