PDA

View Full Version : how to merge two mpeg files containing two audio streams ?


Philoliv
24th April 2002, 10:09
Hi everybody..

I'd like to know which tools can do this . I tried to use TMPGEnc but the output file gives me a mpeg files with just one audio stream.. the other was removed.

thanks for your responses...

dvd2svcd
24th April 2002, 10:24
I think you'll get a better answer in the SVCD forum. The forum you posted in is for the program called DVD2SVCD. I moved it so you have a chance of getting a proper answer.

Pko
24th April 2002, 14:46
Originally posted by Philoliv
I'd like to know which tools can do this . I tried to use TMPGEnc but the output file gives me a mpeg files with just one audio stream.. the other was removed.
Of course, it is a bug, but I think it is solved in some recent version of TMPGEnc... did you try with latest version?

If even with latest version it does not work, you can try this (it is possible to have some audio desync, if that happens, it can be solved but it is WAY MORE complex)

Lets supose you have Vid1.mpg and Vid2.mpg, both SVCD-compliant with 2 audio streams

1) demux Vid1 and Vid2 -> you have now Vid1.m2v, Vid1.mp2, Vid1_1.mp2, Vid2.m2v, Vid2.mp2, Vid2_1.mp2

2) Multiplex (not as SVCD but as MPEG2 VBR)
Vid1.m2v & Vid1.mp2 to get Vid1_L1.mpg
Vid1.m2v & Vid1_1.mp2 to get Vid1_L2.mpg
Vid2.m2v & Vid2.mp2 to get Vid2_L1.mpg
Vid2.m2v & Vid2_1.mp2 to get Vid2_L2.mpg

3) Merge (again as MPEG2 VBR):
Vid1_L1.mpg + Vid2_L1.mpg to get Vid_L1.mpg
Vid1_L2.mpg + Vid2_L2.mpg to get Vid_L2.mpg

4) Demultiplex Vid_L1.mpg to get Vid_L1.m2v and Vid_L1.mp2
5) Demultiplex just audio of Vid_L2.mpg to ger Vid_L2.mp2
6) Multiplex, now as SVCD, the thre elementary streams:
Vid_L1.m2v, Vid_L1.mp2, Vid_L2.mp2 to get Vid.mpg

The reason to do the auxiliary multiplexing as MPEG2 VBR instead of SVCD is to avoid padding that causes some annoying glitches in audio.

The Vid.mpg file should have synched video and audios, but if any of the original streams had different delays in A/V, your file will be desynched... To correct that, you need to expand audios to WAV, pad or cut audio samples as needed and then recompress again (and remultiplex). Very complex, annoying and boring stuff :(

anarco
25th April 2002, 10:55
dvTool is quite usefull but Iīd like a working cutter more than a CPU watching tool ;)

sadly when cutting, in most cases, the second file is not okay
and you canīt cut by time or frames ... only by filesize :(