Log in

View Full Version : Merging Mp4 Files


zazon
17th September 2009, 23:50
I have the Lord of the Rings Extended Editions. They come on two discs. I'd like to take each film and make them into one file to put on my HTPC. So far I ripped the movies and using VobEdit merged them into one DVD, but Handbrake only coded the first half. I'm assuming there's some reason for this. I guess my question would be is there a way to do this? Can I code the individual discs and merge them somehow afterwards? Thanks for any help.

me7
18th September 2009, 00:46
I did the exact same thing a while ago.
I encoded both discs independently and muxed them to mkv afterwards (mkvmergeGUI has an option to append tracks).

zazon
18th September 2009, 01:05
Thanks for the reply. I usually output into Mp4 format. Is there a way to do it with Mp4s? Thanks again.

Inspector.Gadget
18th September 2009, 01:09
Try YAMB. You must encode the audio and video with identical parameters (bitrate excepted, to a point).

creamyhorror
18th September 2009, 04:54
Is there a method to do bitstream H.264 appending? Or is it technically very difficult? What degree of similarity between the videos would it require?

nakTT
18th September 2009, 07:28
Try YAMB. You must encode the audio and video with identical parameters (bitrate excepted, to a point).
How about encoding using the same CRF (say, 25)? The bitrate will not going to be the same for both files in this case.

roozhou
18th September 2009, 09:09
You don't have to use identical bitrate. The same profile, level, refs and bframes should work.

J_Darnley
18th September 2009, 10:12
You can concatenate H.264 streams regardless of their encoding options/features as long as they have different SPS. I think resolution is the only real-world exception.

But why make it slightly harder on yourself by appending after encoding? Append while encoding using avisynth. That is trivial.

part1 = MPEG2Source("part1.d2v")
part2 = MPEG2Source("part2.d2v")
part1 ++ part2

nakTT
18th September 2009, 10:43
You can concatenate H.264 streams regardless of their encoding options/features as long as they have different SPS. I think resolution is the only real-world exception.

But why make it slightly harder on yourself by appending after encoding? Append while encoding using avisynth. That is trivial.

part1 = MPEG2Source("part1.d2v")
part2 = MPEG2Source("part2.d2v")
part1 ++ part2

Can you give me sample code for mpg/avi files? I have already backup my oldies VCD movies to mpg (using old converter from .dat files) and with some of them I have proceeded with 2nd step to encode it to avi. Let say the mpg/avi files is in the C drive root. How will the code look like?

BTW, is there any way I can convert .dat to H.264 using MeGUI or any other software (please recommend). Thanks.

:thanks:


To zazon, forgive me for asking question in your thread. Its just I think that our question is about the same. Hope you don't mind. Thank you in advance to you.

:thanks:

J_Darnley
18th September 2009, 11:43
For mpeg files, use DGIndex to make the d2v file. For avi, use AVISource(). If you need instructions on using avisynth, read the documentation.

creamyhorror
18th September 2009, 17:48
You can concatenate H.264 streams regardless of their encoding options/features as long as they have different SPS. I think resolution is the only real-world exception.

But why make it slightly harder on yourself by appending after encoding? Append while encoding using avisynth. That is trivial.
I'd of course prefer to use Avisynth for everything, but occasionally I might just want to throw clips together without re-encoding (whether because of bad planning or by circumstance (sources from other people, etc.)). It's a just-in-case thing.

Should I concatenate using MKVmerge or by concatenating raw AVC?

J_Darnley
18th September 2009, 18:35
It doesn't matter. I would do it in mkvmerge because doing the raw AVC is an extra step for me.

turnipzoink
18th September 2009, 19:10
Hi
Don't mean to hijack, but I'm trying to merge 2 mp2's before demuxing the audio (I'm having trouble with besplit - in another thread). Any ideas? Sometimes there're three MP2 files to merge.

Thank
TZ

zazon
24th September 2009, 23:06
Thanks for the replies. I tried the mkvmerge and YAMB. Both worked, but they open two windows. One with the movie, which seems to play fine, and one with the second half of the movie, but no sound. I'm guessing this is the Did I do something wrong? Thanks for any help.

roozhou
25th September 2009, 13:05
It seems you made a mkv/mp4 with two video streams instead of joining them. Use the "Append" button on mmg.