PDA

View Full Version : How to multiplex the separated video and audio stream to MPEG2 PS stream?


huales
8th December 2006, 09:56
Greetings,

I would like to ask how to multiplex
separated video and audio stream to MPEG2 PS stream?
the separated audio stream is MPGA format, and the
video stream is mpeg2es format,
I have the PTS information (in Milliseconds) for each
audio and video frame,
how to multiplex the streams to MPEG2 PS stream?

Appreciate for your help.

Latexxx
10th December 2006, 10:13
TMPGEnc has a nice multiplexer (File->MPEG Tools).

neuron2
10th December 2006, 15:30
A freeware solution is Imago Muxer.

huales
12th December 2006, 01:47
Hi, I hope I can implement this feature in my program,
so, is there any open source code available for this feature?
Thanks a lot.

jongov
12th December 2006, 08:46
Hi,
You can read about MPEG-2 PS and TS multiplexing in ISO/IEC 13818-1. About the source you can check the VideoLan application - it is free and is open source.

Regards,
Tsivatko Jongov
http://tsviatko.jongov.com

huales
12th December 2006, 10:30
Thanks a lot,
Sure I've read the source code of VLC, but I can't get any idea for how to implement this function.
I want to mux the separated MPEG2 ES video and audio with the corresponding PTS information ( in microseconds) to MPEG2 PS video file.

jongov
12th December 2006, 16:48
Hi,
I've developed an application that can visualize the structure of an MPEG-2 PS file. It can help you understand the program stream structure. Here is the link:

http://tsviatko.jongov.com/index_prj_mpegpsutils.htm

Nevertheless, I don't think that you will be able to implement the multiplex mechanism without first reading the MPEG-2 standard.

Regards,
Tsviatko Jongov
http://tsviatko.jongov.com

huales
13th December 2006, 02:14
Yes, I also agree that one who want to implement this feature, he should firstly read the specification.
I've read part of the specification, and I also implemented part of the multiplex, but it seems that the result audio and video isn't continuous in the MPEG2 PS file, as shown by VLC prompt, the DTS and PTS isn't so good for the specification.

huales
13th December 2006, 02:15
If the MPEG2 PS utility also provides source code, it would be highly appreciated.

orbitlee
14th December 2006, 12:43
You may find rejig 0.5(open source) helpful
http://www.afterdawn.com/software/video_software/video_tools/rejig.cfm