Zuzur's corner technology, the web, programming and a bit of this and that …

16May/10Off

Burning MPEG2-TS to DVD – E02 – Multiplex audio and video streams into a DVD-compliant PS

So you've just finished extracting the video, audio and subtitles tracks from your TS, as described in the previous article of the serie.

In the working directory, you should have the following files:

total 8583424
-rw-r--r--  1 erwan  staff  1699268204  7 mai 09:43 stream.m2v
-rw-r--r--  1 erwan  staff   207926016  7 mai 09:43 stream.mp2
-r-xr-xr-x  1 erwan  staff  2487420480  6 mai 21:22 stream.ts
-rw-r--r--  1 erwan  staff       82010  7 mai 09:43 stream[889].srt
-rw-r--r--  1 erwan  staff        3232  7 mai 09:43 stream_log.txt

stream.m2v is the video track, stream.mp2 is the audio track, the subtitles have been extracted into stream[889].srt.

You're going to build a DVD-compliant PS file using mplex. mplex is part of the mjpegtools program suite, you can install them with your package manager, on my my Mac, I used macports to install it (port install mjpegtools).

[19:10:02]-erwan@ip-192-168-224-58:~/tmp/article > mplex -f8 -o stream.ps stream.m2v stream.mp2
INFO: [mplex] mplex version 1.9.0 (2.2.7 $Date: 2006/02/01 22:23:01 $)
INFO: [mplex] File stream.m2v looks like an MPEG Video stream.
INFO: [mplex] File stream.mp2 looks like an MPEG Audio stream.
INFO: [mplex] Video stream 0: profile 8 selected - ignoring non-standard options!
INFO: [mplex] Found 1 audio streams and 1 video streams
INFO: [mplex] Selecting dvdauthor DVD output profile
INFO: [mplex] Multiplexing video program stream!
INFO: [mplex] Scanning for header info: Video stream e0 (stream.m2v)
INFO: [mplex] VIDEO STREAM: e0
INFO: [mplex] Frame width     : 720
INFO: [mplex] Frame height    : 576
INFO: [mplex] Aspect ratio    : 4:3 display
INFO: [mplex] Picture rate    : 25.000 frames/sec
INFO: [mplex] Bit rate        : 5430400 bits/sec
INFO: [mplex] Vbv buffer size : 229376 bytes
INFO: [mplex] CSPF            : 0
INFO: [mplex] Scanning for header info: Audio stream c0 (stream.mp2)
INFO: [mplex] MPEG AUDIO STREAM: c0
INFO: [mplex] Audio version  : 1.0
INFO: [mplex] Layer          :        2
INFO: [mplex] CRC checksums  :      yes
INFO: [mplex] Bit rate       :    32768 bytes/sec (256 kbit/sec)
INFO: [mplex] Frequency      :     48000 Hz
INFO: [mplex] Mode           :        0 stereo
INFO: [mplex] Mode extension :        0
INFO: [mplex] Copyright bit  :        0 no copyright
INFO: [mplex] Original/Copy  :        0 copy
INFO: [mplex] Emphasis       :        0 none
INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate    : 5810448
INFO: [mplex] target data-rate specified               : 10080000
INFO: [mplex] Setting specified specified data rate: 10080000
INFO: [mplex] Run-in delay = 7200 Video delay = 7200 Audio delay = 10800
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf=      0 frame=000000 sector=00000000
INFO: [mplex] Audio c0: buf=      0 frame=000000 sector=00000000
INFO: [mplex] Scanned to end AU 162441
INFO: [mplex] STREAM e0 completed
INFO: [mplex] STREAM c0 completed
INFO: [mplex] Multiplex completion at SCR=584792210.
INFO: [mplex] Video e0: completed
INFO: [mplex] Audio c0: completed
INFO: [mplex] VIDEO_STATISTICS: e0
INFO: [mplex] Video Stream length:  1699268204 bytes
INFO: [mplex] Sequence headers:     4820
INFO: [mplex] Sequence ends   :        1
INFO: [mplex] No. Pictures    :   162442
INFO: [mplex] No. Groups      :     4820
INFO: [mplex] No. I Frames    :     4820 avg. size 32405 bytes
INFO: [mplex] No. P Frames    :    49328 avg. size 12305 bytes
INFO: [mplex] No. B Frames    :   108294 avg. size  8643 bytes
INFO: [mplex] Average bit-rate :  2092000 bits/sec
INFO: [mplex] Peak bit-rate    :  5431600  bits/sec
INFO: [mplex] BUFFERING min 15 Buf max 153570
INFO: [mplex] AUDIO_STATISTICS: c0
INFO: [mplex] Audio stream length 207926016 bytes.
INFO: [mplex] Syncwords      :   270737
INFO: [mplex] Frames         :   270737 padded
INFO: [mplex] Frames         :        0 unpadded
INFO: [mplex] BUFFERING min 15 Buf max 779
INFO: [mplex] MUX STATUS: no under-runs detected.

Ok, now stream.ps contains a DVD-compliant stream that you'll be able to use for authoring the DVD. Before going further make sure that you can play it with your media player (VLC comes handy), and that the audio and video tracks are in sync ...

Now, it's time to insert the subtitles track.

Back to the summary article
Episode 1 : Edit cutpoints and de-mux with ProjectX
Episode 3: adding the subtitles
Episode 4: authoring the DVD

Tagged as: , , , Comments Off
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.