DVD-Create
Blank
>> Home | News | Documentation | Download | Resources | Developers & Help

TyMplex / Mplex - Man Page

NAME


mplex - MPEG 1/2 program/system stream multiplexer
 

SYNOPSIS

mplex [-v|--verbose num] [-m|--mpeg 1|2] [-b|--video-buffer video_buffer_size_kB[, video_buffer_size_kB...]] [-L|--lpcm-params params[, params...]] [-r|--muxed-bitrate muxed_bitrate_kbps] [-l|--mux-limit num] [-O|--sync-offset num] [-f|--format format_code] [-V|--vbr] [-s|--sector-size sector_size_B] [-p|--packets-per-pack num] [-h|--system-headers] [-S|--max-segment-size output_filesize_limit_MB] [-M|--split-segment] [-?|--help] -o|--output output_filename_pattern input_file...

 

DESCRIPTION

Mplex is a general-purpose audio/video multiplexer for MPEG-1/MPEG-2. It accepts one or more MPEG-1/2 video stream, MPEG layer II/III audio streams and AC3 audio streams and multiplexes them into a combined program/system stream according to the constraints specified. Many different types of output structure are supported along with presets for standard VCD and SVCD streams. These latter can be burned to CD using tools such as vcdimager(1) and played in stand-alone players.

It is also capable of automatically splitting the output stream into chunks of a specified size either independently or at sequence end/start points in the input video stream.  

GENERAL FUNCTION LETTERS

-o|-output output_filename_pattern
This (compulsorary) option sets the pattern for the name(s) of output files.

An integer format code (e.g. %d) in the name is replaced by the number of the file generated (see printf(3)).

-v|--verbose num
Set verbosity level to num:
 0 - warnings and errors only,
 1 - information as well,
 2 - really verbose.
-?|--help
Display a synopsis of the command syntax.
 

FUNCTION LETTERS

-f|--format format_code
This command allows one of a number of convenient preset output formats or generic MPEG1 or MPEG2 output to be selected. For the generic formats other function letters can be used to control many aspects of the multiplexed stream. For VCD/SVCD/DVD compliant output the corresponding formats must be used as the standards require the multiplexer to enforce a variety of special constraints on the structure of the output stream.

 0 - Generic MPEG1.  A simple general-purpose MPEG1 format primarily suitable for software decoders. Buffer sizes and VBR must be specified. Bit-rate can be auto-detected.
 1 - VCD.  Standard VCD.  Overrides other option settings.
 2 - User VCD.  VCD format but buffer size, bit rate and VBR can be set manually.
 3 - Generic MPEG2.  Like 0 except MPEG2.
 4 - SVCD.  Standard SVCD.  Overrides other option settings.
 5 - User-rate SVCD.  SVCD format but buffer size bit rate and VBR can be set.
 6 - VCD Stills stream (mixed mode with hi-res and standard-res image streams          multiplexed are supported).

 7 - SVCD Stills stream.
 8 - DVD (with NAV sectors). Don't get too excited.  This is really a
 very minimal mux format.  It includes empty versions of the peculiar
 VOBU start sectors DVD VOB's include.  This is enough to persuade some
 hardware players to play the stream but is a long way from full DVD authoring.
 9 - DVD.  As above but without the empty VOBU sectors.
-r|--mux-bitrate num
The total (non VBR) / peak (VBR) bit-rate of the output stream in k Bits/sec. If unspecified and not set by a preset it is automatically calculated from the input stream.
-b|--video-buffer numlist
A comma-seperateed list of video decoder buffer sizes in KB for the video streams (given in the order the video streams appear on the command line). The default is 46KB the (tiny) size specified for VCD. The size to use for SVCD is the (more reasonable) 230KB. If you are encoding for a half-decent software decoder it makes sense to push this up to 500K or more.
-L|--lpcm-params
samples_per_sec:channels:bits_per_sample
[, samples_per_sec:channels:bits_per_sample
A comma-seperated list of paramter sets for the lpcm audio streams (given in the order the lpcm streams appear on the command line). Each parameter set comprises the sampling rate in Hz, the number of channels, and the number of bits per sample seperated by colons. For example, the default 48kHz two-channel 16-bit audio would be specified as 48000:2:16.
-l|--mux-limit num
Multiplex limit. Multiplex only the specified number of sectors. Useful for tuning and debugging.
-O|--sync-offset num
Set the presentation timestamp offset of video stream w.r.t. audio stream (video-audio) in mSec. This flag is used to produce a stream with synchronised audio/video when one stream started before/after the other. This is common when transcoding as the synchronisation information is typically lost during the (seperate) decoding/encoding of audio and video.
-V|--vbr
Set variable bit rate multiplexing. This is needed to multiplex variable bit-rate video streams correctly.
-s|--sector-size num
This option specifies the sector size of the output stream in bytes.
-p|--packets-per-pack num
This option specifies the number of packets per pack in the output stream.
-S|--max-segment-size num
This option specifies the maximum size of output files in MBytes (2^10) The default is 2000 Mbytes for the DVD profile and otherwise unlimited. When the limit is reached a new file is started.
Note: This option is not for splitting a long video across multiple VCD's or SVCD's.

It simply splits a single long sequence into in a way that prevents bits of a video GOP(group of pictures) or audio frame being split between chunks. This is fine for formats like that used for DVDs where all stream parameters appear every GOP. However, for VCD / SVCD it won't work as the players expect each file to start a new MPEG sequence.

For VCD / SVCD a different technique is used. If mplex encounters a sequence break (sequence end followed by start) in the input video stream it starts a new output stream and file at the sequence start. Thus to split a long video across VCD's/SVCD's you have to get the MPEG video encoder to introduce sequence splits at the right points (see mpeg2enc(1) for details of how to do this).

-M|--split-segment
When splitting a long stream in files based on -S mplex does a certain amount of careful "running out" to prevent a GOP or audio frame being split. If the files are simply going to be concatenated for playback this "run out" is superfluous and makes it harder for the player to maintain audio/video sync. This flag allows the run-out to be turned off. The DVD profile turns this option on automatically.
-h|--system-headers
A system header is generated in every pack rather than just in the first.
 

DIAGNOSTIC OUTPUT

When multiplexing using mplex you may get warning or error messages complaining about buffer underflow. This means that the bit-rate you have specified is simply too low to permit the video and audio to be played back without skipping. The fix is to either reduce the data-rate of the input material or increased the output stream bit-rate.  

BUGS

The multiplexer should handle AC3 and MPEG(5.1) audio too.  

AUTHOR

This man page was written by Andrew Stevens.
If you have questions, remarks, problems or you just want to contact the developers, the main mailing list for the MJPEG-tools is:
  mjpeg-users@lists.sourceforge.net

NOTE: TyStudio makes use of a slightly different version - John, is a mjpeg developer - bugs found in our version of Mplex aka TyMplex should be reported to the TyStudio team we will fwd bugs to the mjpeg team if nessesary.
NOTE: We only support -f 3 -f 8 and -f 4 in TyMplex!!!

For more info, see our website at
  http://mjpeg.sourceforge.net

 

 
:: M a n u a l s
TyEditor

TyTranscode

TyDemux

TyMplex

TyProcess

TyLs

TyGet

TyChopper

TyServer

TyIndex

$Id: download.shtml,v 1.1 2002/08/15 13:05:39 richwareham Exp $