MPEG-2 Transport Stream Multiplexer Enhanced Version...

349
Copyright © 1998 - 2010 Manzanita Systems, Inc. All rights reserved MPEG-2 Transport Stream Multiplexer Enhanced Version (MP2TSME) MP2TSME User's Manual Version 6.0

Transcript of MPEG-2 Transport Stream Multiplexer Enhanced Version...

Page 1: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Copyright © 1998 - 2010 Manzanita Systems, Inc. All rights reserved

MPEG-2 Transport Stream MultiplexerEnhanced Version (MP2TSME)

MP2TSMEUser's Manual

Version 6.0

Page 2: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary
Page 3: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MPEG-2 Transport Stream Multiplexer Enhanced Version (MP2TSME)

User's ManualVersion 6.0

Page 4: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

All rights reserved.

The contents of this manual and the associated software are the property of Manzanita Systems, Inc. No part of thisdocument may be photocopied, reproduced, or translated to another language without written consent of ManzanitaSystems, Inc. For additional copies of the manual or software, please contact Manzanita Systems, Inc. The Softwareand associated documentation contain copyrighted and/or proprietary information of Manzanita Systems, Inc. Manzanita Systems, Inc. shall at all times retain sole title to and ownership of the Software. The Software isprotected by U.S. copyright law and international treaty provisions. Purchaser agrees not to remove any copyright orother proprietary or product identification notices from this manual and the Software.

Products that are referred to in this document may be either trademarks and/or registered trademarks of therespective owners. The publisher and the author make no claim to these trademarks.

While every precaution has been taken in the preparation of this document, the publisher and the author assume noresponsibility for errors or omissions, or for damages resulting from the use of information contained in this documentor from the use of the Software that may accompany it. In no event shall the publisher and the author be liable for anyloss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by thisdocument.

MP2TSME User's Manual, V6.0

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Page 5: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

IContents

I

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Table of Contents

Part I Introduction 3

................................................................................................................................... 4What's New in MP2TSME Version 6.0

................................................................................................................................... 5Overview

................................................................................................................................... 6Major Features

................................................................................................................................... 9About this Manual

Part II Getting Started 12

................................................................................................................................... 12Installing MP2TSME

.......................................................................................................................................................... 13Windows

.......................................................................................................................................................... 13Linux

.......................................................................................................................................................... 15Solaris

.......................................................................................................................................................... 16Mac OS X

.......................................................................................................................................................... 16Installing a Software Key

................................................................................................................................... 17Starting MP2TSME

Part III MP2TSME User Interface 20

................................................................................................................................... 21Main Window

.......................................................................................................................................................... 22Menu Bar

.......................................................................................................................................................... 24Tool Bar

.......................................................................................................................................................... 25Multiplex Pane

.......................................................................................................................................................... 26Status Pane

................................................................................................................................... 26Parameters Dialog Box

................................................................................................................................... 27Preferences Dialog Box

Part IV Configuring a Transport Stream 30

................................................................................................................................... 30Configuring with the UI

.......................................................................................................................................................... 31Initializing a New Multiplex Configuration

.......................................................................................................................................................... 32Adding a Program

.......................................................................................................................................................... 32Inserting an Elementary Stream

......................................................................................................................................................... 34Drag-and-Drop Operation

.......................................................................................................................................................... 35Inserting a Prepacketized Data Stream

.......................................................................................................................................................... 36Inserting a Table Data Stream

.......................................................................................................................................................... 37Inserting a SMPTE 302M Stream

.......................................................................................................................................................... 38Inserting a Private Stream

.......................................................................................................................................................... 40Inserting SCTE 35 Data

.......................................................................................................................................................... 41Remultiplexing

.......................................................................................................................................................... 42Removing a Program or Stream

.......................................................................................................................................................... 43Using the Parameters Dialog Box

.......................................................................................................................................................... 43Setting Transport Parameters

.......................................................................................................................................................... 61Setting Program Parameters

.......................................................................................................................................................... 66Setting Video Parameters

......................................................................................................................................................... 84PES Private Data File Format

.......................................................................................................................................................... 85Setting Audio Parameters

.......................................................................................................................................................... 99Setting Data Parameters

.......................................................................................................................................................... 105Setting Table Data Parameters

Page 6: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0II

Copyright © 1998 - 2010 Manzanita Systems, Inc.

.......................................................................................................................................................... 112Setting SMPTE 302M Parameters

.......................................................................................................................................................... 124Setting Private Stream Parameters

......................................................................................................................................................... 135Private Stream Data File

.......................................................................................................................................................... 136Setting SCTE 35 Data Parameters

......................................................................................................................................................... 140SCTE 35 Data File

.......................................................................................................................................................... 146Specifying Descriptors

......................................................................................................................................................... 146Descriptor Generator

................................................................................................................................... 148Using Configuration Files

.......................................................................................................................................................... 148Saving a Configuration File in the UI

.......................................................................................................................................................... 148Opening a Configuration File in the UI

.......................................................................................................................................................... 149Creating a Configuration File Manually

.......................................................................................................................................................... 149Configuration File Format

......................................................................................................................................................... 150Configuration File Entries

......................................................................................................................................................... 152Configuration File Rules

......................................................................................................................................................... 154Transport Section

......................................................................................................................................................... 163Program Section

......................................................................................................................................................... 165Video Subsection

......................................................................................................................................................... 175Audio Subsection

......................................................................................................................................................... 181Data Subsection

......................................................................................................................................................... 185Table Data Subsection

......................................................................................................................................................... 189SMPTE 302M Subsection

......................................................................................................................................................... 196Private Stream Subsection

......................................................................................................................................................... 203SCTE 35 Data Subsection

Part V Multiplexing a Transport Stream 208

................................................................................................................................... 208Multiplexing from the UI

.......................................................................................................................................................... 208Starting the Multiplexer

.......................................................................................................................................................... 208Reviewing the Multiplexer Status

.......................................................................................................................................................... 209Canceling the Multiplexing Operation

................................................................................................................................... 209Multiplexing from the Command Line

.......................................................................................................................................................... 210Running the Multiplexer from the Command Line

.......................................................................................................................................................... 211Using Command Line File I/O Override

.......................................................................................................................................................... 212Examples

......................................................................................................................................................... 212Multiplexing a Single Program Transport Stream

......................................................................................................................................................... 213Multiplexing a Multiple Program Transport Stream with Variable Bitrate Video

......................................................................................................................................................... 215Remultiplexing a Program Stream

......................................................................................................................................................... 217Multiplexing for CableLabs VoD

......................................................................................................................................................... 218Multiplexing with SMPTE 302M Data

Part VI Status Messages 222

................................................................................................................................... 222Error Messages

................................................................................................................................... 230Warning Messages

Part VII Tools 238

................................................................................................................................... 238Demultiplexer

.......................................................................................................................................................... 239Demultiplexing from the UI

.......................................................................................................................................................... 240Demultiplexing Private Stream Data from the UI

.......................................................................................................................................................... 241Demultiplexing SMPTE 302M Audio from the UI

.......................................................................................................................................................... 243Demultiplexing from the Command Line

.......................................................................................................................................................... 244Demultiplexing Private Stream Data from the Command Line

.......................................................................................................................................................... 245Demultiplexing SMPTE 302M Audio from the Command Line

................................................................................................................................... 248Video Trim Utility

Page 7: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

IIIContents

III

Copyright © 1998 - 2010 Manzanita Systems, Inc.

.......................................................................................................................................................... 248Using the Video Trim Utility from the UI

.......................................................................................................................................................... 248Using the Video Trim Utility from the Command Line

................................................................................................................................... 249Maximum Duration Utility

.......................................................................................................................................................... 249Using the Maximum Duration Utility from the UI

.......................................................................................................................................................... 250Using the Maximum Duration Utility from the Command Line

................................................................................................................................... 251Extract Packets Tool

.......................................................................................................................................................... 251Using the Extract Packets Tool from the UI

.......................................................................................................................................................... 253Using the Extract Packets Tool from the Command Line

................................................................................................................................... 256Packetize Data Tool

.......................................................................................................................................................... 257Using the Packetize Data Tool from the UI

.......................................................................................................................................................... 258Using the Packetize Data Tool from the Command Line

................................................................................................................................... 261DVB Subtitles Tool

.......................................................................................................................................................... 261Making Private Stream Data Files From VOBSUB Input

.......................................................................................................................................................... 264Making Private Stream Data Files From Spruce STL Input

................................................................................................................................... 268Closed Caption Tools

.......................................................................................................................................................... 268Input Closed Caption Data Format

.......................................................................................................................................................... 269Using the Closed Caption Tools from the UI

.......................................................................................................................................................... 272Using the Closed Caption Tools from the Command Line

................................................................................................................................... 275Audio ES Tools

.......................................................................................................................................................... 276Using the Audio ES Tool from the UI

.......................................................................................................................................................... 276Using the Audio ES Tool from the Command Line

................................................................................................................................... 277Video ES Tools

.......................................................................................................................................................... 278Using the Video ES Tool from the UI

.......................................................................................................................................................... 279Using the Plot Rate Tool

.......................................................................................................................................................... 281Using the Video ES Tool from the Command Line

.......................................................................................................................................................... 282Video Information

................................................................................................................................... 285Table Generator

.......................................................................................................................................................... 285Opening the Table Generator

.......................................................................................................................................................... 286Using the Table Generator

.......................................................................................................................................................... 286Table Scripting

Part VIII The Terminator 296

................................................................................................................................... 296Using the Terminator

................................................................................................................................... 297Terminated Stream Example

Part IX Additional Support 302

................................................................................................................................... 302Frequently Asked Questions (FAQ)

................................................................................................................................... 320References

................................................................................................................................... 321Technical Support

Part X Revision History 324

Part XI License Agreement 330

................................................................................................................................... 330Demo Version License Agreement

................................................................................................................................... 331Registered User License Agreement

Index 333

Page 8: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary
Page 9: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Chapter I

Introduction

Page 10: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary
Page 11: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Introduction 3

Copyright © 1998 - 2010 Manzanita Systems, Inc.

1 Introduction

Welcome to Manzanita Systems' MPEG-2 Transport Stream Multiplexer Enhanced Version 6.0 (MP2TSME V6.0). MP2TSMEis a software application that performs off-line processing on stored video, audio, and data elementary streams to generatemultiple program transport stream files.

The MP2TSME graphical user interface enables you to easily configure and multiplex a transport stream. At the core ofMP2TSME is the robust and powerful Multiplexer. The Multiplexer verifies every transport stream with standard MPEG decoderbuffer models as it is created to insure that it will be compliant.

MP2TSME accepts the following types of input streams:

· H.264 / Advanced Video Coding (AVC) / MPEG-4 Part 10 (ISO/IEC 14496-10) Video Elementary Streams.

· MPEG-4 Part 2 (ISO/IEC 14496-2) Video Elementary Streams.

· MPEG-2 Video Elementary Streams - All profiles and levels are supported, including 4:2:2 profile and Multi-view profile. All bit rates are supported, both constant bit rate (CBR) and variable bit rate (VBR).

· MPEG-1 Video Elementary Streams - All bit rates are supported, both CBR and VBR.

· MPEG Audio Elementary Streams - All layers (I, II, and II), bit rates, and sample rates, including LSF, are supported.

· Advanced Audio Coding (AAC) Elementary Streams - All sample rates and bit rates are supported.

· MPEG-4 (HE-AAC and HE-AAC version 2) Audio Elementary Streams - All sample rates and bit rates are supported.

· Dolby AC-3 (Dolby Digital) Audio Elementary Streams - All sample rates and bit rates are supported.

· DTS Audio Elementary Streams - All sample rates and bit rates are supported.

· Enhanced AC-3 (Dolby Digital Plus) Audio Elementary Streams - All sample rates, bit rates, and substreams aresupported.

· SMPTE 302M Audio Elementary Streams - Linear digital audio elementary streams are multiplexed in packets accordingto the SMPTE 302M-2002 specification. This allows AES3 digital audio, Dolby-E, KVM and other metadata to beincluded in the transport streams.

· Prepacketized Data Streams - Any stream consisting of contiguous 188-byte transport packets with valid sync bytes maybe multiplexed.

· Synchronous program related data streams, e.g., DVB bitmapped subtitle data (ETSI EN 300 743) and ITU-R System Bteletext (ETSI EN 300 472) - Data is multiplexed as a Private Stream and identified as private_stream_1.

· Asynchronous program related data streams, e.g., Key Length Value (KLV) data - Data is multiplexed as a PrivateStream and identified as private_stream_2.

MP2TSME also has a Tool Kit of utilities for preprocessing input streams that includes the Demultiplexer, DVB Subtitles Tool,Closed Caption Tool suite, and Table Generator.

A command line executable is included with the MP2TSME installation. It enables execution of the Multiplexer in batch files orscripts for high-volume applications.

Page 12: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.04

Copyright © 1998 - 2010 Manzanita Systems, Inc.

1.1 What's New in MP2TSME Version 6.0

MP2TSME V6.0 is a complete replacement and update for all previous versions of MP2TSME. MP2TSME V6.0 is a majorrelease that has the following new features:

· Creation of variable bit rate (VBR) single program transport streams.

· PktCountMultiple Parameter forces the output transport stream file size to be a multiple of a specified number of packets.

· BurstNulls feature inserts a configurable burst of X null packets every Y transport packets.

· PktTSBits Parameter sets the number of bits in the timestamp that is inserted between transport packets when the PktTSParameter is enabled.

· Support for Blu-Ray descriptors and other transport-specific requirements, including audio buffering.

· Support for all AVC frame rates including non-standard frame rates.

· stream_id_extension Parameter specifies the value of the stream_id_extension field, when present, in video, audio, andSMPTE 302M PES packets.

· FrameRateTolerant Parameter instructs the Multiplexer to ignore "non-standard" frame rates that are encoded in H.264 /AVC streams and instead to use a standard frame rate.

· Minimum option for the Rate Parameter directs the Multiplexer to compute the actual minimum video rate, and to use thisminimum rate when multiplexing the video stream.

· MaxDecodeDelay Parameter limits the difference between the video PTS and the PCR to a specified maximum decodedelay.

· RateAdjustment Parameter specifies an adjustment to the bit rate that is encoded in the video elementary stream syntax.

· CreateDTVCC Parameter enables synthesis and insertion of DTVCC (CEA-708-C) from original A/53 608 or DVS157(SCTE 20) data in remultiplexed video streams.

· DTVCC (CEA-708-C) data can be synthesized and inserted along with A/53 608 data in video streams as they aremultiplexed using A/53 608 captions that are defined by an input closed caption data (SCC) file.

· CCField Parameter specifies if closed caption data should be encoded for the first field (channels CC1, CC2) or thesecond field (channels CC3, CC4).

· CCTimeOffset Parameter specifies an offset that can be used to align the closed caption data timecodes with the videotimecodes.

· Support for insertion of data in the pes_private_data field or PES reserved bytes when the PES_extension_flag_2 is set.

· Support for MPEG 2 Layer 1 and Layer 2 audio with low sampling frequencies (LSF).

· NoVideoBase Parameter indicates that a Private Stream is not time-aligned with video, and that the Private Streamtimestamps should instead be based on the timing information in the input Private Stream Data file.

· Input for Private Stream multiplexing can be payload data only, PES information and payload data in a single file, or PESinformation and payload data in two separate files.

· DataOnly Parameter indicates whether the Private Stream input is a file containing only payload data or a Private StreamData file.

· FrameSize Parameter specifies the length of Private Stream PES packets when the input file is only payload data.

· SyncVideoTC Parameter indicates if a SCTE 35 Data stream or a Private Stream should be synchronized to thetimecodes in the video elementary stream.

Page 13: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Introduction 5

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· AdjustStart Parameter enables the Multiplexer to adjust the beginning of a SCTE 35 Data stream or a Private Stream tomatch the timecode specified by the Start Parameter.

· Improved drag-and-drop configuration capabilities.

· Improved remultiplexer performance.

· Improved insertion and extraction of A/53 608 caption data into H.264 / AVC using the Closed Caption Tool.

· Timecodes in closed caption data (SCC) file can be specified in either Drop Frame Time Code (DFTC) or Non-DropFrame Time Code (NDFTC) format.

· Closed Caption Tool can synthesize and insert DTVCC (CEA-708-C) data into MPEG-2 and H.264 / AVC video usinginput A/53 608 captions defined by a closed caption data (SCC) file.

· Closed Caption Tool supports viewing, extraction, and insertion of caption data on both first (channels CC1, CC2) andsecond (channels CC3, CC4) fields.

· Closed Caption Tool can view up to 8 services of DTVCC (CEA-708-C) data.

· Closed Caption Tool can remove Extended Data Services (XDS) data on the second field of caption data.

· Closed Caption Tool can remove only the caption data from user data (MPEG2) or SEI payload data (AVC/H.264). Anyother user data or SEI data is left unchanged.

· Demultiplexer can extract KLV (Key Length Value) data.

· Command line Demultiplexer can extract multiple streams from MPEG-4 media files.

· Extracted private_stream_1 and private_stream_2 data can be saved as a payload data only file or a Private StreamData file (includes PES information and timing).

· Improved Windows performance, including file I/O and multiplexing speed.

· Support for Windows 7 and Windows Server 2008.

1.2 Overview

MP2TSME V6.0 is a software application that performs off-line processing on stored data streams to create MPEG-2 single ormultiple program transport stream files. The MP2TSME installation includes both a version that has a full graphical userinterface (UI) for configuring and executing the Multiplexer, and a command line version that is controlled by a text configurationfile.

MP2TSME supports many optional parameters to allow the user to customize the output stream. By default MP2TSME setsthese parameters to typical values, so they only need to be explicitly configured if there are specific operational requirements. At a minimum, the user is only required to specify the input data and elementary stream files and the output file name togenerate a transport stream.

Using the MP2TSME graphical UI, the desired multiplex can be easily configured. The Multiplexer can next be initiated with asingle mouse click. Once execution has begun, the status and progress of the multiplexing operation are displayed. Warningsor errors are issued if problems are encountered. When the transport stream has been created, final status and statistics aredisplayed.

When setting up a new configuration, the MP2TSME interface presents the option of using default values that are compliant withthe CableLabs SD or HD Video-On-Demand Content Specification, or of using typical values that include the PIDs that arerecommended by the Advanced Television Systems Committee (ATSC).

The integrated Table Generator can be used to fully define MPEG, ATSC, or DVB tables and descriptors for inclusion in thetransport stream. Table and descriptor definitions are provided in a set of templates. User-defined templates may also becreated to create custom private table data for multiplexing.

The MP2TSME UI allows the user to save the current transport multiplex configuration in a configuration file. The configuration

Page 14: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.06

Copyright © 1998 - 2010 Manzanita Systems, Inc.

file is a simple text file that specifies the operational parameters to be used when multiplexing the output transport stream. Apreviously saved configuration file can also be opened in the MP2TSME interface. Once the file is opened, the parametersettings defined in it are displayed graphically and the Multiplexer can be run to generate a transport stream based on theloaded configuration. If desired, the restored configuration can be modified in the MP2TSME interface before creating thetransport stream. By saving and then reopening a configuration file, multiple transport streams can be generated that conformto a single set of requirements.

The MP2TSME UI also includes the following useful tools and utilities to preprocess input streams or manipulate existingmultiplexes: Demultiplexer, Video Trim, Maximum Duration, Extract Packets, Packetized Data, Video ES, Audio ES, ClosedCaption Insertion/Extraction, and DVB Subtitle.

The MP2TSME installation also supports command line execution of the Multiplexer. In this mode, the Multiplexer is invoked ina command prompt or shell window with the name of a Multiplexer configuration file. An ideal application for command lineexecution is in a batch file or script for high-volume transport stream creation. The MBatch utility is also included to automatemultiplexing of multiple input files. All MP2TSME tools and utilities may also be run from the command line.

1.3 Major Features

The major features and functions of MP2TSME V6.0 are:

· Generates fully compliant MPEG-2 transport streams.

· Graphical user interface facilitates simple, intuitive creation and configuration of the output transport stream.

· Uses typical default values for all stream parameters so only input and output file names are required to be set.

· Default configuration may be set to use values that comply with the CableLabs Video-On-Demand Content Specification (MD-SP-VOD-CEP2.0-I02-070105, 2007) for Standard Definition (SD) encoding, CableLabs VOD Content Specificationfor High Definition (HD) encoding, or standard values that include PIDs as defined in the ATSC specification.

· Output transport stream may be segmented into multiple files with specific or automatically generated filenames.

· Output stream is verified with the decoder buffer model specified by the MPEG-2 standard.

· Output transport rate range of 50 kbps to 1 Gbps either specified by the user or computed automatically.

· Supports multiplexing of variable bit rate (VBR) single program transport streams.

· Supports transport stream format that is compatible with the HDV Recording Format specification (HD1 and HD2modes).

· Transport rate may be specified by the user, or may be computed automatically for optimal bandwidth.

· Length of the output transport stream may be configured to a specific duration, may be set automatically to the minimumlength necessary to transport the longest input elementary stream, forced to be a multiple of a specified number ofpackets, or may be commanded to end when the video or audio elementary stream with the shortest duration hasstopped.

· Supports insertion of a configurable burst of X null packets every Y transport packets

· Transport packet size may be from 188 to 512 bytes in length.

· Terminator technology may be used to create transport streams for seamless concatenation.

· Optional 27 MHz time stamp can be inserted before or after each transport packet.

· Table Generator creates MPEG, DVB, ATSC, and private tables and descriptors.

· Table data created by the Table Generator can be multiplexed in up to 64 PID streams per program.

· PSI (PAT and PMT) may be automatically created, or disabled.

Page 15: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Introduction 7

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· User specified descriptors may be associated with programs and elementary streams in PMTs.

· Supports Blu-Ray descriptors and other transport-specific unique requirements.

· PAT and PMT insertion rates are configurable.

· DVB SI (DIT and SIT) may be optionally inserted to create a "partial" transport stream for Storage Media Interoperability(SMI).

· All parameters in PAT, PMT and PES headers may be optionally specified.

· Supports up to 65535 programs in the output multiplex.

· PCR PID may be user-specified.

· PCR interval is configurable.

· PCR can be optionally inserted in each transport packet containing a PES header.

· Input elementary streams may be segmented into multiple sequential files with specific or automatically generatedfilenames.

· DVB bitmapped subtitle data (ETSI EN 300 743) and ITU-R System B teletext (ETSI EN 300 472) can be multiplexed asprivate_stream_1.

· Supports multiplexing of data as private_stream_2.

· Supports up to 16 Private Streams (private_stream_1 or private_stream_2) per program.

· Supports up to 4 Digital Program Insertion Cueing Message streams (ANSI/SCTE 35 2007 and CableLabs CEP 2.0) perprogram.

· Supports up to 16 MPEG-1, MPEG-2, and/or H.264/AVC video elementary streams per program, both constant bit rateand variable bit rate.

· H.264 / AVC / MPEG-4 part 10 video elementary streams are automatically detected and multiplexed as specified inMPEG ISO/IEC 13818-1 Amendment 3.

· Accepts all MPEG-2 video profiles and levels including 4:2:2 profile and Multi-view profile.

· Accepts all MPEG-1, MPEG-2, and H.264/AVC frame rates, including non-standard H.264 frame rates

· Hierarchical, or reference, B-frames and Picture Order Count (POC) are supported when multiplexing H.264/AVCstreams.

· Low delay mode and use of Picture Order Count can be disabled when multiplexing H.264/AVC streams.

· Supports multiplexing of video still picture streams.

· Synthesizes and inserts DTVCC (CEA-708-C) data from original A/53 608 or DVS157 (SCTE 20) data in remultiplexedvideo streams.

· Synthesizes DTVCC (CEA-708-C) data and inserts with A/53 608 data in video streams while they are multiplexed.

· Supports up to 64 MPEG (Layer I, II, or III), AAC (Advanced Audio Coding), Dolby AC-3, DTS, Enhanced AC-3 (DolbyDigital Plus), and/or MPEG-4 (HE-AAC and HE-AAC version 2) audio elementary streams per program.

· Accepts all audio bit rates and sample rates, including MPEG Layer I and II low sampling frequencies (LSF).

· Supports Enhanced AC-3 substreams.

· Byte-reversed AC-3 data is detected and automatically corrected.

· Supports multiplexing of up to 32 prepacketized data streams per program at a specified insertion rate. PIDs in theprepacketized stream may be changed to a specified value when multiplexed.

Page 16: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.08

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· Multiplexes up to to 16 digital audio elementary streams per program as specified by the SMPTE 302M standard.

· Bit rate specified in elementary stream syntax may be overridden.

· Discontinuity indicator may be set in the initial video and audio packets.

· PMT stream_type and PES stream_id used to identify elementary streams are configurable.

· Ratios of video and audio access units to PES headers are configurable.

· Alignment of video and audio access units to PES headers may be forced.

· Random access indicator can be optionally set in transport packets carrying the start of audio and video, includingH.264/AVC, access units.

· Initial delay of elementary streams can be adjusted to compensate for lip sync problems.

· Non-standard elementary stream decoder buffer sizes may be specified.

· ATSC and DVB specified T-STD audio buffer models for Dolby AC-3 and Enhanced AC-3 are supported. ATSC buffermodel for AC-3 audio elementary streams complies with ATSC A/53E Amendment 1 (April 2006).

· Multiple video or audio elementary streams can be remultiplexed from an existing MPEG-1 system, MPEG-2 program,VOB streams, or MPEG-2 transport stream in a single step. Descriptors in the input multiplexed streams areautomatically added to configuration for remultiplexing.

· Audio / video synchronization can be maintained when one or more input transport streams are being remultiplexed.

· Multiplexing configuration may be saved in a simple text file format.

· Integrated Demultiplexer extracts one or more selected video (including H.264/AVC), audio, private data, SMPTE 302M,and subtitle data streams from an existing MPEG system, program, VOB, transport stream, or MPEG-4 media file.

· Video Trim Utility trims input video elementary streams to the first sequence header.

· Maximum Duration Utility determines the maximum duration of input video and audio elementary streams.

· Extract Packet Utility extracts transport packets of a specified PID from an existing transport stream file, either by packetnumber or embedded video timecode.

· Packetized Data Tool inserts private table data into transport packets to create a prepacketized data stream file.

· Closed Caption Tool inserts / extracts DTVCC (CEA-708-C) and / or ATSC A/53 608 data into / from an existing videoelementary stream. Extracted data may be saved in either a simple text format or Scenarist V1.0 format.

· Video ES Tool copies video access units and displays picture information from an input video elementary stream file.

· Video Rate Tool plots rate versus time, and computes minimum and maximum bitrates for an input video elementarystream.

· Audio ES Tool copies audio access units and displays frame information from an input audio elementary stream file.

· DVB Subtitles Tool creates Multiplexer input files from Spruce STL output or VOBSUB .idx files.

· Supports command line execution of Multiplexer, Demultiplexer, tools and utilities.

· MBatch Utility automates multiplexing of multiple input files and files that are dynamically generated in a watch folder.

· Runs on Windows, Mac OS X, Linux, and Solaris.

Page 17: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Introduction 9

Copyright © 1998 - 2010 Manzanita Systems, Inc.

1.4 About this Manual

The MPEG-2 Transport Stream Multiplexer Enhanced Version User's Manual completely documents the use of MP2TSMEV6.0. The following chapters are presented:

· Getting Started covers installation of MP2TSME.

· MP2TSME User Interface describes all menus, controls, and displays available in the graphical UI version of MP2TSME.

· Configuring a Transport Stream details how to configure a transport stream using the MP2TSME interface, anddocuments the format of the MP2TSME configuration file. It also includes detailed descriptions of all multiplexingparameters and their default values.

· Multiplexing a Transport Stream explains how to execute the Multiplexer from within the MP2TSME interface. It alsodescribes how to multiplex a stream using the command line version of the Multiplexer.

· Status Messages describes the status information that is displayed by the Multiplexer when creating a transport stream,including error and warning messages.

· Tools covers the Demultiplexer, Video Trim, Maximum Duration, Extract Packets, Packetized Data, Video ES, Audio ES,Closed Caption Insertion/Extraction, Table Generator, DVB Subtitle, and MBatch tools that are included with MP2TSME.

· The Terminator explains how to create transport streams for seamless concatenation.

· Additional Support presents Frequently Asked Questions (FAQ) about MP2TSME, a list of pertinent references, and tipsfor getting additional help and support.

· Revision History lists the history of changes made to MP2TSME with each released version, starting with Version 2.7.

· License Agreement outlines the terms of the license agreement that covers the MP2TSME software and documentation.

This manual assumes that you have familiarity with the basic MPEG syntax and semantics.

Page 18: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary
Page 19: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Chapter II

Getting Started

Page 20: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.012

Copyright © 1998 - 2010 Manzanita Systems, Inc.

2 Getting Started

This chapter helps you install and start MP2TSME. It contains the following sections:

· Installing MP2TSME describes installation of the MP2TSME program and hardware security device (dongle) or softwarekey.

· Starting MP2TSME explains how to start the MP2TSME program on your computer.

2.1 Installing MP2TSME

The installation package for MP2TSME includes an installation CD-ROM and an optional hardware security device (dongle). The MP2TSME program must be installed from the CD-ROM onto your hard drive; you cannot run the program from theCD-ROM.

Your MP2TSME single user license allows you to run the MP2TSME program on only one computer. With the exception of theSolaris version, MP2TSME is available with two different types of licensing keys:

· Hardware - A hardware key is a parallel port or USB security device ("dongle") that is in most cases provided in theinstallation package, and is specific for your MP2TSME license.

· Software - A software key is obtained from Manzanita Systems after you install the MP2TSME software, and is specificfor your MP2TSME license and your computer.

The hardware licensing key generally provides you with the greatest flexibility. It enables you to install MP2TSME on multiplecomputers and/or operating systems. It is then only necessary to attach the dongle to the computer on which you want to runMP2TSME. Typically, a dongle will be included in your MP2TSME installation package. However, in the event that your systemcannot accommodate a dongle, a software licensing key will be provided. In this case, you may only install and run the softwareon a single system.

The Solaris version of MP2TSME is only available with a software key.

The single MP2TSME Installation CD-ROM contains the software to install MP2TSME on several different platforms. Thefollowing subsections describe how to install the MP2TSME software and dongle, if available, on the supported operatingsystems:

· Windows

· Linux

· Solaris

· Mac OS X

If you are unable to use a hardware dongle, the following subsection describes how to obtain and install a software key.

· Installing a Software Key

Page 21: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Getting Started 13

Copyright © 1998 - 2010 Manzanita Systems, Inc.

2.1.1 Windows

The MP2TSME software must be installed on your hard drive by running the MP2TSME Setup program that is provided on theMP2TSME Installation CD-ROM. The Setup program will install the MP2TSME program and copy related files to yourcomputer.

Windows 2000, Windows Server 2003, Windows XP, Windows Vista, Windows 7, or Windows Server 2008 is recommendedfor MP2TSME V6.0. MP2TSME may work on Windows 98, Windows Me, and Windows NT, but it is not officially supported onthese platforms.

To install MP2TSME on your Windows system:

1. If you currently have MP2TSME (V5.x.x or earlier), the MP2TSME Demo, or a time-limited evaluation version of MP2TSMEinstalled on your system, you must uninstall it before installing MP2TSME V6.0. It is also recommended that you destroy yourold installation CD and User’s Manual to avoid later confusion. To uninstall the old version, select Add/Remove Programsfrom the Control Panel. Then select Manzanita MP2TSME from the list of programs and click the Add/Remove button. If theMP2TSME folder is still present on your hard drive after the uninstallation, you should delete it and any files that it contains.

If you elect not to uninstall the old version of MP2TSME, you must remove the MP2TSME folder from the WindowsPATH variable. If this is not done, the old version will be executed instead of MP2TSME V6.0 when you run the commandline executable, mp2tsme.exe, in a command prompt window.

2. Shut down all running programs.

3. Insert the MP2TSME Installation CD into your CD-ROM drive.

The MP2TSME Setup program should start automatically. If the Setup program does not start automatically, open thecontents of the Installation CD from My Computer or the Explorer and double-click the MP2TSME Setup file in the /Windows folder. The Setup file will have a name similar to mp2tsme-6.0.0.exe.

The MP2TSME dongle should not be attached to your computer while the Setup program is being run.

4. Follow the onscreen instructions to install MP2TSME.

5. If you are going to use a USB or parallel port dongle, make sure that the item labeled "Install dongle drivers" is checked in thechecklist of components to install. The dongle should not be attached to your computer.

Administrator privileges are required to install the device drivers for the MP2TSME dongle under Windows.

6. If you are going to use the command line version of MP2TSME, make sure that the item labeled "Add to PATH variable" ischecked in the checklist of components to install.

The MP2TSME Setup program will indicate when the installation is complete. If you are using an MP2TSME dongle, youmay now attach it to an appropriate port on your computer.

2.1.2 Linux

The minimum system requirement for installing MP2TSME on a Linux system is:

· i386+ compatible processor

Both RPM and tar distributions are available for installation of MP2TSME on Linux. The installation files will be named, forexample, mp2tsme-6.0.0-1.i386.rpm and mp2tsme-6.0.0.tgz. If you are going to use a dongle, then the dongle daemon mustalso be installed.

The MP2TSME dongle should not be attached to your computer while the MP2TSME software and dongle daemon arebeing installed.

To install MP2TSME from the RPM package:

Page 22: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.014

Copyright © 1998 - 2010 Manzanita Systems, Inc.

1. If you currently have MP2TSME (V5.x.x or earlier), the MP2TSME Demo, or a time-limited evaluation version of MP2TSMEinstalled on your system, you must delete it before installing MP2TSME V6.0. It is also recommended that you destroy yourold installation CD and User’s Manual to avoid later confusion.

2. Use RPM per your normal procedure to install the MP2TSME package. The MP2TSME RPM file is in the /Linux directory onthe MP2TSME Installation CD-ROM.

For example:

surpm -i mp2tsme-6.0.0-1.i386.rpm

3. If you are going to use a dongle, install the rpm file that is appropriate for your Linux version, i.e., Redhat, Fedora, or SUSE. The dongle should not be attached to your computer.

For example:

rpm -i aksusbd-redhat-1.8.1-2.i386.rpmor

rpm -i aksusbd-suse-1.8.1-2.i386.rpm

To install MP2TSME from the tar file:

1. If you currently have MP2TSME (v4.x.x or earlier), the MP2TSME Demo, or a time-limited evaluation version of MP2TSMEinstalled on your system, you must delete it before installing MP2TSME V6.0. It is also recommended that you destroy yourold installation CD and User’s Manual to avoid later confusion.

2. Log in as root user and unpack the archive into /opt. The MP2TSME tar file is in the /Linux directory on the MP2TSMEInstallation CD-ROM.

For example:

sucd /opttar xzf /path/to/archive/mp2tsme-6.0.0.tgz

3. Create symbolic links from the MP2TSME executables to a directory which is in your PATH variable or include the location ofthe MP2TSME executables in the PATH variable. The MP2TSME GUI program is called gmp2tsme. The command lineversion of MP2TSME is called mp2tsme.

For example:

ln -s /opt/manzanita/mp2tsme/gmp2tsme /usr/bin/gmp2tsme

ln -s /opt/manzanita/mp2tsme/mp2tsme /usr/bin/mp2tsme

or

export PATH=$PATH:/opt/manzanita/mp2tsme

3. If the system is running GNOME or KDE, a desktop entry can be created by making links to files in the /desktop directory.

For example:

ln -s /opt/manzanita/mp2tsme/desktop/mp2tsme.desktop /usr/share/applications/mp2tsme.desktopln -s /opt/manzanita/mp2tsme/desktop/mp2tsme.png /usr/share/icons/hicolor/32x32/apps/mp2tsme.png

4. If you are going to use a dongle, then unpack the aksusbd.i386.tgz file and run the dinst script. The dongle should not beattached to your computer.

For example:

sutar xzf /path/to/archive/aksusbd.i386.tgzcd aksusbd./dinst

Page 23: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Getting Started 15

Copyright © 1998 - 2010 Manzanita Systems, Inc.

2.1.3 Solaris

The minimum system requirements for installing MP2TSME on a Solaris systems are:

· Sparc processor

· Solaris 8 or higher

MP2TSME is provided in a gziped tar file, e.g., mp2tsme-6.0.0-sparc.tar.gz, for installation on Solaris.

The Solaris version of MP2TSME is only available with a software key; the MP2TSME hardware dongle is not currentlysupported on Solaris.

To install MP2TSME from the tar file:

1. If you currently have MP2TSME (v5.x.x or earlier), the MP2TSME Demo, or a time-limited evaluation version of MP2TSMEinstalled on your system, you must delete it before installing MP2TSME V6.0. It is also recommended that you destroy yourold installation CD and User’s Manual to avoid later confusion.

2. Log in as root user and unpack the archive into /opt. The MP2TSME tar file is in the /Solaris directory on the MP2TSMEInstallation CD-ROM.

For example:

sucd /optgunzip /path/to/archive/mp2tsme-6.0.0-sparc.tar.gztar xf /path/to/archive/mp2tsme-6.0.0-sparc.tar

3. Create symbolic links from the MP2TSME executables to a directory which is in your PATH variable or include the location ofthe MP2TSME executables in the PATH variable. The MP2TSME GUI program is called gmp2tsme. The command lineversion of MP2TSME is called mp2tsme.

For example:

ln -s /opt/manzanita/mp2tsme/gmp2tsme /usr/bin/gmp2tsmeln -s /opt/manzanita/mp2tsme/mp2tsme /usr/bin/mp2tsme

or

export PATH=$PATH:/opt/manzanita/mp2tsme

4. If the system is running GNOME or KDE, a desktop entry can be created by making links to files in the /desktop directory.

For example:

ln -s /opt/manzanita/mp2tsme/desktop/mp2tsme.desktop/usr/share/applications/mp2tsme.desktopln -s /opt/manzanita/mp2tsme/desktop/mp2tsme.png/usr/share/icons/hicolor/32x32/apps/mp2tsme.png

5. If you are planning on using the DVB Subtitles Tool, you will need to add the location of the MP2TSME "iconv" library to theenvironment variable that affects the search path for shared libraries:

For example:

export LD_LIBRARY_PATH=/path/to/mp2tsme/lib:$LD_LIBRARY_PATH

where /path/to/mp2tsme is the path where MP2TSME was installed, which has a lib directory.

Page 24: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.016

Copyright © 1998 - 2010 Manzanita Systems, Inc.

2.1.4 Mac OS X

The minimum system requirements for installing MP2TSME on Mac OS X is:

· Mac OS X V10.3.9 (Panther) or newer

MP2TSME is provided as a disk image, e.g., mp2tsme-6.0.0.dmg, for installation on Mac OS X systems.

To install MP2TSME from the disk image:

1. Double-click on the mp2tsme-6.0.0.dmg file icon to mount it as a disk image volume. The MP2TSME disk image file is in the/Mac OSX directory on the MP2TSME Installation CD-ROM.

The MP2TSME dongle should not be attached to your computer while the MP2TSME software is being installed.

2. Open the MP2TSME volume and drag the MP2TSME application to your Applications folder.

3. If you are going to use a dongle, then double-click on the AKSUSB Install.pkg icon, and follow the onscreen instructions. Thedongle should not be attached to your computer.

4. If you intend to run the command line version of MP2TSME, create a symbolic link from the MP2TSME executable to adirectory which is in your PATH variable or include the location of the MP2TSME executables in the PATH variable. You willneed to be logged in as root.

For example:

suln -s /Applications/mp2tsme.app/Contents/MacOS/mp2tsme /usr/bin/mp2tsme

2.1.5 Installing a Software Key

If you have not installed a hardware dongle, you may execute MP2TSME on your computer only after you have acquired andinstalled a software key. The software key is specific for your MP2TSME license and your computer, and it must be obtainedfrom Manzanita Systems. As such, you can only install the MP2TSME program on a single computer if you are using a softwarekey.

The key installation is a three-step process. The process is the same on all supported operating systems. First, you must runthe MP2TSME program to obtain the first half of your key, Key A. Next, you must register your Key A with Manzanita to obtainthe other half of your key, Key B. Finally, you must complete the key installation by installing your Key B.

To obtain your Key A:

1. Start the MP2TSME program.

A dialog box will appear that gives you information about registering your copy of MP2TSME. Your Key A will also beshown in the dialog box.

To register your Key A, and obtain your Key B:

1. Follow the instructions given in the dialog box to contact Manzanita Systems.

2. Submit your Key A along with the requested registration information to Manzanita technical support.

3. Manzanita technical support will give you a Key B that is specific for your PC.

4. Record your Key B exactly as it is given to you. It is a good idea to save both your Key A and Key B.

Page 25: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Getting Started 17

Copyright © 1998 - 2010 Manzanita Systems, Inc.

To install your Key B:

1. If you exited the MP2TSME program, restart it.

The same dialog box will appear that you saw when you first started the MP2TSME program.

2. Enter your Key B in the labeled textbox. The value will be 16 characters separated with a dash (-) into four groups of fourcharacters each, for example, 69AD-10FE-2B3D-C997. If your Key B value is in email or a text file, you can copy and paste itinto the textbox.

3. Enter the name associated with your MP2TSME license, e.g., your company or organization name, in the textbox labeled Company Name.

4. Click the OK button.

If your software key installation was successful, the MP2TSME main window will appear.

If there were problems with your key installation, follow the displayed instructions.

If you change or upgrade your operating system or modify your hardware after installing your software key, you may need torequest a new software key from Manzanita Systems.

2.2 Starting MP2TSME

The procedure for starting the GUI version of the MP2TSME program is the same whether you are running the demo version orthe full version. For a description of the command line version of MP2TSME, see the section, Multiplexing from the CommandLine.

To start MP2TSME on Windows:

1. If you are using an MP2TSME dongle (USB or parallel port), make sure that the dongle is attached to an appropriate port onyour computer.

2. Choose Start > Programs > Manzanita Systems > MP2TSME 5 from the Windows Start menu, or double-click theMP2TSME 6 icon on the Desktop.

If a hardware dongle or valid software key is not installed on your computer, then a dialog box will appear that gives youinformation about registering your copy of MP2TSME and obtaining a software key. If a hardware dongle or software key isproperly installed on your computer, then the MP2TSME main window will open. You may now begin creating transportstream multiplexes.

To start MP2TSME on Linux or Solaris:

1. If you are using an MP2TSME dongle (USB or parallel port), make sure that the dongle is attached to an appropriate port onyour computer.

2. If you have created a desktop entry for MP2TSME, choose the MP2TSME item from the Sound & Video (Multimedia)submenu of your Start (Launch) menu.

If a hardware dongle or valid software key is not installed on your computer, then a dialog box will appear that gives youinformation about registering your copy of MP2TSME and obtaining a software key. If a hardware dongle or software key isproperly installed on your computer, then the MP2TSME main window will open. You may now begin creating transportstream multiplexes.

or

2. At a shell prompt, enter the line:

gmp2tsme

Page 26: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.018

Copyright © 1998 - 2010 Manzanita Systems, Inc.

If you get a message that the name you entered is not recognized as a command, then the MP2TSME executable is notin a location that is in the PATH environment variable. You should either create a symbolic link from the MP2TSMEprogram to a directory which is in your PATH variable or include the location of the MP2TSME program in the PATHvariable.

If a hardware dongle or valid software key is not installed on your computer, then a dialog box will appear that gives youinformation about registering your copy of MP2TSME and obtaining a software key. If a hardware dongle or software key isproperly installed on your computer, then the MP2TSME main window will open. You may now begin creating transportstream multiplexes.

To start MP2TSME on Mac OS X:

1. If you are using an MP2TSME dongle (USB or parallel port), make sure that the dongle is attached to an appropriate port onyour computer.

2. Double click on the MP2TSME application in your Applications folder.

If a hardware dongle or valid software key is not installed on your computer, then a dialog box will appear that gives youinformation about registering your copy of MP2TSME and obtaining a software key. If a hardware dongle or software key isproperly installed on your computer, then the MP2TSME main window will open. You may now begin creating transportstream multiplexes.

Page 27: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Chapter III

MP2TSME User Interface

Page 28: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.020

Copyright © 1998 - 2010 Manzanita Systems, Inc.

3 MP2TSME User Interface

The MP2TSME graphical user interface (UI) is simple and intuitive. It enables you to quickly configure and multiplex a single ormultiple program transport stream multiplex. It also provides access to several tools and utilities that may be used topreprocess input data streams.

This chapter introduces the main components of the MP2TSME interface. It contains the following sections:

· Main Window The Main Window is the primary interface that opens when you start the MP2TSME UI program. Itprovides the menus and controls for configuring and multiplexing transport streams, and for using the MP2TSME toolsand utilities.

· Parameters Dialog Box For each input elementary stream, each program, and the multiplex in general, a uniqueParameters Dialog Box can be opened. Individual configuration parameters for the elementary stream, the program, orthe multiplex can be set in the associated Parameters Dialog Box.

· Preferences Dialog Box The Preferences Dialog Box allows you to customize the MP2TSME interface. It sets the

Page 29: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User Interface 21

Copyright © 1998 - 2010 Manzanita Systems, Inc.

default configuration type, the format in which PID, stream_id, and stream_type values are displayed, and the templatesused by the Table Generator.

3.1 Main Window

The Main Window is the primary interface that opens when you start the MP2TSME graphical UI program. It provides themenus and controls to allow you to quickly create your transport stream.

The Main Window has the following components:

· Menu Bar The Menu Bar contains menus to create a transport stream, run the MP2TSME tools and utilities, set theMP2TSME interface preferences, and access the online help system.

· Tool Bar The Tool Bar enables quick access to the most commonly used MP2TSME functions.

· Multiplex Pane The Multiplex Pane shows a graphical representation of the transport stream that will be created. It alsodisplays the input and output filenames, program numbers, and the PID associated with each elementary stream.

· Status Pane The Status Pane displays error and warning messages issued during the multiplexing process, and finalstatistics when the process has completed.

Page 30: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.022

Copyright © 1998 - 2010 Manzanita Systems, Inc.

3.1.1 Menu Bar

The Menu Bar at the top of the interface gives you access to MP2TSME's main functions. The tables below summarize thecommands on the Menu Bar and their shortcut keys.

File >

New Initializes a new transport stream multiplex configuration Ctrl+N

Open... Opens the Open File Dialog Box that is used to select an existingconfiguration file to load into the MP2TSME UI

Ctrl+O

Save Saves the current configuration to the open configuration file or opens theSave As Dialog Box if no configuration file is open

Ctrl+S

Save As... Opens the Save As Dialog Box that is used to specify the name and locationof a configuration file to save the current configuration

1, 2, ... Recent configuration files that can be selected for loading into theMP2TSME UI

Quit Closes the MP2TSME program Ctrl+Q

Edit >

Add Program Adds a new program to the current configuration Ctrl+P

Insert File... Opens the Insert Stream Dialog Box that is used to select a new video,audio, or data stream file for insertion in the current configuration

Ins

Insert Video Inserts a new video elementary stream in the current configuration, withoutspecifying an input file

Ctrl+V

Insert Audio Inserts a new audio elementary stream in the current configuration, withoutspecifying an input file

Ctrl+A

Insert Data Inserts a new prepacketized data stream in the current configuration,without specifying an input file

Ctrl+D

Insert Table Data Inserts a new table data stream in the current configuration Ctrl+T

Insert SMPTE Inserts a new SMPTE 302M digital audio elementary stream containing upto four two-channel streams in the current configuration, without specifyingan input file

Ctrl+E

Insert Private Stream Inserts a new Private Stream in the current configuration, without specifyingan input file

Ctrl+1

Insert SCTE 35 Data Inserts a new SCTE 35 data stream in the current configuration, withoutspecifying an input file

Ctrl+3

Remove Entry Removes the program or stream entry that is currently selected in theMultiplex Pane from the current configuration

Del

Parameters... Opens the Parameters Dialog Box for the entry that is currently selected inthe Multiplex Pane

Enter

Preferences... Opens the Preferences Dialog Box, which sets the format in which PID,stream_id, and stream_type values are displayed, the default configurationtype, and the Table Generator template script

Page 31: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User Interface 23

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Tools >

Run Mux Begins creation of a transport stream multiplex using the currentconfiguration

Ctrl+M

Demux Opens the Demultiplexer Tool that enables extraction and saving of a videoor audio elementary stream from an input system, program or transportstream file

Video Trim Opens the Video Trim Utility that can be used to edit an input videoelementary stream file so that the first byte in the file is the first byte of asequence_header_code

Show Duration Opens the Maximum Duration Utility that can be used to determine themaximum duration of an input elementary stream

Extract Packets Accesses the Extract Packet functions that can extract and copy specifiedpackets from an input transport stream to a new file

Packetize Data Opens the Packetize Data Tool that creates a private table from input binarydata, and contains the resulting table in transport packets

DVB Subtitles Accesses the DVB Subtitles Tool that create a Private Stream Data file forinput to the Multiplexer using Spruce STL or VOBSUB format data

Closed Caption Accesses Closed Caption Tools to view, extract, insert, or remove closedcaption data in video elementary streams

Audio ES Accesses the Audio ES Tools for viewing information about an input audiostream and copying selected frames from it

Video ES Accesses the Video ES Tools for viewing information about an input videostream, copying selected frames from it, and plotting its rate versus time

Table Generator Accesses the Table Generator functions for creating MPEG, ATSC, DVB, orprivate table data, or viewing and editing existing table data

Help >

Manual Opens the online help manual

About Displays information about your copy of the MP2TSME program

Page 32: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.024

Copyright © 1998 - 2010 Manzanita Systems, Inc.

3.1.2 Tool Bar

The Tool Bar has a set of buttons that provide access to the most commonly used MP2TSME functions. All commands on theTool Bar may also be executed from the menus on the Menu Bar.

The Tool Bar has the following command buttons:

Icon Name Description Menu Equivalent

New Config Initializes a new transport streammultiplex configuration

File > New

Open Config Opens the Open File Dialog Box that isused to select an existing configurationfile to load into the MP2TSME interface

File > Open...

Save Config Saves the current configuration to theopen configuration file or opens theSave As Dialog Box if no configurationfile is open

File > Save

Add Program Adds a new program to the currentconfiguration

Edit > Add Program

Insert File Opens the Insert Stream Dialog Boxthat selects a new elementary streamfile to insert in the current configuration

Edit > Insert File...

Remove Entry Removes the currently selectedprogram or stream entry from theconfiguration

Edit > Remove Entry

Run Mux Commands the Multiplexer to create amultiplex using the current configuration

Tools > Run Mux

Page 33: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User Interface 25

Copyright © 1998 - 2010 Manzanita Systems, Inc.

3.1.3 Multiplex Pane

The Multiplex Pane occupies the main area of the MP2TSME window below the Tool Bar. It displays a graphical representationof the current transport multiplex configuration.

The Multiplex View will be blank when you first open the MP2TSME program. When you create a new transport multiplexconfiguration or open an existing configuration file, a tree structure will appear in the Multiplex View. The first entry in the tree,the Transport entry, represents configuration that effects the entire multiplex. By default, a Program1 entry always appearsbelow the Transport entry. It symbolizes configuration for the first program that is to be carried in the transport stream.

As the current configuration is built, any insertions or deletions of programs and elementary streams are immediately reflected inthe tree structure. As each new program is added, another Program entry will appear off a branch from the Transport entry. Each Program entry is identified by a sequentially numbered label, e.g., the first entry to be added following the defaultProgram1 entry will be labeled Program2. The PMT PID (in the PID column) and the program_number (in the Prog # column)that will be assigned to the program in the Program Association Table (PAT) are also displayed in the entry.

In addition to Program entries, Data or Table Data entries may also be added directly off the Transport entry. Data entriesrepresent prepacketized data streams that are not part of a program. Multiple Data entries are identified with a sequentiallynumbered label, e.g., Data1, Data2, etc. Table Data entries represent streams that carry MPEG, ATSC, DVB, or private tables,and are labeled as TableData1, TableData2, etc.

Each stream that is inserted in a given program will be represented by an entry below the Program entry. The entry identifieswhether the file is a video elementary stream, audio elementary stream, SMPTE 302M stream, prepacketized data stream,Private Stream, SCTE 35 Data, or Table Data stream. Streams of a given type (video, audio, etc.) are numbered sequentially. For example, the first video stream added to a program is labeled Video1 and the second video stream is labeled Video2. Eachentry may also list a PID and a File value for the stream. The PID value is the PID that will be associated with the stream in thePMT and that will be used in the transport packets that carry the stream, and File is the name of the input file.

When you double-click on an entry in the Multiplex Pane, a Parameters Dialog Box is opened. The Parameters Dialog Box listsindividual configuration parameters that are specific for the entry.

The following types of entries may appear in the Multiplex Pane:

Entry Description

Transport Configuration that effects the entire transport stream and thatdefines the Program Association Table (PAT)

ProgramN Configuration that defines characteristics of the Program MapTable (PMT) and Program Clock Reference (PCR) for aprogram

VideoN Configuration that defines characteristics of a video elementarystream in a program

AudioN Configuration that defines characteristics of an audio elementarystream in a program

SMPTE302MN Configuration that defines characteristics of a SMPTE 302Mdigital audio elementary stream that may contain up to fourtwo-channel streams

DataNConfiguration that defines characteristics of a prepacketizeddata stream

TableDataN Configuration that defines characteristics of a table data stream

PrivateStreamNConfiguration that defines characteristics of a stream identifiedas Private Stream

SCTE35_NConfiguration that defines characteristics of a stream identifiedas an SCTE 35 stream (digital program insertion cueingmessages)

Page 34: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.026

Copyright © 1998 - 2010 Manzanita Systems, Inc.

3.1.4 Status Pane

The Status Pane displays final statistics when the output transport stream has been completed, and any error and warningmessages issued during the multiplexing process. It will also display any problems encountered when an existing configurationis opened.

The section, Reviewing the Multiplexer Status, discusses the information displayed in the Status Pane in detail.

3.2 Parameters Dialog Box

A Parameters Dialog Box displays a list of parameters that are specific for a program, input data stream, input video elementarystream, input audio elementary stream, or for the multiplex in general. Multiple Parameters Dialog Boxes can be open sincethey are independent, and they may remain open during the multiplexing process.

Each parameter in the Parameters Dialog Box includes editable controls that enable you to set the value that will be used tomultiplex the output stream. The section, Configuring with the UI, describes how to use the Parameters Dialog Box to configurea transport stream, and discusses each parameter in detail.

To open a Parameters Dialog Box:

1. Double-click on an entry (Transport, ProgramN, DataN, VideoN, AudioN, TableDataN, PrivateStreamN, SCTE35_N, orSMPTE302MN) in the Multiplex Pane.

The Parameters Dialog Box that is specific for the entry will open.

or

1. Select an entry (Transport, ProgramN, DataN, VideoN, AudioN, TableDataN, PrivateStreamN, SCTE35_N, or SMPTE302MN) in the Multiplex Pane.

2. Press the Enter key.

The Parameters Dialog Box that is specific for the entry will open.

or

1. Select an entry (Transport, ProgramN, DataN, VideoN, AudioN, TableDataN, PrivateStreamN, SCTE35_N, or SMPTE302MN) in the Multiplex Pane.

2. Choose Edit > Parameters... from the Menu Bar.

The Parameters Dialog Box that is specific for the entry will open.

or

1. Select an entry (Transport, ProgramN, DataN, VideoN, AudioN, TableDataN, PrivateStreamN, SCTE35_N, or SMPTE302MN) in the Multiplex Pane.

2. Click the right mouse button.

A shortcut menu will open.

3. Select Edit Parameters... from the shortcut menu.

The Parameters Dialog Box that is specific for the entry will open.

Page 35: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User Interface 27

Copyright © 1998 - 2010 Manzanita Systems, Inc.

3.3 Preferences Dialog Box

The Preferences Dialog Box allows you to customize the MP2TSME interface. The following preferences can be set:

Preference Description

Show ID and Type ashex

When checked, PID, StreamType, and PESid parameter values will be displayed inhexadecimal. When unchecked, the values will be displayed in decimal.

Show Tool Tips When checked, a pop-up description will be displayed when the mouse cursor hoverson a parameter value in the Parameter Dialog Box and tool windows.

Default config Allows you to select between "Ask user", "Standard", "CableLabs SD", and"CableLabs HD" as the source for the default values used in a new multiplexconfiguration. If "Standard" is selected, then typical default values including the PIDsdefined by the ATSC specification will always be used. If "CableLabs SD" is selected,then the default values will be compliant with the CableLabs VOD specification ofStandard Definition encoding. If "CableLabs HD" is selected, then the default valueswill be compliant with the CableLabs VOD specification for High Definition encoding.If "Ask user" is selected, then a dialog box will be displayed to allow you to selectbetween "Standard","CableLabs SD", and "CableLabs HD" defaults each time youinitialize a new multiplex configuration.

Table Definition Script Selects the script file that is used by the Table Generator to define the set of availabletables. The Table Definition Script consists of one or more templates that each definethe syntax for a table. MP2TSME includes templates for standard MPEG, ATSC,DVB, and Blu-Ray, however, user-defined templates can also be created using theMP2TSME Table Scripting language. See the section, Table Generator, for a detaileddescription.

To set preferences in the Preferences Dialog Box:

1. Choose Edit > Preferences... from the Menu Bar.

The Preferences Dialog Box will open.

2. Set the preferences to your preferred values.

3. Click OK to save your preferences.

Page 36: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary
Page 37: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Chapter IV

Configuring a Transport Stream

Page 38: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.030

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4 Configuring a Transport Stream

The first step in creating a transport stream is to set up its configuration. The configuration is defined by a set of parametersthat, among other things, specifies the input data and elementary stream files, the output file name, the contents of the ProgramSpecific Information (PSI), and the characteristics of the multiplex. The same set of parameters is used by both the graphical UIand command line versions of the MP2TSME program.

Although MP2TSME supports many configurable parameters, you are only required to specify the input stream files and theoutput file name to create a multiplex. By default MP2TSME sets the remaining parameters to typical values, so they only needto be explicitly configured if there are specific operational requirements. Depending upon a setting in the Preferences DialogBox, the default configuration used by the MP2TSME UI will either be compliant with the CableLabs SD VOD specification, theCableLabs HD VOD specification, or use standard values defined by the ATSC specification. Both the CableLabs and theStandard default values are given in the descriptions of each configuration parameter later in this chapter.

Using the MP2TSME UI, you can easily set up a configuration using the Parameters Dialog Boxes associated with eachmultiplex component. The configuration can then be saved in a configuration file, a text file that follows a simple format. Thisfile can later be loaded into the MP2TSME interface to restore the saved configuration, or can be used as the input configurationfile for the command line version of MP2TSME.

The command line version of MP2TSME uses a single input text file to define the transport stream configuration. Thisconfiguration file can be saved by the MP2TSME UI as described above, or it can be created manually in a text editor.

This chapter describes in detail the two methods that can be used to configure a transport stream. It contains the followingsections:

· Configuring with the UI details how a transport stream is configured with the MP2TSME graphical UI, and defines all ofthe configuration parameters that are listed in the Transport, ProgramN, DataN, VideoN, AudioN, TableDataN,PrivateStreamN, and SMPTE302MN Parameters Dialog Boxes.

· Using Configuration Files describes the format and use of the MP2TSME configuration file.

4.1 Configuring with the UI

The MP2TSME UI enables you to quickly and easily configure a transport stream. This section describes the steps that you willgenerally perform when configuring a new multiplex with the UI. It contains the following subsections:

· Initializing a New Multiplex Configuration explains how to start a new transport stream multiplex.

· Adding a Program describes how to add a new program to the transport stream.

· Inserting an Elementary Stream tells you how to add a video or audio elementary stream to your configuration.

· Inserting a Prepacketized Data Stream explains how to add data in transport packets to your configuration.

· Inserting a Table Data Stream tells you how to insert a new stream that carries one or more MPEG, ATSC, DVB, orprivate tables.

· Inserting a SMPTE 302M Stream describes how to insert a SMPTE 302M audio elementary stream containing from oneto four two-channel streams, such as PCM data, AES3 data or Dolby-E.

· Inserting a Private Stream explains how to multiplex data like DVB bitmapped subtitle data (ETSI EN 300 743) or ITU-RSystem B teletext data (ETSI EN 300 472) as a Private Stream.

· Inserting SCTE 35 Data explains how to insert a message stream for digital program insertion (splicing) as defined bySCTE 35 2007.

· Remultiplexing discussed how to remultiplex video, audio, SMPTE 302M, and Private Stream data that are contained inan existing system, program, VOB or transport stream into a new output transport stream.

· Removing a Program or Stream tells you how to delete a program, elementary stream, or data stream from the currentconfiguration.

Page 39: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 31

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· Using the Parameters Dialog Box explains how to modify the default settings in a Parameters Dialog Box to configure atransport stream for your specific requirements.

· Setting Transport Parameters defines the configuration parameters that determine general properties of a transportstream multiplex.

· Setting Program Parameters defines the configuration parameters that determine the characteristics of the Program MapTable (PMT) and the Program Clock Reference (PCR) for a program in the transport stream.

· Setting Video Parameters defines video elementary stream configuration parameters.

· Setting Audio Parameters defines audio elementary stream configuration parameters.

· Setting Data Parameters defines the configuration parameters for a prepacketized data stream.

· Setting Table Data Parameters defines the configuration parameters for a PSI, SI, or private table stream.

· Setting SMPTE 302M Parameters defines the parameters used to configure a SMPTE 302M digital audio elementarystream.

· Setting Private Stream Parameters defines the parameters used to configure an elementary stream that is identified asprivate_stream_1 or private_stream_2.

· Setting SCTE 35 Data Parameters defines the parameters used to configure a SCTE 35 data stream that carries digitalprogram insertion (splicing) messages.

· Specifying Descriptors describes how to define program and elementary stream descriptors for inclusion in PMTs that areconveyed in the output transport stream.

4.1.1 Initializing a New Multiplex Configuration

The first step in creating a new transport stream is to initialize the multiplex configuration. In performing this step, anyconfiguration that is currently displayed in the MP2TSME Main Window will be deleted and an initial configuration will be loaded. The settings used in this initial configuration depend upon whether you have selected Standard, CableLabs SD, or CableLabsHD as the default configuration. You can either have MP2TSME always use a specific default configuration type, or have it askyou which type you would like to use each time you start a new configuration. The settings in the Preferences Dialog Boxdetermine when the default configuration type is selected.

If the Standard default configuration is selected, then only the Transport and Program1 entries will be displayed in the MultiplexPane when the new multiplex is initialized. The parameters in the Transport and Program1 Parameters Dialog Boxes will be setto typical values, including the PIDs defined by the ATSC specification. No video or audio streams are present in the initialconfiguration.

If the CableLabs SD default configuration is selected, then Transport, Program1, Video1, and Audio1 entries will be displayed. The parameters in the Parameters Dialog Box for each entry will be set to values that are compliant with the CableLabsVideo-On-Demand Content Specification (MD-SP-VOD-CEP2.0-I02-070105, 2007) for Standard Definition (SD) encoding.

If the CableLabs HD default configuration is selected, then Transport, Program1, Video1, and Audio1 entries will be displayed. The parameters in the Parameters Dialog Box for each entry will be set to values that are compliant with the CableLabsVideo-On-Demand Content Specification (MD-SP-VOD-CEP2.0-I02-070105, 2007) for High Definition (HD) encoding.

The initial configuration does not specify an output file for the multiplexed transport stream. If the CableLabs SD or CableLabsHD configuration is used, the input video and audio files are also not specified. You will have to select the output file and allinput files before you can run the Multiplexer.

To initialize a new multiplex configuration:

1. Choose File > New from the Menu Bar.

or

1. Click (New Config) on the Tool Bar.

Page 40: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.032

Copyright © 1998 - 2010 Manzanita Systems, Inc.

If the multiplex configuration that is currently displayed has been modified, then a dialog box will appear that asks you if youwould like to save the current configuration. You will be given three choices:

Click Save to specify a file name, or if the modified configuration was loaded from an existing configuration file, tooverwrite the opened configuration file.

Click Discard to initialize the interface without saving the previous configuration.

Click Cancel to abort the initialization and return to the current configuration.

2. If you have selected the preference to always ask for the default configuration type, the Configuration Type Dialog Box willappear.

Click Standard to use typical default values that include the PIDs defined by the ATSC.

Click CableLabs SD to use default values that are compliant with the CableLabs VOD specification for SD encoding.

Click CableLabs HD to use default values that are compliant with the CableLabs VOD specification for HD encoding.

The Multiplex Pane will display an initial transport stream configuration. All configuration parameters will be set to their defaultvalues.

4.1.2 Adding a Program

The initial configuration that is loaded in the MP2TSME UI always has a single program, which is identified as Program1. If youwant to create a multiple program transport stream, you must add the other programs to the multiplex configuration. As eachnew program is added, a new Program entry will appear as a branch from the Transport entry. Each Program entry is identifiedby a sequentially numbered label, e.g., the first entry to be added following the default Program1 entry will be labeled Program2.The configuration parameters for the new program will be set to the values determined by the default configuration type(Standard, CableLabs SD, or CableLabs HD).

Although the MP2TSME UI does not prevent you from adding additional programs to a default CableLabs SD or CableLabsHD configuration, the CableLabs VOD Specification only permits one program in the transport stream.

To add a program to the multiplex configuration:

1. Select the Transport entry in the the Multiplex Pane.

2. Choose Edit > Add Program from the Menu Bar.

or

2. Click (Add Program) on the Tool Bar.

or

2. Click the right mouse button, then click Add Program on the shortcut menu.

A new Program entry will appear in the Multiplex Pane off the Transport entry. The PMT PID that is assigned by default tothe program will be listed in the PID column. The Prog # column will display the default ProgramNumber parameter value,which is used as the program_number that identifies the program in the PAT and PMT.

4.1.3 Inserting an Elementary Stream

When you define a new Standard transport multiplex configuration, the program does not initially include any elementarystreams. You must insert each video and audio elementary stream into the configuration, and specify the name of its input file. For each program, you may insert up to 16 video elementary streams and 64 audio elementary streams. The video elementarystreams can be MPEG-1 or MPEG-2, which are encoded using any MPEG-defined video profile and level including 4:2:2 profileand Multi-view profile. They may also be H.264 (also referred to as MPEG-4 part 10 or AVC) video elementary streams. Theaudio elementary streams may be MPEG (Layer I, II, or III), AAC (Advanced Audio Coding), AC-3 audio (Dolby Digital), DTS

Page 41: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 33

Copyright © 1998 - 2010 Manzanita Systems, Inc.

audio, Enhanced AC-3 audio (Dolby Digital Plus), and/or MPEG-4 (HE-AAC and HE-AAC version 2).

You can either insert a file that contains an audio or video elementary stream, or insert an audio or video elementary streamwithout initially specifying an input file. In the first case, MP2TSME will inspect the input file, determine the type of elementarystream, and then update the Multiplex Pane to show a new Audio or Video entry under the appropriate Program entry. Thename of the input file will be displayed in the entry. If you insert a video or audio elementary stream without giving an input file,a new entry will appear in the Multiplex Pane, but it will not be associated with an input file. In both cases, the configurationparameters for the inserted elementary stream will be set to the values determined by the default configuration type (Standard,CableLabs SD, or CableLabs HD).

If you use a CableLabs SD or CableLabs HD default configuration, the initial configuration will include one video elementarystream and one audio elementary stream. In both cases, there will not be an associated input file. The CableLabs VODSpecification allows up to two audio elementary streams, so you can insert an additional audio stream in the multiplexconfiguration.

If the input file has not been specified for an inserted video or audio elementary stream, for example, as is the case with a newCableLabs configuration, it will need to be selected before the Multiplexer can be run from within the UI.

In some cases, a video or audio stream to be multiplexed is not saved as an elementary stream file, but is instead part of anexisting system, program, VOB, or transport stream multiplex. MP2TSME also accepts a multiplexed file as the source for avideo and audio elementary stream, extracting and remultiplexing the data into a new output transport stream in one step. Thesection, Remultiplexing, further discusses the procedure for configuring MP2TSME to remultiplex.

Although the MP2TSME UI does not prevent you from inserting a second video elementary stream in the configuration, theCableLabs VOD Specification only permits one MPEG-2 video elementary stream in the program.

To be compliant with the CableLabs VOD Specification, the video stream must be MPEG-2 and all audio streams must beDolby AC-3, however, MP2TSME does not verify that the encoding of the elementary streams meet the specification.

If the CableLabs SD or HD default configuration is selected, MP2TSME will use initial settings that are compliant, however, itdoes not verify the compliance of changes that have been made to the configuration before running the Multiplexer.

To insert a video or audio elementary stream file in the multiplex configuration:

1. Select the input file for the elementary stream in a graphical file system browser/explorer. Drag and drop the file onto theappropriate Program entry.

The key / mouse controls used to drag and drop a file into the configuration is dependent on the operating system. Seethe section, Drag-and-Drop Operation, for a complete description.

or

1. Select the Program entry in which you want to insert the elementary stream.

2. Choose Edit > Insert File... from the Menu Bar.

or

1. Select the Program entry in which you want to insert the elementary stream.

2. Click (Insert File) on the Tool Bar.

or

1. Select the Program entry in which you want to insert the elementary stream.

2. Click the right mouse button, then click Insert File... on the shortcut menu.

The Insert Stream dialog box will appear.

3. Browse your system to select the input file, then click Open.

Page 42: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.034

Copyright © 1998 - 2010 Manzanita Systems, Inc.

After MP2TSME has opened the selected input file, it will determine the identity of the elementary stream and make a newentry under the selected Program in the Multiplex Pane. The entry identifies whether the file is an audio or videoelementary stream. Elementary streams of a given type (video or audio) are numbered sequentially as they are inserted. For example, the first video stream that is added will be labeled Video1 in the Multiplex Pane, the second video stream willbe labeled Video2, etc.

Each entry also lists a PID and a File value for the elementary stream. The PID value is assigned by default to theelementary stream based upon the default configuration type (Standard, CableLabs SD, or CableLabs HD). The File valueis the name of the input file.

If an elementary stream has been removed from the configuration, there may be a gap in the entry numbering. Forexample, if there were two audio elementary streams and the Audio1 entry was removed, the Multiplex Pane will displayonly an Audio2 entry. In this case, the next audio elementary stream that is inserted will be labeled Audio1 to fill the gap.

If MP2TSME is unable to identify the input file, it will display an Unknown Stream Type dialog box that allows you tospecify whether the file is a Data, Video, Audio, or SMPTE 302M stream. MP2TSME will attempt to multiplex the fileaccording to this specified type. However, if the file does not comply with this type, errors may be issued during themultiplexing process and MP2TSME may be unable to create a multiplex.

To insert a Video or Audio entry in the multiplex configuration with no input file:

1. Select the Program entry in which you want to insert the elementary stream.

2. Select Edit > Insert Video or Edit > Insert Audio from the Menu Bar.

or

2. Click the right mouse button, then click Insert Video or Insert Audio on the shortcut menu.

A new entry will appear in the Multiplex Pane under the selected Program entry. Elementary streams of a given type (videoor audio) are numbered sequentially as they are inserted. For example, the first video stream that is added will be labeledVideo1 in the Multiplex Pane and the second video stream will be labeled Video2. The PID value that is assigned bydefault to the elementary stream based upon the default configuration type (Standard or CableLabs) will also be displayedin the entry.

The inserted elementary stream will not have an associated input file. The input file may later be designated using the FilesParameter in the entry's Parameters Dialog Box, or by dragging and dropping the file from a system browser/explorer ontothe Multiplex Pane entry.

The key / mouse controls used to drag and drop a file into the configuration is dependent on the operating system. Seethe section, Drag-and-Drop Operation, for a complete description.

4.1.3.1 Drag-and-Drop Operation

To facilitate the configuration process, the MP2TSME GUI supports the use of drag-and-drop methods to add and define inputfiles. An input file can be easily dragged from a file system browser / explorer window and dropped into the MP2TSME MultiplexPane instead of being explicitly specified with a file parameter.

Drag-and-drop methods can be used to perform the following functions:

· Add - Adds a new elementary stream into a program, and define its input file. The input file is dropped on a Programentry in the Multiplex Pane. If the input file is a multiplex (TS, PS, or SS), then each elementary stream in the multiplexwill be added to the program.

· Define - Defines the input file for an existing elementary stream in a program. The input file is dropped on an elementarystream entry in the Multiplex Pane that has been previously configured, but does not have a specified input file.

· Replace - Replaces a previously defined input file or list of files with a new input file. The input file is dropped on anelementary stream entry in the Multiplex Pane that already has an input file or multiple input files.

Page 43: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 35

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Depending upon the function and the operating system, a modifier key may need to be pressed during the drag-and-dropoperation. The following table summarizes of the use modifier keys:

Action Modifier Key

Windows Linux GNOME Linux KDE Mac

Add None None <Ctrl> <Option>

Define /Replace

<Alt> <Shift> None None

The use of drag-and-drop to remultiplex elementary stream is further discussed in the section, Remultiplexing.

4.1.4 Inserting a Prepacketized Data Stream

In addition to video and audio elementary streams, MP2TSME can multiplex data streams into the output transport stream. Onetype of input data that is accepted by the Multiplexer is prepacketized data, i.e., a data stream that is contained in transportpackets. There are no restrictions on the contents of the transport packets in the prepacketized data input file, only that theymust be contiguous 188-byte packets and must begin with a valid sync byte of 0x47.

MP2TSME can be configured to insert prepacketized data either with no program association, or as part of a program. Prepacketized DVB SI (Service Information) tables, for example, would not be configured as part of a program, while a programrelated data stream would need to referenced in the program's PMT.

If the inserted data stream is not associated with a program, it will appear as a new Data entry on a branch directly off theTransport entry. Up to 64 prepacketized data streams can be inserted at this level.

A data stream that is inserted as part of a program will be displayed as a Data entry under a Program entry. The program'sPMT reference for the data stream will be among the configuration parameters that can be specified for the entry. Up to 64prepacketized data streams can be configured per program.

You can configure a data stream at the transport level, i.e., not associated with a program, by either inserting a file that containsa prepacketized data stream, or by inserting the data stream without initially specifying an input file. In the first case, the inputfile name will also be displayed in the new Data entry that appears off the Transport entry. If the stream was inserted without aninput file, it will need to be selected using the Data entry's Parameters Dialog Box before the Multiplexer can be run from withinthe UI.

Data streams that are associated with a program can only be inserted without initially specifying an input file.

To insert a prepacketized data stream file at the transport level:

1. Select the input data stream file in a graphical file system browser/explorer. Drag and drop the file onto the Transport entry.

or

1. Select the Transport entry.

2. Choose Edit > Insert File... from the Menu Bar.

or

2. Click (Insert File) on the Tool Bar.

or

2. Click the right mouse button, then click Insert File... on the shortcut menu.

Page 44: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.036

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The Insert Stream dialog box will appear.

3. Browse your system to select the input data stream file, then click Open.

A new Data entry will be made in the Multiplex Pane below the Transport entry. Data entries are numbered sequentially asthey are inserted. For example, the first data stream that is added at the transport level will be labeled Data1, the seconddata stream will be labeled Data2, etc. This numbering is independent of the Data entry labels under Program entries. Each entry will also list the name of the input file below the File column.

If a data stream has been removed from the configuration, there may be a gap in the entry numbering. For example, ifthere were two data streams under the Program1 entry and the Data1 entry was removed, only a Data2 entry would appearunder Program1. In this case, the next data stream that is inserted under Program1 will be labeled Data1 to fill the gap.

To insert a Data entry at the transport or program level with no input file:

1. Select the Transport entry if the data stream is not part of a program, or the appropriate Program entry if it is program related.

2. Select Edit > Insert Data from the Menu Bar.

or

2. Click the right mouse button, then click Insert Data on the shortcut menu.

A new Data entry will be made in the Multiplex Pane, either below the Transport entry or under a Program entry. The Dataentries below each parent entry are numbered sequentially as they are inserted. For example, the first data stream that isadded to Program1 will be labeled Data1, the second data stream will be labeled Data2, etc. This numbering isindependent of the Data entry labels under the Transport entry and under the other Program entries.

The inserted data stream will not have an associated input file. The Files Parameter that names the input file must bespecified in the entry's Parameters Dialog Box before the Multiplexer can be run in the UI.

4.1.5 Inserting a Table Data Stream

MP2TSME features an integrated Table Generator that enables users to construct MPEG, ATSC, DVB, and private table data. The resulting data may be multiplexed in the output transport stream.

Before the tables are constructed, each PID stream that will carry table data must first be inserted in the transport multiplexconfiguration. A table data stream can either be inserted as part of a program, or with no program association. In the first case,the PID assigned to carry the table data is configured to be referenced in the program's PMT. In the second case, there will beno reference to the PID stream in the PSI.

A table data stream that is inserted as part of a program will be displayed as a TableData entry under a Program entry. Theprogram's PMT reference for the table data stream will be among the configuration parameters that can be specified for theentry. Up to 64 table data streams can be configured per program.

If the inserted data stream is not associated with a program, it will appear as a new TableData entry on a branch directly off theTransport entry. Up to 64 table data streams can be inserted at this level.

After a TableData entry is inserted in the multiplex configuration, the individual tables that are to be sent in the stream can becreated using the Table Generator in the TableData entry's Parameters Dialog Box. The PID value that is assigned to the tabledata stream, insertion rate, PMT stream_type (if applicable), and timing restrictions are also set in the Parameters Dialog Box.

Each table data stream that is configured must be assigned a PID value that is unique in the transport stream multiplex.

To insert a table data stream in the multiplex configuration:

1. Select the Transport entry if the table data stream is not part of a program, or the appropriate Program entry if it is programrelated.

2. Select Edit > Insert Table Data from the Menu Bar.

Page 45: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 37

Copyright © 1998 - 2010 Manzanita Systems, Inc.

or

2. Click the right mouse button, then click Insert Table Data on the shortcut menu.

A new TableData entry will be made in the Multiplex Pane, either below the Transport entry or under a Program entry. TheTableData entries below each parent entry are numbered sequentially as they are inserted. For example, the first tabledata stream that is added to Program1 will be labeled TableData1, the second data stream will be labeled TableData2, etc. This numbering is independent of the TableData entry labels under the Transport entry and under the other Programentries.

4.1.6 Inserting a SMPTE 302M Stream

The SMPTE 302M standard specifies the transport of digital audio, such as PCM data or AES3 data, in MPEG-2 transportstreams. MP2TSME can be configured to multiplex up to 16 SMPTE 302M streams in each program. Each SMPTE 302M elementary stream may consist of one to four two-channel digital audio streams.

To configure a SMPTE 302M stream in a program, you can insert the SMPTE 302M stream into the configuration without initiallyspecifying an input file or you can drop a file that contains a two-channel digital audio stream onto the Program entry in theMultiplex Pane.

If an input file has not been specified for a newly inserted SMPTE 302M stream, the entry's Parameters Dialog Box must beopened to select a source file for each input two-channel stream before the Multiplexer can be run.

If the SMPTE 302M stream was configured by dropping a single input file onto a Program entry, the source files for anyadditional two-channel streams that are required must be explicitly selected from the SMPTE 302M stream's Parameters DialogBox.

In some cases, a SMPTE 302M stream to be multiplexed is not saved as an elementary stream file, but is instead part of anexisting system, program, VOB, or transport stream multiplex. MP2TSME also excepts a multiplexed file as the source for aSMPTE 302M stream, extracting and remultiplexing the data into new output transport streams in one step. The section, Remultiplexing, discusses configuring MP2TSME to remultiplex in detail.

To insert a two-channel digital audio stream file in the multiplex configuration:

1. Select the input file in a graphical file system browser/explorer. Drag and drop the file onto the appropriate Program entry.

or

1. Select the Program entry in which you want to insert the elementary stream.

2. Choose Edit > Insert File... from the Menu Bar.

or

2. Click (Insert File) on the Tool Bar.

or

2. Click the right mouse button, then click Insert File... on the shortcut menu.

The Insert Stream dialog box will appear.

3. Browse your system to select the input file, then click Open.

The Unknown Stream Type dialog box will be displayed. MP2TSME will automatically identify video and audio elementarystreams, but must be explicitly told the identity of SMPTE 302M data.

4. Select SMPTE 302M from the drop-down list of stream types in the Unknown Stream Type dialog box, and click OK.

A new SMPTE 302M entry will appear under the selected Program entry in the Multiplex Pane. SMPTE 302M entries arenumbered sequentially as they are inserted. For example, the first entry that is added will be labeled SMPTE302M1, thesecond entry will be labeled SMPTE302M2, etc.

Page 46: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.038

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Each entry also lists the path of the input file under in the File column.

If a SMPTE 302M stream has been removed from the configuration, there may be a gap in the entry numbering. Forexample, if there were two SMPTE 302M streams and the SMPTE302M1 entry was removed, the Multiplex Pane willdisplay only an SMPTE302M2 entry. In this case, the next SMPTE 302M stream that is inserted will be labeledSMPTE302M1 to fill the gap.

To insert a SMPTE 302M entry in the multiplex configuration with no input file:

1. Select the Program entry in which you want to insert the elementary stream.

2. Select Edit > Insert SMPTE from the Menu Bar.

or

2. Click the right mouse button, then click Insert SMPTE on the shortcut menu.

A new SMPTE 302M entry will appear under the selected Program entry in the Multiplex Pane. SMPTE 302M entries arenumbered sequentially as they are inserted. For example, the first entry that is added will be labeled SMPTE302M1, thesecond entry will be labeled SMPTE302M2, etc.

The inserted SMPTE 302M stream will not have any associated input files. For each input two-channel stream, the FilesParameter that names the source file will have to be specified in the entry's Parameters Dialog Box before the Multiplexercan be run.

4.1.7 Inserting a Private Stream

MP2TSME supports the multiplexing of private streams, including KLV (Key Length Value) data, program related subtitles (asspecified for DVB Subtitling Systems in ETSI EN 300 743), and ITU-R System B Teletext (ITU-R Recommendation 653). Streams carrying these types of data are generally identified in the PMT with a stream type of 0x06, or "PES packets containingprivate data", and in PES packet headers with a stream ID of 0xBD, or "private_stream_1". The PES packets forprivate_stream_1 may carry time stamps (PTS/DTS) that synchronize the private stream with the video stream in the program.

Asynchronous data streams may also be multiplexed in PES packets, but typically they are identified with a stream ID of 0xBF,or "private_stream_2". In this case, the PES headers only have a length field and no time stamps.

Both private_stream_1 and private_stream_2 data, referred to generically as Private Streams, can be configured formultiplexing. Up to 16 Private Streams may be multiplexed in each program.

The input data for a Private Stream can be provided to the Multiplexer in three different ways:

· Data only - The input file is the binary data that will be the payload of the Private Stream PES packets.

· Index and data in one file - The input file is a Private Stream Data file that uses a specific format defined by ManzanitaSystems. The file includes PES packet information, lengths, and timing in an XML "index", followed by the binarypayload data.

· Index and data in separate files - Instead of a combined index-data file, the text-readable index and the binary payloaddata can be provided as two separate files.

A Private Stream can be added to a program by either directly inserting a Private Stream Data file into the configuration, or byconfiguring a Private Stream without initially specifying an input file. In the first case, MP2TSME will inspect the input file, andthen update the Multiplex Pane to show a new Private Stream entry under the appropriate Program entry. The name of theinput file will be displayed in the entry. If a Private Stream is configured without giving an input file, a new entry will appear in theMultiplex Pane, but it will not be associated with an input file. In this case, the input file must be specified using the entry'sParameters Dialog Box before the Multiplexer can be run from within the UI.

In some cases, subtitle data or teletext to be multiplexed is not saved in a Private Stream file, but is instead part of an existingsystem, program, VOB, or transport stream multiplex. MP2TSME also accepts a multiplexed file as the source for a DVBsubtitles or teletext, extracting and remultiplexing the data into new output transport streams in one step. The section, Remultiplexing, further discusses the procedure for configuring MP2TSME to remultiplex.

Page 47: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 39

Copyright © 1998 - 2010 Manzanita Systems, Inc.

To insert a Private Stream Data file in the multiplex configuration:

1. Select the input Private Stream Data file in a graphical file system browser/explorer. Drag and drop the file onto theappropriate Program entry.

The key / mouse controls used to drag and drop a file into the configuration is dependent on the operating system. Seethe section, Drag-and-Drop Operation, for a complete description.

or

1. Select the Program entry in which you want to insert the Private Stream.

2. Choose Edit > Insert File... from the Menu Bar.

or

1. Select the Program entry in which you want to insert the Private Stream.

2. Click (Insert File) on the Tool Bar.

or

1. Select the Program entry in which you want to insert the Private Stream.

2. Click the right mouse button, then click Insert File... on the shortcut menu.

The Insert Stream dialog box will appear.

3. Browse your system to select the input Private Stream Data file, then click Open.

After MP2TSME has opened the selected input Private Stream Data file, it will make a new Private Stream entry under theselected Program in the Multiplex Pane. Entries are numbered sequentially as they are inserted. For example, the firstPrivate Stream that is added will be labeled PrivateStream1 in the Multiplex Pane, the second Private Stream will belabeled PrivateStream2, etc. Each entry also lists a default PID and a File value.

If a Private Stream entry has been removed from the configuration, there may be a gap in the entry numbering. Forexample, if there were two Private Stream entries and the PrivateStream1 entry was removed, the Multiplex Pane willdisplay only a PrivateStream2 entry. In this case, the next Private Stream that is inserted will be labeled PrivateStream1 tofill the gap.

To insert a Private Stream entry in the multiplex configuration with no input file:

1. Select the Program entry in which you want to insert the elementary stream.

2. Select Edit > Insert Private Stream from the Menu Bar.

or

2. Click the right mouse button, then click Insert Private Stream on the shortcut menu.

A new Private Stream entry will appear in the Multiplex Pane under the selected Program entry. Entries are numberedsequentially as they are inserted. For example, the first Private Stream that is added will be labeled PrivateStream1 in theMultiplex Pane, the second video stream will be labeled PrivateStream2, etc. Each entry also lists a default PID value.

The inserted Private Stream will not have an associated input file. The input data file must be specified using the FilesParameter in the entry's Parameters Dialog Box.

Page 48: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.040

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.1.8 Inserting SCTE 35 Data

To support the digital insertion of content into MPEG-2 transport multiplexes, SCTE specifies an in-stream messaging system tosignal splicing and insertion events. This standard, ANSI/SCTE 35 2007, defines the Splice Information Table to carrynotification and timing commands about upcoming splice points to the receiver. The Splice Information Table is carried on aper-program basis in one or more PID streams that are identified in the program's PMT.

MP2TSME supports the multiplexing of data streams carrying Splice Information Table messages, which are referred to asSCTE 35 Data streams in this document. For each program, up to four SCTE 35 Data streams may be configured.

The input file for an SCTE 35 Data stream must be in a specific format that is defined by Manzanita Systems as discussed inthe section, SCTE 35 Data File.

An SCTE 35 Data stream can be added to a program by either directly inserting an SCTE 35 Data file to the configuration, or byconfiguring an SCTE 35 Data stream without initially specifying an input file. In the first case, MP2TSME will inspect the inputfile, and then update the Multiplex Pane to show a new SCTE 35 Data entry under the appropriate Program entry. The name ofthe input file will be displayed in the entry. If an SCTE 35 Data stream is configured without giving an input file, a new entry willappear in the Multiplex Pane, but it will not be associated with an input file. In this case, the SCTE 35 Data file must bespecified using the entry's Parameters Dialog Box before the Multiplexer can be run from within the UI.

To insert an SCTE 35 Data file in the multiplex configuration:

1. Select the input file in a graphical file system browser/explorer. Drag and drop the file onto the appropriate Program entry.

or

1. Select the Program entry in which you want to insert the SCTE 35 Data stream.

2. Choose Edit > Insert File... from the Menu Bar.

or

1. Select the Program entry in which you want to insert the SCTE 35 Data stream.

2. Click (Insert File) on the Tool Bar.

or

1. Select the Program entry in which you want to insert the SCTE 35 Data stream.

2. Click the right mouse button, then click Insert File... on the shortcut menu.

The Insert Stream dialog box will appear.

3. Browse your system to select the input SCTE 35 Data file, then click Open.

After MP2TSME has opened the selected input file, it will make a new SCTE 35 Data entry under the selected Program inthe Multiplex Pane. Entries are numbered sequentially as they are inserted. For example, the first SCTE 35 Data streamthat is added will be labeled SCTE35_1 in the Multiplex Pane, the second SCTE 35 Data stream will be labeled SCTE35_2,etc. Each entry also lists a default PID and a File value.

If an SCTE 35 Data entry has been removed from the configuration, there may be a gap in the entry numbering. Forexample, if there were two SCTE 35 Data entries and the SCTE35_1 entry was removed, the Multiplex Pane will displayonly an SCTE35_2 entry. In this case, the next SCTE 35 Data stream that is inserted will be labeled SCTE35_1 to fill thegap.

To insert an SCTE 35 Data entry in the multiplex configuration with no input file:

1. Select the Program entry in which you want to insert the elementary stream.

Page 49: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 41

Copyright © 1998 - 2010 Manzanita Systems, Inc.

2. Select Edit > Insert SCTE35 Data from the Menu Bar.

or

2. Click the right mouse button, then click Insert SCTE35 Data on the shortcut menu.

A new SCTE 35 Data entry will appear in the Multiplex Pane under the selected Program entry. Entries are numberedsequentially as they are inserted. For example, the first SCTE 35 Data stream that is added will be labeled SCTE35_1 inthe Multiplex Pane, the second SCTE 35 Data stream will be labeled SCTE35_2, etc. Each entry also lists the default PIDvalue.

The inserted SCTE 35 Data entry will not have an associated input file. The input SCTE 35 Data file must be specifiedusing the Files Parameter in the entry's Parameters Dialog Box.

4.1.9 Remultiplexing

MP2TSME supports remultiplexing of video and audio elementary streams that are part of an existing multiplexed stream file. Inone step, the Multiplexer will extract the elementary stream from the input multiplex and remultiplex it in the output transportstream. The following types of input multiplexed files are supported:

· MPEG-1 system stream

· MPEG-2 program stream

· Video Object (VOB) stream

· MPEG-2 transport stream

MP2TSME can also remultiplex private data streams, e.g., DVB subtitle streams, however, the input file can only be a transportstream.

To configure the Multiplexer for remultiplexing, the multiplexed stream is designated as the input file instead of an elementarystream file, and the elementary stream to be extracted is identified. If the input file is a transport stream, the elementary streamis identified by its PID, otherwise it is identified by its stream_id. Two different methods may be used to implement thisconfiguration:

· The elementary stream is inserted in the configuration without specifying the input file as described in the section, Inserting an Elementary Stream. The elementary stream will appear as a new entry in the Multiplex Pane. Themultiplexed file must next be designated as the source for the elementary stream using the Files Parameter in the entry'sParameters Dialog Box. The Remultiplex parameters for the elementary stream must be manually configured to enableremultiplexing and to identify the elementary stream by stream_id or PID.

· The multiplexed input file is selected in a graphical file system browser/explorer and drag-and-dropped onto theappropriate Program entry in the Multiplex Pane. MP2TSME will determine the type of multiplex and identify theelementary streams contained in it. The elementary streams will appear as new entries under the program, and the FilesParameter will be set to the multiplexed input file. The Remultiplex Parameters for each of the elementary streams willbe automatically configured to enable remultiplexing and to identify the elementary stream in the source multiplex. Anydescriptors that are associated with the elementary stream will also be automatically added to the configuration.

Depending upon the operating system, a modifier key may need to be used in conjunction with drag-and-drop to insert amultiplexed elementary stream as discussed in the section, Drag-and-Drop Operation.

The drag-and-drop insertion of multiplexed elementary streams makes the configuration and identification of the streams veryconvenient and easy, however, the following issues should be considered:

· A multiplexed input file may only be drag-and-dropped on a Program entry in the Multiplex Pane. If it is accidentallydropped on the Transport entry, MP2TSME will mistakenly configure it as a new Prepacketized Data Stream.

· It is only practical to use drag-and-drop insertion of elementary streams that are in a single program transport stream. This is because MP2TSME can only identify streams in the first program of the input transport stream. If it is desired toremultiplex an elementary stream that is in the second or higher program in a transport stream file, the stream must bemanually configured as described above.

Page 50: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.042

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· All elementary streams that are present in the first program of the input multiplex will be inserted in the configuration. Ifan inserted elementary stream is not desired in the output transport stream, it must be manually deleted from theconfiguration as described in the section, Removing a Program or Stream.

· The drag-and-drop configuration of SMPTE 302M streams for remultiplexing is not supported. If it is desired toremultiplex a SMPTE 302M stream that is part of a multiplexed input file, the stream must be manually configured asdescribed above.

· Any descriptors that are associated in the multiplexed input file with the inserted elementary stream are automaticallyadded to the Descriptors Parameter in the entry's Parameters Dialog Box. As such, the configuration of remultiplexedelementary streams should always be reviewed. Descriptors that are not desired in the output transport stream must bemanually deleted from the configuration.

Drag-and-drop insertion also can be used to concatenate multiple elementary streams that are multiplexed in separate inputfiles by drag-and-dropping the files in sequence onto the Program entry. The video streams from each of the input files will beconcatenated into a single stream. Similarly, the audio stream(s) will be assembled into one stream. For example, if you haveseveral transport streams that consist of a single program with one video and two audio streams and that conform to theCableLabs VOD specification, they can be concatenated together and remultiplexed in one, CableLabs compliant transportstream by inserting the files one after another. The resulting elementary stream entries will be automatically configured formultiple input files and the associated AVSync Parameter will be enabled.

Multiple multiplexed input files can only be inserted for concatenation if there are the same number of elementary streams ineach of the files, and the elementary streams are similarly identified. For example, a transport stream that has one video streamon PID 0x21 and one audio stream on PID 0x24 can only be used with other transport streams that have a single video on PID0x21 and a single audio on PID 0x24.

4.1.10 Removing a Program or Stream

When building a new multiplex configuration or modifying an existing one, you may need to delete a Program, Video, Audio,Data, Private Stream, SCTE 35, SMPTE 302M, or Table Data entry that is listed in the Multiplex Pane.

To remove an entry from the multiplex configuration:

1. Click on the Program, Video, Audio, Data, Private Stream, SCTE 35, SMPTE 302M, or Table Data entry in the Multiplex Panethat you wish to remove.

2. Click the right mouse button, then select Remove from the shortcut menu

or

2. Press the Delete key on your keyboard.

or

2. Choose Edit > Remove Entry from the Menu Bar.

or

2. Click (Remove Entry) on the Tool Bar.

A box will appear asking you to confirm that you want to remove the entry from the multiplex.

3. Click Yes on the confirmation box.

The selected entry will be removed from the Multiplex Pane.

When a program or stream is removed from the current configuration, its deletion will leave a gap in the numbered labels forthat entry type. For example, if there were three video elementary streams and Video2 was removed, the Multiplex Pane willdisplay only Video1 and Video3. In this case, the next video elementary stream that is inserted will be labeled Video2 to fill thegap.

Page 51: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 43

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.1.11 Using the Parameters Dialog Box

The Parameters Dialog Box displays a list of parameters that are specific for a program, prepacketized data stream, videoelementary stream, audio elementary stream, Private Stream, SCTE 35, SMPTE 302M stream, table data stream, or for themultiplex in general. Each entry in the Multiplex Pane has a unique Parameters Dialog Box that can be opened as described inthe section, Parameters Dialog Box. Multiple Parameters Dialog Boxes can be opened simultaneously since they areindependent, and they may remain open during the multiplexing process.

MP2TSME uses the parameter settings in all of the Parameters Dialog Boxes to determine how to multiplex the output stream.Each parameter has an initial default value that is typical or recommended, and should generally only be changed to meet aspecific requirement. The values used in this initial configuration depend upon whether you have selected Standard, CableLabsSD, or CableLabs HD as the default configuration.

The parameters in each Parameters Dialog Box are grouped in several sections according to functionality. Each section can beopened or collapsed with a single mouse click on a labeled button bar.

Once you have set the parameters in a Parameters Dialog Box according to your requirements, you must apply the settingsbefore they will be implemented.

To save parameter settings in a Parameters Dialog Box:

1. Click OK.

If all of the parameter settings are valid, then the current parameter settings will be applied and the Parameters Dialog Boxwill close.

If any problems are found in the current settings, an error message will be displayed that describes the problems. Forexample, if a parameter is set to an invalid value, the message will display the acceptable range of values.

or

1. Click Apply.

The current parameter settings will be saved and the Parameters Dialog Box will remain open. The Apply button will bedisabled.

If any problems are found in the current settings, an error message will be displayed that describes the problems. Forexample, if a parameter is set to an invalid value, the message will display the acceptable range of values.

If you have changed any parameter settings without applying them and try to run the Multiplexer, a dialog box will bedisplayed that gives you the option of applying or discarding all your changes before multiplexing. If you elect to discard thechanges, all Parameters Dialog Boxes will revert to the last settings that were applied.

4.1.12 Setting Transport Parameters

Transport level configuration parameters are set in the Transport Parameters Dialog Box. These parameters determine generalproperties of the transport stream output file, and specify how the Program Association Table (PAT) is to be constructed. The DVB Selection Information Table (SIT) and Discontinuity Information Table (DIT) for a "partial" Storage Media Interoperability(SMI) transport stream are also configured in the Transport Parameters Dialog Box.

If the Transport Parameters Dialog Box is for a new multiplex configuration, the parameter settings depend upon whether youhave selected Standard, CableLabs SD, or CableLabs HD as the default configuration. You should review these default valuesand modify them if necessary for your application before running the Multiplexer.

If the CableLabs SD or CableLabs HD default configuration is selected, MP2TSME will use initial settings that are compliantwith the CableLabs VOD Specification, however, it does not verify compliance if changes have been made to the configurationbefore running the Multiplexer.

The only Transport parameter that you must explicitly set to run the Multiplexer is the Files parameter. You must set it to thename of the file to which the output transport stream will be saved or the Multiplexer will give you an error.

Page 52: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.044

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The Transport parameters are divided into nine functional categories as listed below:

Output PSI DVB SI Transport Adaptation

Files CreatePSI DIT TransportPriority InitDI

FileSize PSIPATrep DITTransition PktCountMultiple PCRi

Rate PSIPMTrep SIT NoEmptyAF

VBR PATtsid SITPeriod

Duration / StopOnAV PATvsn SITVersion

Leader NITPID SITTransDescr

StopOnWarning SITServiceID

StopOnError SITRunningStatus

Start SITSvcDescr

End

PktSize

Comment

Timing Terminator Time Stamps HDV Mode HD2

Priority Terminate PktTS HDVModeHD2

BurstNulls Overlap PktTSPre AUXVPID

BurstNullsCount PktTSBytes AUXAPID

BurstNullsSpacing PktTSBits HDVDropFrame

PktTSLSByteFirst

The Transport Parameters Dialog Box has nine button bars, one for each of the nine categories. The parameters under a givencategory appear below the associated button bar, which can be opened or collapsed with a single mouse click.

The rest of this section describes each Transport parameter in detail.

Page 53: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 45

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Output Parameters

Files

Data Formatpathname or filename string

Defaultnone

DescriptionThe Files Parameter specifies the name or names of the output transport stream file. If you would like the entire outputstream to be written to a single file, then you can specify the name of the file directly in the Files input box. The string valuethat is entered may be specified by full path, relative path, or by filename only. If only a filename is given, then the output

file will be written to the current directory. Instead of entering the name directly, you can click the button to browseyour system to select the location and name of the output file.

The output stream can also be segmented automatically into sequentially named files. To accomplish this, a single outputfile is specified as described above with the two-character string %i included in the file name. The characters %i will bereplaced with an incrementing value with each successive output file. For example, if the output file name is specified as part%i.mpg, then the series of output files will be named part1.mpg, part2.mpg, part3.mpg, etc. Note that theFileSize Parameter must be assigned a non-zero value that specifies the maximum size of each of the output files.

If you want the output stream to be segmented into multiple files, and wish to explicitly specify the file names, click the Multiple button bar. The Output File List box will open. From this box you can specify the name of each output file byclicking the Add button to open the Select Output File box. The order that the names appear in the File List is the order inwhich the Multiplexer will sequentially write the output files. In this case, the FileSize Parameter must also be assigned anon-zero value that specifies the maximum size of each of the output files.

MP2TSME will give you an error and will not proceed if you try to run the Multiplexer without specifying a FilesParameter.

If you want to use multiple output files, you must also specify a non-zero value for the FileSize Parameter otherwise theentire output stream will be written to the first file that is named.

FileSize

Data Formatnon-negative decimal integer

Unitsbytes

Range0 (no size limit)minimum is 1024 bytes, maximum is limited by OS

DefaultNo limit

DescriptionIf two or more output filenames are defined with the Files Parameter, then the FileSize Parameter is used to specify themaximum size of each of the output files. If the No limit box is checked, then there is no limit to the output file size, and alldata will be written to the first file. If the No limit box is unchecked, then the accompanying textbox will be enabled to allowentry of a value. The value should be a non-negative integer that gives the desired maximum size of each output file inbytes. When the first file reaches the size specified by FileSize, it is closed and the second file in the list opened. TheMultiplexer continues to write the output stream to the next file until it also reaches FileSize. The output files do not have toend at packet boundaries; the Multiplexer will split the packet being written when the specified FileSize is reached. If thereare insufficient filenames provided by the Files parameter to save the output stream, MP2TSME will report an error andstop. It is therefore safer to provide extra filenames; the additional filenames will be ignored if they are not required.

A value of 0 for FileSize is equivalent to checking the No limit box; all output data will be written to the first file.

Page 54: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.046

Copyright © 1998 - 2010 Manzanita Systems, Inc.

If the FileSize Parameter is set to a non-zero value and there is only one file named by the Files Parameter, theMultiplexer will stop writing the output stream when the file reaches the specified size. Although MP2TSME will report afatal error, this feature can be used if an output file of a specific size is needed. This size limit is independent of theDuration parameter setting.

Rate

Data Formatnon-negative real number

Unitsbit per second

Range0 (use minimum rate)100 000 to 1 000 000 000

DefaultStandard: MinimumCableLabs SD: 3750000.000CableLabs HD: Minimum

DescriptionThe Rate parameter determines the bit rate of the output transport stream. If the Minimum box is checked, then theMultiplexer will use the minimum rate as computed from the sum of the maximum rates for all elementary streams, datastreams, PSI streams, and any necessary overhead. If the Minimum box is unchecked, then the accompanying textboxwill be enabled to allow entry of a value. The value should be a non-negative number in double format that represents therate in bits per second. It may be entered as either a fixed point or floating point number. The value may include fractionalbps. The valid range is 100 000 to 1 000 000 000 bps (100 kbps to 1 Gbps). Setting the Rate value to 0 is equivalent tochecking the Minimum box.

If the VBR Parameter is set to Yes and there is only one program configured, then the Rate Parameter specifies themaximum rate of the output stream.

If the specified value is less than the computed minimum rate, then a warning will be issued. MP2TSME will continueto multiplex the stream, however, the resulting stream may not be usable.

VBR

Data Formatenumerated

ValuesYes (multiplex as VBR)No (multiplex as CBR)

DefaultNo

DescriptionThe VBR Parameter determines whether the output stream is at a constant bit rate or at a variable bit rate. If the No optionis selected, then the Multiplexer will multiplex the output transport stream at the constant bit rate specified by the RateParameter. If the Yes option is selected and only one program is configured, then the Multiplexer will create a variable bitrate transport stream. In this case, the Rate Parameter specifies the maximum rate of the output stream.

This parameter should only be enabled if the transport stream is configured with a single program. If more than oneprogram is configured and the VBR Parameter is set to Yes, the Multiplexer will ignore the setting, multiplex the outputstream at a constant bit rate, and issue a warning.

Duration / StopOnAV

Data FormatDrop Frame Time Code (HH:MM:SS;FF)Non-Drop Frame Time Code (HH:MM:SS:FF)

Range0 (auto duration) 00:00:00:01 to 24:00:00:00

Page 55: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 47

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DefaultAuto

DescriptionThe Duration Parameter specifies the duration or length in time of the output transport stream that is created by theMultiplexer. If the Auto box is checked, then the output stream will be of sufficient duration to carry all of the elementarystreams specified. If the StopOnAV box is checked, then the output stream will be of stopped when the end of the video oraudio elementary stream with the shortest length is reached. If neither Auto or StopOnAV is checked, then theaccompanying textbox will be enabled to allow entry of a value.

The Duration value specifies the output stream duration in hours, minutes, seconds, and frames. The value must be givenin the Drop Frame Time Code (DFTC) format or Non-Drop Frame Time Code (NDFTC) format. DFTC uses the syntaxHH:MM:SS;FF, while NDFTC is specified as HH:MM:SS:FF. In both cases, HH is a number of hours (00 to 24), MM is anumber of minutes (00 to 59), SS is a number of seconds (00 to 59), and FF is a number of frames. The complete valuemust be less than or equal to 24 hours. Individual time values are non-negative integer numbers. In DFTC format, thenumber of frames given by FF is added to the time specified by the HH:MM:SS value. In NDFTC format, the completeHH:MM:SS:FF value is based upon an integer number of frames per second. For example, the NDFTC duration "1:00" isinterpreted as 30 frames, which for 29.97 fps video is 1.001 seconds. In contrast, the DFTC duration "1.0" is interpreted asexactly one second. In long streams, this 0.1% difference in duration becomes significant. A colon, ":", is used to separatethe first three numbers in either format, and to separate the SS and FF numbers in NDFTC format. A period, ".", separatesthe SS and FF numbers in DFTC format. The most significant time values default to zero, and therefore may be omitted. For example, a duration value of "20:5" is interpreted as twenty seconds and five frames.

The length of one frame is derived from the frame rate of the first video elementary stream listed in the configuration file. Ifthere are no video elementary streams present, then the length of one frame is derived from the frame rate of the firstaudio stream. The actual duration will be within one packet of the value specified. If the elementary streams are notcomplete at the specified ending time, they will be truncated at the final packet.

Leader

Data Formatnon-negative decimal integer

Units90 kHz cycles

Range0 to 1 000 000 000

DefaultNo leader

DescriptionThe Leader Parameter enables the Multiplexer to write a leader before the start of elementary stream data that containsonly null packets and PSI packets. If the No leader box is checked, then the Multiplexer does not delay the start ofelementary stream data. If the No leader box is unchecked, then the accompanying textbox will be enabled to allow entryof a value.

The Leader value should be a non-negative integer that represents the length of the leader in 90 kHz clock cycles. Thevalid range is 0 to 1 000 000 000. A leader is typically used to delay all payload in the transport stream. Such a delay maybe required, for example, when the beginning of the transport stream may be lost or corrupted by downstream equipment.

StopOnWarning

Data Formatenumerated

ValuesYes (stop multiplexing on warning)No

DefaultNo

DescriptionThe StopOnWarning Parameter determines how the Multiplexer behaves when a warning condition is encountered. If the Yes option is selected, then the Multiplexer will halt execution when the first warning condition is detected. If the No optionis selected, then the Multiplexer will continue processing while warnings are issued.

Page 56: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.048

Copyright © 1998 - 2010 Manzanita Systems, Inc.

StopOnError

Data Formatenumerated

ValuesYes (stop multiplexing on error)No

DefaultYes

DescriptionThe StopOnError Parameter determines how the Multiplexer behaves when an error condition is encountered. If the Yesoption is selected, then the Multiplexer will halt execution when the first error condition is detected. If the No option isselected, then the Multiplexer will continue processing while errors are issued.

Error conditions are generally considered fatal. The Multiplexer will attempt to continue if StopOnError is disabled,however, in most cases the output will not be usable.

Start

Data FormatNon-Drop Frame Time Code (HH:MM:SS:FF)

Range00:00:00:00 to 24:00:00:00

DefaultEnable is unchecked

DescriptionThe Start Parameter enables precise multiplexing of a segment of the input elementary streams. If the Enable box isunchecked, then the feature is disabled and multiplexing begins at the start of the input video elementary stream. If the Enable box is checked, then the accompanying textbox will be enabled to allow entry of a value that specifies the timecodein the video elementary stream at which multiplexing should begin. That is, the video stream before the timecode will bediscarded and the output stream will start with data beginning at the timecode.

This parameter should only be enabled if the transport stream is configured with one video elementary stream in a singleprogram. The program may include up to 64 audio elementary streams. If timecodes are present in the video elementarystream, the timecodes will be compared to the specified Start value, and the first I frame at or after this value will be thefirst video access unit multiplexed in the output stream. All audio elementary streams that are configured in the programwill be started at the corresponding time, and the initial audio delay will be adjusted to match the initial video I frame. Iftimecodes are not present in the video elementary stream, then they will be computed starting with an initial time of00:00:00:00. In both cases if the specified timecode is not encountered, then the transport stream will not be created andan error is issued that video never acquired.

The specified value should be non-negative integer numbers in NDFTC (HH:MM:SS:FF) duration format, where HH is anumber of hours (00 to 24), MM is a number of minutes (00 to 59), SS is a number of seconds (00 to 59), and FF is anumber of frames. The value must be less than or equal to 24 hours. The most significant places in the timecode defaultto zero, and may be omitted. For example, a timecode of "1:20:5" would be interpreted as one minute, twenty seconds andfive frames.

End

Data FormatNon-Drop Frame Time Code (HH:MM:SS:FF)

Range00:00:00:00 to 24:00:00:00

DefaultEnable is unchecked

DescriptionThe End Parameter enables precise multiplexing of a segment of the input elementary streams. If the Enable box isunchecked, then the feature is disabled and the output transport stream will end as configured by the Duration parameter. If the Enable box is checked, then the accompanying textbox will be enabled to allow entry of a value that specifies thetimecode in the video elementary stream at which multiplexing of all elementary streams should end.

This parameter should only be enabled if the transport stream is configured with one video elementary stream in a single

Page 57: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 49

Copyright © 1998 - 2010 Manzanita Systems, Inc.

program. The program may include up to 64 audio elementary streams. If timecodes are present in the video elementarystream, the timecodes will be compared to the specified End value to determine the last video access unit. All audioelementary streams that are present will be stopped at the same time. The transport stream will then end. If timecodesare not present in the video elementary stream, then they will be computed starting with an initial time of 00:00:00:00. Inboth cases if the specified timecode is not encountered, then the video elementary stream will not be truncated and thetransport stream will have a maximum duration. Note that selecting an arbitrary frame to end a stream may cause artifactsif B frames are present. If such artifacts are encountered, they may be eliminated if the End parameter is altered by one ortwo frames.

The specified value should be non-negative integer numbers in NDFTC (HH:MM:SS:FF) duration format, where HH is anumber of hours (00 to 24), MM is a number of minutes (00 to 59), SS is a number of seconds (00 to 59), and FF is anumber of frames. The value must be less than or equal to 24 hours. The most significant places in the timecode defaultto zero, and may be omitted. For example, a timecode of "1:20:5" would be interpreted as one minute, twenty seconds andfive frames.

The last access unit in the output transport stream will be the access unit that corresponds to the specified End time,i.e., the stream is inclusive of the End time.

PktSize

Data Formatnon-negative decimal integer

Unitsbytes

Range0 (188 bytes)188 to 512

Default188

DescriptionThe PktSize Parameter specifies the length in bytes of the packets output by MP2TSME. The value must be either zero,or between 188 and 512, inclusive. A value of zero is the same as a value of 188, which indicates that the standard 188byte transport packet size should be used. If a size other than the standard 188 bytes is specified, then the extra bytes willbe set to zero.

An optional 27 MHz time stamp can be inserted in place of some of the extra bytes using the PktTS Parameter.

Comment

Data Formatstring

DescriptionThe Comment Parameter allows you to enter optional text comments when the current configuration is saved in a file. Thistext will appear as a comment block starting with the line immediately after the Transport Section Title (Transport*) in thesaved configuration file. The text can have multiple lines. If the current configuration is loaded from a configuration file, theComment Parameter will display any comment lines that appear between the Transport Section Title and the title of thenext section or subsection in the file.

PSI Parameters

CreatePSI

Data Formatenumerated

ValuesYes (insert PSI tables)No (do not insert PSI tables)

Default

Page 58: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.050

Copyright © 1998 - 2010 Manzanita Systems, Inc.

YesDescription

The CreatePSI Parameter indicates if the Multiplexer should create the MPEG PSI tables for the output transport stream. If the value is Yes, then the PAT and PMT(s) will be created and inserted according to the other PSI parameters in theconfiguration file. If it is No, then no PAT or PMTs will be inserted in the output stream. In this case, the user may elect toinsert PSI as prepacketized data or in a Table Data stream.

PSIPATrep

Data Formatnon-negative real number

UnitsPATs per second

Range0.001 to 1000

DefaultStandard: 10.000CableLabs SD: 8.000CableLabs HD: 8.000

DescriptionThe PSIPATrep Parameter specifies the rate at which the Program Association Table (PAT) should be repeated in thetransport stream. The PSIPATrep value should be a non-negative number in double format that represents the repetitionrate in PATs per second. The valid range is 0.1 to 1000.

PSIPMTrep

Data Formatnon-negative real number

UnitsPMTs per second

Range0.001 to 1000

DefaultStandard: 10.000CableLabs SD: 8.000CableLabs HD: 8.000

DescriptionThe PSIPMTrep Parameter specifies the rate at which the Program Map Table (PMT) should be repeated in the transportstream. The PSIPMTrep value should be a non-negative number in double format that represents the repetition rate inPMTs per second. The valid range is 0.1 to 1000.

PATtsid

Data Formatnon-negative integer, decimal or hexadecimal

Range0 to 65 535 (0x0000 to 0xFFFF)

Default1

DescriptionThe PATtsid Parameter sets the value of the transport_stream_id that appears in the PAT. The PATtsid value should be aninteger between 0 and 65 535 (0x0000 and 0xFFFF). The value may be specified in decimal, or if prefaced with a "0x", inhexadecimal.

PATvsn

Data Formatnon-negative integer, decimal or hexadecimal

Page 59: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 51

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Range0 to 31 (0x00 to 0x1F)

Default0

DescriptionThe PATvsn Parameter sets the value of the version_number of the PAT. The PATvsn value must be an integer between 0and 31 (0x00 and 0x1F), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

NITPID

Data Formatnon-negative integer, decimal or hexadecimal

Range0 (NIT disabled)16 to 8190 (0x0010 to 0x1FFE)

DefaultEnable is unchecked

DescriptionThe NITPID Parameter is used to create an entry in the PAT for the PID that carries the Network Information Table (NIT). If the Enable box is unchecked, then the feature is disabled and no entry is made in the PAT for a NIT. If the Enable boxis checked, then the accompanying textbox will be enabled to allow entry of the PID value that should be associated withthe NIT in the PAT. This PID is called the network_PID. The PAT will associate a program_number value of 0 with thenetwork_PID. The Multiplexer will not automatically generate the NIT itself, or insert any network_PID packets. The valuemay be specified in decimal, or if prefaced with a "0x", in hexadecimal. The valid range is 16 to 8190 (0x0010 to 0x1FFE),inclusive. A value of 0 indicates that no networkPID entry is to be inserted in the PAT.

To insert a NIT in the transport stream, the user can create a Table Data stream that contains anetwork_information_section. The PID that is assigned to this stream should be the same as the NITPID. A prepacketizeddata stream can also be used.

DVB SI Parameters

DIT

Data Formatenumerated

ValuesYes (include DIT)No

DefaultNo

DescriptionThe DIT Parameter determines whether the DVB Discontinuity Information Table (DIT) should be carried in the transportstream. If the value is Yes, then the Multiplexer will insert the DIT in PID 0x001E once at the beginning of the transportstream. This usage of the DIT is for "partial" (i.e., recorded) bit streams. If the value is No, then no DIT will be carried.

DITTransition

Data Formatnon-negative integer

Range0 and 1

Default0

Description

Page 60: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.052

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The DITTransition Parameter is only enabled when the DIT Parameter is set to Yes. It sets the value of the transition_flagin the DIT. The DITTransition Parameter can only be set to 0 or 1.

SIT

Data Formatenumerated

ValuesYes (include SIT)No

DefaultNo

DescriptionThe SIT Parameter determines whether the DVB Selection Information Table (SIT) should be carried in the transportstream. If the value is Yes, then the Multiplexer will insert the SIT in PID 0x001F at the frequency specified by theSITPeriod Parameter. This usage of the SIT is for "partial" (i.e., recorded) bit streams. If the value is No, then no SIT willbe carried.

The SIT that is inserted using this parameter can only have one service_loop, i.e., only one service_id andrunning_status. If a SIT that has multiple service_loops is required, then the SIT must instead be defined using the TableGenerator in a Table Data stream that is assigned a PID value of 0x001E.

SITPeriod

Data Formatnon-negative decimal integer

Unitsmilliseconds

Range0 (insert once at beginning of stream)1 to 2 000 000 000

Default0

DescriptionThe SITPeriod Parameter is only enabled if the SIT Parameter is set to Yes. It determines how often the SIT is inserted inPID 0x001F. The SITPeriod value should be a non-negative integer that represents the period between SIT insertions inmilliseconds. The valid range is 1 to 2 000 000 000. If the SITPeriod is set to 0, the SIT will be inserted once at thebeginning of the transport stream.

SITVersion

Data Formatnon-negative integer, decimal or hexadecimal

Range0 to 31 (0x00 to 0x1F)

Default0

DescriptionThe SITVersion Parameter is only enabled if the SIT Parameter is set to Yes. The SITVersion Parameter sets the value ofthe version_number in the SIT. The SITVersion value must be an integer between 0 and 31 (0x00 and 0x1F), inclusive.The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

SITTransDescr

Data Formathexadecimal data

Rangeup to 32 descriptors

Page 61: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 53

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Defaultnone

DescriptionThe SITTransDescr Parameter is only enabled if the SIT Parameter is set to Yes. The SITTransDescr Parameter specifiesdescriptor data that should be included in the transmission_info_loop of the SIT. Up to 32 descriptors may be specified withthe SITTransDescr Parameter. To enter descriptor data, click the Edit button to open the Descriptors List.

The Descriptors List is the interface used to define and edit the descriptors. A descriptor may be added to the list as asequence of hexadecimal byte values, or may be created using the Descriptor Generator. The list box will display thehexadecimal data for each descriptor that is added as a separate entry. Use of the Descriptors List is detailed in thesection, Specifying Descriptors.

MP2TSME does not check the validity of the descriptor data that is specified.

SITServiceID

Data Formatnon-negative integer, decimal or hexadecimal

Range1 to 65 535 (0x0001 to 0xFFFF)

Default2

DescriptionThe SITServiceID Parameter is only enabled if the SIT Parameter is set to Yes. The SITServiceID Parameter specifies thevalue of the service_id field in the SIT. Although the SIT may carry multiple service_id fields, the SITServiceID Parameteronly supports a single service_id. The value assigned to the SITServiceID should be the same as the one assigned to theProgramNumber Parameter for the first program in the configuration (Program1).

If a SIT that uses multiple service_id values is required, then the SIT must instead be defined using the TableGenerator in a Table Data stream that is assigned a PID value of 0x001E.

MP2TSME does not check that the values of the SITServiceID and ProgramNumber Parameters agree.

SITRunningStatus

Data Formatnon-negative integer

Range0 to 7

Default0

DescriptionThe SITRunningStatus Parameter is only enabled if the SIT Parameter is set to Yes. The SITRunningStatus Parameterspecifies the value of the running_status field in the SIT. Although the SIT may carry multiple service_id fields, theSITRunningStatus Parameter only supports a single running_status. The SITRunningStatus value must be an integerbetween 0 and 7, inclusive.

If a SIT that uses multiple running_status values is required, then the SIT must instead be defined using the TableGenerator in a Table Data stream that is assigned a PID value of 0x001E.

SITSvcDescr

Data Formathexadecimal data

Rangeup to 32 descriptors

Defaultnone

DescriptionThe SITSvcDescr Parameter is only enabled if the SIT Parameter is set to Yes. The SITSvcDescr Parameter specifies

Page 62: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.054

Copyright © 1998 - 2010 Manzanita Systems, Inc.

descriptor data that should be included in the service_loop of the SIT. Up to 32 descriptors may be specified with theSITSvcDescr Parameter. To enter descriptor data, click the Edit button to open the Descriptors List.

The Descriptors List is the interface used to define and edit the descriptors. A descriptor may be added to the list as asequence of hexadecimal byte values, or may be created using the Descriptor Generator. The list box will display thehexadecimal data for each descriptor that is added as a separate entry. Use of the Descriptors List is detailed in thesection, Specifying Descriptors.

MP2TSME does not check the validity of the descriptor data that is specified.

Transport Parameters

TransportPriority

Data Formatenumerated

ValuesYes (set transport_priority to 1 in PID 0) No

DefaultNo

DescriptionThe TransportPriority Parameter determines the value of the transport_priority bit that appears in all PID 0 packets in theoutput stream. If the TransportPriority value is Yes, then all PID 0 transport_priority bits will be set to 1. If it is No, then thetransport_priority will be set to 0 in all PID 0 packets.

PktCountMultiple

Data Formatnon-negative decimal integer

Unitstransport packets

Range0 to 1 000 000

Default0

DescriptionThe PktCountMultiple Parameter forces the output transport stream file to be a multiple of the specified number of packets.The PktCountMultiple value should be a non-negative integer that species the desired packet multiple. The valid range is 0to 1 000 000.

Adaptation Parameters

InitDI

Data Formatenumerated

ValuesYes (set discontinuity_indicator to 1 with first PAT) No

DefaultNo

Description

Page 63: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 55

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The InitDI Parameter indicates if the PID 0 packet containing the first PAT in the output transport stream should contain anadaptation field with the discontinuity_indicator bit set to 1. If the InitDI value is Yes, then the discontinuity_indicator is setin the packet containing the initial PAT. If the value is No, then no discontinuity is indicated with the first PAT.

PCRi

Data Formatnon-negative decimal integer

Range0 to 2 576 953 377 600

Default0

DescriptionThe PCRi Parameter specifies the initial PCR for the first packet in the transport stream. The value must be a decimalinteger between zero and 2 576 953 377 600. Note that this maximum value is one second less than the maximum valueof the PCR field.

NoEmptyAF

Data Formatenumerated

ValuesYes (no zero length adaptation fields) No

DefaultYes

DescriptionThe NoEmptyAF Parameter indicates if the Multiplexer should avoid using zero length adaptation fields in all transportpackets that carry video elementary streams. If the PESalign Parameter is set to Yes, the Multiplexer will occasionally usean adaptation field with a zero length in order to align video access units to PES headers. Some models of the Motorola/GIDCT-1000 and DCT-1200, have problems when they encounter zero length adaptation fields. To avoid this condition, theNoEmptyAF Parameter should be set to Yes. Note that the NoEmptyAF Parameter is only effective when the VideoPESalign Parameter is also set to Yes. If the value of NoEmptyAF is No, then the Multiplexer will not avoid adaptationfields with a zero length.

Timing Parameters

Priority

Data Formatenumerated

ValuesYes (give PID 0 packets multiplexing priority) No

DefaultNo

DescriptionThe Priority Parameter indicates if PID 0 packets should be inserted into the multiplex with minimal jitter. This optionshould be used if PID 0 is configured to carry a PCR. Without giving priority to PID 0 packets, multiplex jitter could causePCR interval violations because of the low rate at which the PAT is inserted. If the Priority Parameter is set to Yes, thenPID 0 packets are given priority when multiplexed.

BurstNulls

Data Format

Page 64: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.056

Copyright © 1998 - 2010 Manzanita Systems, Inc.

enumeratedValues

Yes (insert periodic bursts of null packets) No

DefaultNo

DescriptionIf set to Yes, the BurstNulls Parameter directs the Multiplexer to insert a periodic burst of consecutive null packets in thetransport stream. The BurstNullsCount Parameter specifies the number of null packets in the burst, and theBurstNullsSpacing Parameter specifies the number of transport packets between each burst.

The BurstNullsCount and BurstNullsSpacing Parameters must be specified if BurstNulls is enabled. A warning will beissued if either parameter value is zero.

The Burst Nulls feature is not supported if the VBR Parameter is enabled. A warning will be issued.

The insertion of the null packet bursts with the configured periodicity takes priority over the multiplexing of all othertypes of packets. For example, if null bursts have been configured and also the Priority Parameter has been enabled tohave the Multiplexer insert PID 0 packets with minimal jitter, the Multiplexer will always insert null bursts at the configuredrate even if it results in extra jitter in the PID 0 stream. As such, the BurstNulls feature should be used with caution. Because an output transport stream that is created with BurstNulls enabled may easily be invalid, it is recommended thatthe stream is verified by an transport stream analyzer.

The BurstNulls feature is primarily used in generating test streams, e.g., in testing mobile devices.

BurstNullsCount

Data Formatnon-negative decimal integer

Unitstransport packets

Range1 to 1 000 000 000

Defaultdisabled

DescriptionThe BurstNullsCount Parameter is only enabled if the BurstNulls Parameter is set to Yes. This parameter specifies thenumber of consecutive packets in each null packet burst. The value must be a decimal integer between 1 and 1 000 000000, inclusive.

BurstNullsSpacing

Data Formatnon-negative decimal integer

Unitstransport packets

Range1 to 1 000 000 000

Defaultdisabled

DescriptionThe BurstNullsSpacing Parameter is only enabled if the BurstNulls Parameter is set to Yes. This parameter specifies thenumber of transport packets between each null packet burst, i.e., the number of packets between the last null packet of aburst and the first null packet of the next burst. The value must be a decimal integer between 1 and 1 000 000 000,inclusive.

Page 65: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 57

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Terminator Parameters

Terminate

Data Formatenumerated

ValuesYes No

DefaultNo

DescriptionThe Terminate Parameter indicates if this stream should be terminated using the Terminator technology. The Terminatorenables seamless concatenation of transport streams. If the value is set to Yes, the transport stream will be terminated forthe first program in the multiplex configuration, Program1. Within the first program, the first video elementary stream willdetermine the timing of the termination. If the first program does not contain a video elementary stream, then the firstaudio elementary stream in the first program will be processed for seamless concatenation. Use of this option requires thatthe Duration Parameter is assigned a non-zero value that is less than the duration of the actual elementary streams in theterminated program. This is necessary to allow MP2TSME to fix the timing at the end of the transport stream.

An in-depth description of use of the Terminator technology is given in the chapter, The Terminator.

Overlap

Data Formatnon-negative decimal integer

Unitsframe periods

Range0 to 60

Default15

DescriptionThe Overlap Parameter is only enabled if the Terminate Parameter is set to Yes. This parameter sets the overlap betweenthe time when the transport stream is delivered to the decoder and the time when the first access unit is decoded. Thevalue should be a non-negative integer that represents the overlap as a number of video frame periods. The OverlapParameter applies to both the beginning and end of terminated streams.

The value assigned to the Overlap Parameter must not change over a collection of terminated streams that areintended for seamless concatenation. If two streams are terminated with different values for the Overlap Parameter, theremay be buffer problems at the transitions.

Time Stamps on Packets Parameters

PktTS

Data Formatenumerated

ValuesYes (insert a time stamp)No

DefaultNo

Description

Page 66: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.058

Copyright © 1998 - 2010 Manzanita Systems, Inc.

If the PktTS Parameter is set to Yes, then MP2TSME will either prepend or append every transport packet with a 27 MHztime stamp. The clock on which this external timestamp is derived is locked to the PCRs in the stream. The timestamp isrelative to the first byte of the transport packet. The PktPre Parameter determines whether the timestamp is before or afterthe transport packet, and the PktTSBytes Parameter sets the length of the timestamp in bytes.

If the value of PktTS is set to No, then an external time stamp will not be inserted.

The PktSize Parameter must be set to a value that is greater than or equal to 188 plus the PktTSBytes value toaccomodate the timestamp, else MP2TSME will report an error.

PktTSPre

Data Formatenumerated

ValuesYes No

DefaultNo

DescriptionThe PktTSPre Parameter is only enabled if the PktTS Parameter is set to Yes. This parameter determines the position ofthe timestamp relative to the transport packet. If it is set to Yes, then the time stamp immediately precedes the transportpacket. If it is set to No, then the time stamp will begin in the byte immediately after the last, or 188th, byte of the packet.For example, if PktTSBytes has a value of four, PktSize is 500 and PktTSPre is Yes, each transport packet will bepreceded by its 4-byte timestamp. After the packet and before the next timestamp will be 308 bytes of zero. If insteadPktTSPre is No, each transport packet will be followed by its timestamp and then 308 zero bytes.

PktTSBytes

Data Formatnon-negative decimal integer

Unitsbytes

Range0 to 8

Default0

DescriptionThe PktTSBytes Parameter is only enabled if the PktTS Parameter is set to Yes. This parameter sets the size of thetimestamp field in bytes. The value must be a decimal integer between zero and 8, inclusive.

The PktTSBits Parameter specifies the number of bits in the timestamp that is written in the timestamp field. The length ofthe timestamp may be less than the length of the timestamp field that is specified by PktTSBytes, in which case thetimestamp will be left-aligned in the field and the remaining bits set to zero.

PktTSBits

Data Formatnon-negative decimal integer

Unitsbits

Range0 to 64

Default0

DescriptionThe PktTSBits Parameter is only enabled if the PktTS Parameter is set to Yes. This parameter sets the number of bits inthe inserted timestamp. The value must be a decimal integer between zero and 64, inclusive.

The PktTSBytes Parameter specifies the number of bytes in the field that contains the timestamp. The length of the

Page 67: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 59

Copyright © 1998 - 2010 Manzanita Systems, Inc.

timestamp specified by PktTSBits may be less than the length of the field, in which case the timestamp will be left-alignedin the field and the remaining bits set to zero.

If the PktTSBits is set to zero, then all bits in the number of bytes specified by PktTSBytes are used for the timestamp.

If PktTSBits is greater than PktTSBytes * 8, then the extra bits in the time stamp are discarded. The Multiplexer doesnot issue a warning if this occurs.

PktTSLSByteFirst

Data Formatenumerated

ValuesYes No

DefaultNo

DescriptionThe PktTSLSByteFirst Parameter is only enabled if the PktTS Parameter is set to Yes. If PktTSLSByteFirst is set to Yes,then the timestamp will be formatted with the least significant byte in the first position (AKA "little-endian"). If it is set to No,then the most significant byte will be in the first position (AKA "big-endian"). The timestamp value is always written with themost significant bit of each byte in the left-most position.

HDV Mode HD2 Parameters

HDVModeHD2

Data Formatenumerated

ValuesYes (HD2 mode compatible stream)No

DefaultNo

DescriptionIf the HDVModeHD2 Parameter is set to Yes, then MP2TSME will create a transport stream that is compatible with theHD2 mode defined by the HDV Recording Format specification.

AUXVPID

Data Formatnon-negative integer, decimal or hexadecimal

Range16 to 8190 (0x0010 to 0x1FFE)

Default0

DescriptionThe AUXVPID Parameter is only enabled if the HDVModeHD2 Parameter is set to Yes. This parameter specifies the PIDthat carries the AUX-V data stream in HD2 mode as defined by the HDV Recording Format specification. The AUXVPIDvalue must be an integer between 16 and 8190 (0x0010 and 0x1FFE), inclusive. The value may be specified in decimal, orif prefaced with a "0x", in hexadecimal.

AUXAPID

Data Format

Page 68: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.060

Copyright © 1998 - 2010 Manzanita Systems, Inc.

non-negative integer, decimal or hexadecimalRange

16 to 8190 (0x0010 to 0x1FFE)Default

0Description

The AUXAPID Parameter is only enabled if the HDVModeHD2 Parameter is set to Yes. This parameter specifies the PIDthat carries the AUX-A data stream in HD2 mode as defined by the HDV Recording Format specification. The AUXAPIDvalue must be an integer between 16 and 8190 (0x0010 and 0x1FFE), inclusive. The value may be specified in decimal, orif prefaced with a "0x", in hexadecimal.

HDVDropFrame

Data Formatenumerated

ValuesYesNo

Default No

DescriptionThe HDVDropFrame Parameter is only enabled if the HDVModeHD2 Parameter is set to Yes. This parameter controlshow timecodes are generated for the AUX-V data stream. When it is set to Yes, drop frame time codes are used. When itis set to No, non-drop frame time codes are used.

Page 69: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 61

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.1.13 Setting Program Parameters

Program level configuration parameters are set in the Program Parameters Dialog Box. Each program that is configured in theMultiplex Pane will have a unique Program Parameters Dialog Box. The Program parameters define the Program Map Table(PMT) for a program in the transport stream, and determine the properties of the program's Program Clock Reference (PCR).

If the Program Parameters Dialog Box is for a new multiplex configuration, the parameter settings depend upon whether youhave selected Standard, CableLabs SD, or CableLabs HD as the default configuration. You should review these default valuesand modify them if necessary for your application before running the Multiplexer.

If the CableLabs SD or CableLabs HD default configuration is selected, MP2TSME will use initial settings that are compliantwith the CableLabs VOD Specification, however, it does not verify compliance if changes have been made to the configurationbefore running the Multiplexer.

The Program parameters are divided into four functional categories as listed below:

PMT Transport Adaptation Timing

ProgramNumber TransportPriority PCRper Priority

PMTPID PCRPES SBrate

PMTvsn InitDI SBsize

Descriptors

PCRPID

Comment

The Program Parameters Dialog Box has four button bars, one for each of the four categories. The parameters under a givencategory appear below the associated button bar, which can be opened or collapsed with a single mouse click.

The rest of this section describes each Program parameter in detail.

PMT Parameters

ProgramNumber

Data Formatnon-negative integer, decimal or hexadecimal

Range1 to 65 535 (0x0001 to 0xFFFF)

Default1 + N

DescriptionThe ProgramNumber Parameter specifies the value of the program_number field that identifies the program in the PAT andthe associated PMT. The ProgramNumber value must be an integer between 1 and 65 535 (0x0001 and 0xFFFF),inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

The default value for the Standard and both CableLabs configurations is 1 + N, where N is the number that identifies theprogram in the multiplex configuration. For example, Program1 will have a default ProgramNumber value of 2.

Only one program may be present in a transport stream that is compliant with the CableLabs VOD specification,however, the Multiplexer does not verify compliance if changes have been made to the configuration before running theMultiplexer.

PMTPID

Data Format

Page 70: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.062

Copyright © 1998 - 2010 Manzanita Systems, Inc.

non-negative integer, decimal or hexadecimalRange

16 to 8190 (0x0010 to 0x1FFE)Default

Standard: See DescriptionCableLabs SD: 480 (0x01E0) for Program1 onlyCableLabs HD: 480 (0x01E0) for Program1 only

DescriptionThe PMTPID Parameter specifies the PID used to transport the program's PMT. This PID is also identified in the PAT asthe program_map_PID for the program. For a Standard configuration, the PMTPID value must be an integer between 16and 8190 (0x0010 and 0x1FFE), inclusive. For a CableLabs configuration, only the value 480 (0x01E0) is valid. The valuemay be specified in decimal, or if prefaced with a "0x", in hexadecimal.

For the first program in the configuration (Program1), the Standard default value is 32 (0x0020) and the CableLabs defaultvalue is 480 (0x01E0). For the next programs, the Standard and CableLabs defaults are both 16 x (1 + N), where N is thenumber that identifies the program in the multiplex configuration. For example, Program2 will have a default PMTPIDvalue of 48 (0x0030).

Only one program may be present in a transport stream that is compliant with the CableLabs VOD specification,however, if additional programs are added to a CableLabs SD or CableLabs HD configuration, the PMTPID default valueswill be identical to those assigned in the Standard configuration.

PMTvsn

Data Formatnon-negative integer, decimal or hexadecimal

Range0 to 31 (0x00 to 0x1F)

Default0

DescriptionThe PMTvsn Parameter sets the value of the version_number in the PMT. The PMTvsn value must be an integer between0 and 31 (0x00 and 0x1F), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

Descriptors

Data Formathexadecimal data

Rangeup to 32 descriptors

DefaultnoneDescription

The Descriptors Parameter specifies descriptor data that should be included at the program level in the PMT. Up to 32descriptors may be specified with the Descriptors Parameter. To enter descriptor data, click the Edit button to open theDescriptors List.

The Descriptors List is the interface used to define and edit the program level descriptors. A descriptor may be added tothe list as a sequence of hexadecimal byte values, or may be created using the Descriptor Generator. The list box willdisplay the hexadecimal data for each descriptor that is added as a separate entry. Use of the Descriptors List is detailedin the section, Specifying Descriptors.

MP2TSME does not check the validity of the descriptor data that is specified.

PCRPID

Data Formatnon-negative integer, decimal or hexadecimal

Range-1 (use Auto setting)0, 1, or 16 to 8191 (0x0010 to 0x1FFF)

Page 71: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 63

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DefaultAuto

DescriptionThe PCRPID Parameter specifies the PID that carries the PCR for this program. If the Auto box is checked, then thePCRPID value will be set to the first video PID value. If no video elementary stream is in the program, then the PCR PIDvalue is set to the first audio PID in the stream. If no video or audio streams are defined, then the PCRPID defaults to avalue of 0x1FFF, indicating no PCR is present in the stream. If the Auto box is unchecked, then the accompanying textboxwill be enabled to allow entry of a value. The PCRPID value may be 0, 1, or between 0x10 and 0x1FFE, inclusive. Thevalue may be specified in decimal, or if prefaced with a "0x", in hexadecimal. If the specified PID is not one of theelementary stream or PSI PIDs, then the Multiplexer will create packets containing only PCRs and insert them in the outputtransport stream at the appropriate times. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.Setting the PCRPID Parameter to -1 is equivalent to checking the Auto box.

The PCRPID may not be same as any PID used by a Table Data stream.

To be compliant with the CableLabs VOD specification, the PCRPID must be the same as the video PID.

Comment

Data Formatstring

DescriptionThe Comment Parameter allows you to enter optional text comments when the current configuration is saved in a file. Thistext will appear as a comment block starting with the line immediately after the Program Section Title (e.g., Program1*) inthe saved configuration file. The text can have multiple lines. If the current configuration is loaded from a configuration file,the Comment Parameter will display any comment lines that appear between the Program Section Title and the title of thenext section or subsection in the file.

Transport Parameters

TransportPriority

Data Formatenumerated

ValuesYes (set transport_priority to 1 in PMT PID) No

DefaultNo

DescriptionThe TransportPriority Parameter determines the value of the transport_priority bit that appears in all PMT PID packets forthe program. If the TransportPriority value is Yes, then all transport_priority bits will be set to 1. If it is No, then thetransport_priority will be set to 0 in all of the PMT PID packets for the program.

Adaptation Parameters

PCRper

Data Formatnon-negative decimal integer

Unitsmilliseconds

Range

Page 72: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.064

Copyright © 1998 - 2010 Manzanita Systems, Inc.

1 to 65 535Default

90Description

The PCRper Parameter specifies the period between PCR fields that are inserted in the stream specified by the PCRPIDParameter. The PCRper value must be a non-negative decimal integer between 1 and 65 535 that specifies the PCRinterval in units of milliseconds.

The MPEG specification requires that the interval between PCRs for a program must be less than or equal to 100 ms.

PCRPES

Data Formatenumerated

ValuesYes (force PCR on every PES packet header)No

DefaultStandard: NoCableLabs SD: YesCableLabs HD: Yes

DescriptionThe PCRPES Parameter indicates if a PCR should be inserted in each PCR PID packet that contains a PES header. If thePCRPES value is Yes, then a PCR will be sent in each packet that contains a PES header start. The parameter is onlyused if the PCR for this program is carried by the video PID. In this case, the PCR spacing interval will be reset when aPCR is inserted in a packet with a PES header even if the previous PCR interval is less than the configured PCRper value.If the PCRPES value is No, the Multiplexer will not force a PCR in each packet that contains a PES header, but willmaintain the interval between PCRs that is specified by the PCRper Parameter.

InitDI

Data Formatenumerated

ValuesYes (set discontinuity_indicator to 1 with first PMT) No

DefaultNo

DescriptionThe InitDI Parameter indicates if the PMT PID packet containing the first PMT for this program should contain adiscontinuity_indicator with the value of 1. If the InitDI value is Yes, then the discontinuity_indicator is set in the packetcontaining the initial PMT. If the value is No, then no discontinuity is indicated with the first PMT.

As required in the MPEG-2 specification, the PMT that the Multiplexer inserts in the initial discontinuity packet will be a13-byte PMT. This PMT does not contain any elementary stream information or descriptors, but is present only to signal adiscontinuity to the decoder. The next PMT that is sent will contain the full definition of the program. The version_numberin this second PMT will be an increment of one above the version_number in the PMT that is sent in the initial discontinuitypacket. If the version_number was specified with the PMTvsn Parameter it will be used in the second, complete PMT.

Timing Parameters

Priority

Data Formatenumerated

Values

Page 73: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 65

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Yes (give PMT PID packets multiplexing priority) No

DefaultNo

DescriptionThe Priority Parameter indicates if PMT PID packets for this program should be inserted into the multiplex with minimaljitter. This option should be used if the PMT PID is configured to carry a PCR. Without giving priority to the PMT PIDpackets, multiplex jitter could cause PCR interval violations because of the low rate at which the PMT is inserted. If thePriority Parameter is set to Yes, then the PMT PID packets for this program are given priority when multiplexed.

SBrate

Data Formatnon-negative decimal integer

Unitsbits per second

Range0 to 1 000 000 000

Default0

DescriptionThe SBrate Parameter specifies the drain rate of the smoothing buffer for this program. The value must be a non-negativeinteger representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000. If a smoothing buffer is to beused, non-zero values for both the SBsize and SBrate Parameters must be given.

SBsize

Data Formatnon-negative decimal integer

Unitsbytes

Range0 to 1 000 000 000

Default

0Description

The SBsize Parameter specifies the size of the smoothing buffer for this program. The value must be a non-negativeinteger representing the buffer size in bytes. The valid range is 0 to 1 000 000 000. If a smoothing buffer is to be used,non-zero values for both the SBsize and SBrate Parameters must be given.

Page 74: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.066

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.1.14 Setting Video Parameters

MP2TSME allows you to configure up to 16 video elementary streams in each program. The video streams may be anycombination of MPEG-1, MPEG-2 (any video profiles and levels including 4:2:2 profile and Multi-view profile), or H.264 (alsoreferred to as MPEG-4 part 10 or AVC).

Each video stream that you insert into a program will appear as a new entry under the appropriate Program entry in theMultiplex Pane. The video streams are identified with a sequentially numbered label as they are added, i.e., Video1, Video2,etc.

If you use a CableLabs SD or CableLabs HD default configuration, MP2TSME does not prevent you from inserting a secondvideo elementary stream in the configuration. However, the CableLabs VOD Specification only permits one video elementarystream in the program. To be compliant with the specification, the video stream must be MPEG-2, however, MP2TSME doesnot verify that the encoding of the elementary stream meets the specification.

The title of the Parameters Dialog Box that is associated with a given video stream will have both program and video identifiers,e.g., "Program2 Video1 Parameters". The Video Parameters Dialog Box lists the configuration parameters that are specific forthe video stream. These parameters define the input video elementary stream, specify how the video stream is identified in themultiplex, configure encoding of the video packets and PES headers, and determine video buffering and delays.

If the Video Parameters Dialog Box is for a new multiplex configuration, the parameter settings depend upon whether you haveselected Standard, CableLabs SD or CableLabs HD as the default configuration. You should review these default values andmodify them if necessary for your application before running the Multiplexer.

If the CableLabs SD or CableLabs HD default configuration is selected, MP2TSME will use initial settings that are compliantwith the CableLabs VOD Specification, however, it does not verify compliance if changes have been made to the configurationbefore running the Multiplexer.

The only Video parameter that you must explicitly set to run the Multiplexer is the Files Parameter. If the video elementarystream was inserted in the current configuration with the Insert File command or with a drag-and-drop operation, the FilesParameter will already be set to the name of the input video file. However, if the Video Parameters Dialog Box is for a newconfiguration with CableLabs defaults, or the video stream was inserted using the Insert Video command, the Files Parameterwill initially be blank. You must set it to the name of an input video file or the Multiplexer will give you an error. A quick methodfor doing this is to drag-and-drop the input file from a graphical file system browser/explorer onto the Video entry in the MultiplexPane.

In some cases, the video stream to be multiplexed is not saved as an elementary stream file, but is instead part of an existingsystem, program, VOB, or transport stream multiplex. MP2TSME also excepts a multiplexed file as the source for a videoelementary stream, extracting and remultiplexing the data into a new output transport stream in one step. The section, Remultiplexing, further discusses the procedure for configuring MP2TSME to remultiplex.

The Video parameters are divided into seven functional categories as listed below:

Input Remultiplex PMT Transport

Files Remux Stream StreamType PID

Rate SourceStreamID Descriptors TransportPriority

Quadbyte SourceTSPID

Comment DescFromData

AVSync

Page 75: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 67

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Adaptation PES Timing Closed Captions

InitDI PESalign FrameRate CreateDTVCC

RAI PEScopyrt FrameRateTolerant SCCFile

PCRGOP PESid NotLowDelay CCField

Splice stream_id_extension IgnorePOC CCTimeOffset

PESnau MaxDecodeDelay

PESpri DBsize

PESorig StreamDelay

PTSnPES IndDelay

MaxPESlen TypeDelay

PESPrivateDataFile Delay

Priority

SBrate

SBsize

StartSeqHdr

StrictVBV

StillPicOffset

RateAdjustment

The Video Parameters Dialog Box has seven button bars, one for each of the seven categories. The parameters under a givencategory appear below the associated button bar, which can be opened or collapsed with a single mouse click.

The rest of this section describes each Video parameter in detail.

Input Parameters

Files

Data Formatpathname or filename string

Defaultnone

DescriptionThe Files Parameter specifies the name of the input video elementary stream file. If you inserted the video stream into theconfiguration using drag-and-drop or with the Insert File command on the Tool Bar or Menu Bar, then the pathname of theinput file will be displayed in the Files textbox. To change the input file, the pathname can be edited directly in the textbox

or you can click the button to browse your system to select the location and name of a different input file.

The input video elementary stream file must be in binary format. The first byte of the file should be asequence_header_code, followed by the remainder of the sequence header (and any extensions), and then the pictureheader for the first picture. If the input file does not start with a sequence_header_code, the StartSeqHdr parameter canbe enabled to instruct the Multiplexer to delete all data in the video stream up to the first sequence header.

The input file may also be a system, program, unencrypted Video Object file, or transport stream that contains the videoelementary stream to be remultiplexed. In this case, the appropriate Remultiplex Parameters must also be specified.

The two-character string %i can be used in the specified name if the input stream is segmented into multiple files that aresequentially named. The %i string represents an integer index that begins with 1. For example, if the input stream iscontiguously segmented into four files named part1.mpv, part2.mpv, part3.mpv, and part4.mpg, the filename used for FilesParameter is part%i.mpv. The Multiplexer will look for a sequence of input files in the specified path starting with part1.

Page 76: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.068

Copyright © 1998 - 2010 Manzanita Systems, Inc.

mpv, and multiplex them as one continuous video stream. It will stop multiplexing when it reaches the last file name in thesequence. The first byte of the first file should be a sequence_header_code, followed by the remainder of the sequenceheader (and any extensions), and then the picture header for the first picture. The remaining files do not have to begin witha video start_code, i.e., the video elementary stream does not have to be segmented on start code or access unitboundaries. However, the multiple input files should make up a continuous video elementary stream when they areconcatenated.

If the input video stream is segmented into files that are not sequentially named with an integer index starting from 1, thenthe Multiple button should be used to open the Input File List box. From this box you can explicitly specify the name ofeach input file by clicking the Add button to open the Select Stream box. The order that the names appear in the File List isthe order in which MP2TSME will sequentially read the input stream. You would use this method, for example, if you wantto multiplex the files promo.mpv, trailer.mpv, and movie.mpv as one continuous stream. The first byte of the first file shouldbe a sequence_ header_ code, followed by the remainder of the sequence header (and any extensions), and then thepicture header for the first picture. The remaining files do not have to begin with a video start_code, however, the multipleinput files should make up a continuous video elementary stream when they are concatenated.

MP2TSME will give you an error and will not proceed if you try to run the Multiplexer without specifying an input videofile.

Rate

Data Formatnon-negative real number

Unitsbits per second

ValuesAutoMinimumSpecified (valid range is 100 to 1 000 000 000)

DefaultAuto

DescriptionThe Rate Parameter determines the bit rate that MP2TSME uses to multiplex this video elementary stream. A drop-downmenu offers three options: Auto, Minimum, and Specified.

If the Auto option is selected, then MP2TSME will use the bit rate that is encoded in the elementary stream syntax.

If the Minimum option is selected, MP2TSME will inspect the entire input video file and compute the actual minimum videorate. The Multiplexer will use this minimum rate when multiplexing the video stream.

The Minimum option may be necessary to multiplex poorly encoded AVC or VBR AVC, and also for reducing themaximum decode delay (by increasing the bit rate, the delay is reduced).

If the Specified option is selected, then the accompanying textbox will be enabled to allow entry of a value. The valueshould be a non-negative real number that specifies the desired bit rate in bits per second (bps). It may include fractionalbps. The valid range is 100 to 1 000 000 000. Setting the Rate value to 0 is equivalent to checking the Auto box. Bydefault, the Auto option is selected.

An explicit value for the Rate parameter should only be specified if a rate that is other than the encoded value must beused to overcome a defectively encoded stream.

QuadByte

Data Formatenumerated

ValuesYes (force quad byte alignment)No

DefaultStandard: NoCableLabs SD: Yes

CableLabs HD: No

Page 77: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 69

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DescriptionIf the value of the QuadByte Parameter is Yes, then the Multiplexer will force the data preceding each picture start code tobe quad-byte aligned when the video elementary stream is multiplexed. This modification is necessary to avoid an errorfound in some GI/Motorola DCT-2000 set top boxes. If the value is No, then quad-byte alignment will not be forced beforepicture start codes.

Comment

Data Formatstring

DescriptionThe Comment Parameter allows you to enter optional text comments when the current configuration is saved in a file. Thistext will appear as a comment block starting with the line immediately after the Video Subsection Title (e.g., Video1$) in thesaved configuration file. The text can have multiple lines. If the current configuration is loaded from a configuration file, theComment Parameter will display any comment lines that appear between the Video Subsection Title and the title of thenext section or subsection in the file.

Remultiplex Parameters

Remux Stream

Data Formatenumerated

ValuesNone (no remultiplexing)System/ProgramTransport

DefaultNone

DescriptionThe Remux Stream Parameter indicates if the video elementary stream is to be remultiplexed from an input system,program, or transport stream. The None option should be selected if the input file is not a multiplexed stream, but is thevideo elementary stream itself. If the input file is an MPEG-1 system stream or an MPEG-2 program stream containing thevideo elementary stream, then the System/Program option should be selected. The Transport option is used to indicatethat the input file is an MPEG-2 transport stream that contains the source video stream.

SourceStreamID

Data Formatnon-negative integer, decimal or hexadecimal

Range0x01 to 0xFF (255)

Default

disabledDescription

The SourceStreamID Parameter is only enabled if the Remux Stream Parameter is set to System/Program.SourceStreamID specifies the stream_id of the source video stream when the input file is an MPEG-1 system or MPEG-2program stream. The Multiplexer will extract the elementary stream associated with the specified stream_id from the inputsystem or program stream file, and remultiplex it in the output transport stream. The stream_id for MPEG video is typically0xE0. The valid range for the SourceStreamID value is 1 to 255.

SourceTSPID

Data Format

Page 78: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.070

Copyright © 1998 - 2010 Manzanita Systems, Inc.

non-negative integer, decimal or hexadecimalRange

1 to 8190 (0x0001 to 0x1FFE)Default

disabledDescription

The SourceTSPID Parameter is only enabled if the Remux Stream Parameter is set to Transport. SourceTSPID specifiesthe PID that carries the source video stream when the input file is an MPEG-2 transport stream. The Multiplexer willextract the elementary stream associated with the specified PID, and remultiplex it in the output transport stream. Thevalid range for the SourceTSPID value is 1 to 8190. The value may be specified in decimal, or if prefaced with a "0x", inhexadecimal.

DescFromData

Data Formatenumerated

ValuesYes (insert descriptors extracted from input stream)No

DefaultNo

DescriptionThe DescFromData Parameter is only enabled if the Remux Stream Parameter is set to Transport. If DescFromData isset to Yes, the Multiplexer will extract any descriptors that are associated with the video elementary stream in the inputtransport stream, and insert them in the appropriate output PMT, maintaining their association with the remultiplexedstream. If DescFromData is set to No, the Multiplexer will ignore any descriptors that pertain to the video stream in theinput transport stream.

If DescFromData is enabled, it will override any descriptor data defined by the Descriptors Parameter in theconfiguration for the video elementary stream. That is, the descriptors defined by the Descriptor Parameter will be ignoredand only descriptors extracted from the input transport stream that pertain to the video stream will be inserted in the outputPMT.

AVSync

Data Formatenumerated

ValuesYes No

Default Yes

DescriptionThe AVSync Parameter is only enabled if the Remux Stream Parameter is set to Transport. If AVSync is set to Yes andone or more transport streams are being remultiplexed, the audio-video synchronization is maintained across the filetransitions. This allows existing transport streams to be remultiplexed with the lip synch maintained in the new file. Thisfeature is useful for creating longer streams from trailers or multiple segments and also for remultiplexing existing transportstreams to correct PSI issues or multiplexing problems. All types of audio elementary streams are supported includingSMPTE 302M digital audio elementary streams.

If multiple transport streams are specified by the Files Parameter and the Remux Stream Parameter is enabled, the videois effectively concatenated. In this case, each input video elementary stream should begin with an I frame and end with acomplete picture.

To be effective, the AVSync Parameter must be set to Yes in both the Video and Audio configurations that have thesame input transport stream.

Page 79: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 71

Copyright © 1998 - 2010 Manzanita Systems, Inc.

PMT Parameters

StreamType

Data Formatnon-negative integer, decimal or hexadecimal

Range0 (determine automatically)0x01 to 0xFF (255)

DefaultAuto

DescriptionThe StreamType Parameter determines the value for the stream_type field that identifies this video elementary stream inthe PMT. If the Auto box is checked, then the Multiplexer will examine the input stream and assign a value of 0x01 if thestream is MPEG-1 video, 0x02 if it is MPEG-2 video, and 0x1B if it is H.264/AVC. If the Auto box is unchecked, then theaccompanying textbox will be enabled to allow entry of a value. The value should be an integer from 1 through 255 (0x01through 0xFF), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal. Setting theStreamType value to 0 is equivalent to checking the Auto box. By default, the Auto box is checked.

Descriptors

Data Formathexadecimal data

Rangeup to 32 descriptors

Defaultno descriptor data

DescriptionThe Descriptors Parameter specifies descriptor data that should be associated with this video elementary stream in thePMT. Up to 32 descriptors may be specified with the Descriptors Parameter. To enter descriptor data, click the Edit buttonto open the Descriptors List.

The Descriptors List is the interface used to define and edit the video elementary stream descriptors. A descriptor may beadded to the list as a sequence of hexadecimal byte values, or may be created using the Descriptor Generator. The listbox will display the hexadecimal data for each descriptor that is added as a separate entry. Use of the Descriptors List isdetailed in the section, Specifying Descriptors.

MP2TSME does not check the validity of the descriptor data that is specified.

If DescFromData is enabled for the video stream, it will override any descriptor data defined by the DescriptorsParameter. That is, the descriptors defined by the Descriptor Parameter will be ignored and only descriptors extractedfrom the input transport stream that pertain to the video stream will be inserted in the output PMT.

Transport Parameters

PID

Data Formatnon-negative integer

Range16 to 8190 (0x0010 to 0x1FFE)

DefaultStandard: See DescriptionCableLabs SD: 481 (0x01E1) for Video1 onlyCableLabs HD: 481 (0x01E1) for Video1 only

Description

Page 80: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.072

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The PID Parameter specifies the PID value used for transport packets that carry this video elementary stream. This PID isalso identified in the PMT as the video stream's elementary_PID. For a Standard configuration, the PID value can be set toany integer between 16 and 8190 (0x0010 and 0x1FFE), inclusive. The value may be specified in decimal, or if prefacedwith a "0x", in hexadecimal.

If a Standard configuration is selected, the PID assignment algorithm specified by ATSC is used for the first 3 videostreams (Video1, Video2, and Video3) in programs with ProgramNumber values 2 through 401. In this case, the defaultPID value is 16 * ProgramNumber + N, where N is the number that identifies the video elementary stream in the program. For example, the PID for the second video stream (Video2) in a program with a ProgramNumber of 3 would be assignedthe default value of 16 * 3 + 2 = 50 (0x0032). Any video streams inserted in a program after Video3 will be assigned thefirst available PID value between 6432 and 8190 (0x1920 and 0x1FFE), inclusive. Similarly, all video streams inserted inprograms with a ProgramNumber value greater than 401 will be assigned the first available value in the range 6432through 8190, inclusive.

If the default configuration is set for CableLabs SD or CableLabs HD, the default PID value used for Video1 in Program1 is481 (0x01E1) as required by the CableLabs VOD Specification. Although the CableLabs Specification only permits onevideo elementary stream in a single program, MP2TSME does not prevent additional video streams from being configured.The default PID value that is assigned to each additional video stream that is inserted in a CableLabs configuration isidentical to the Standard configuration default value.

TransportPriority

Data Formatenumerated

ValuesYes (set transport_priority to 1 in video packets) No

DefaultNo

DescriptionThe TransportPriority Parameter determines the value of the transport_priority bit that appears in all transport packets forthis video stream. If the TransportPriority value is Yes, then the transport_priority bit will be set to 1 in all packets. If it isNo, then the transport_priority will be set to 0.

Adaptation Parameters

InitDI

Data Formatenumerated

ValuesYes (set initial video discontinuity_indicator to 1) No

DefaultNo

DescriptionThe InitDI Parameter indicates if a discontinuity should be indicated in the first transport packet for the video elementarystream. If the Yes option is selected, then the discontinuity_indicator will be set to 1 in the initial video packet. If the Nooption is selected, no discontinuity will be indicated in the first packet.

The Multiplexer will always set the discontinuity_indicator in the first transport packet of the PCRPID. If the video PID isalso the PCRPID (as is the case with both Standard and CableLabs configurations), then the discontintuity_indicator in thefirst video packet will be set even if the InitDI Parameter is set to No.

RAI

Data Format

Page 81: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 73

Copyright © 1998 - 2010 Manzanita Systems, Inc.

enumeratedValues

Yes (set random_access_indicator to 1) No

DefaultStandard: NoCableLabs SD: YesCableLabs HD: Yes

DescriptionThe RAI Parameter is set to Yes if the random_access_indicator flag should have the value of one in every transportpacket for this video stream that contains the first byte of a sequence header. The Multiplexer will also insert a PCR in thispacket. For a CableLabs SD or CableLabs HD configuration, the RAI Parameter must always be set to Yes.

PCRGOP

Data Formatenumerated

ValuesYes (insert a PCR with start of GOP) No

Default No

DescriptionThe PCRGOP Parameter indicates if a PCR should be inserted in each transport packet containing the first byte of agroup_of_pictures (GOP) header. If the PCRGOP value is Yes, then every transport packet that contains the first byte of aGOP header will also carry a PCR. The parameter may only be used if the PID for this video elementary stream is also thePCR PID. The PCR spacing interval will be reset when a PCR is inserted in a packet with a GOP header even if theprevious PCR interval is less than the configured PCRper Parameter value. If PCRGOP is No, then the Multiplexer will notforce a PCR in packets containing a GOP header.

Splice

Data Formatenumerated

ValuesNone (no splice points)BeforeAfter

DefaultNone

DescriptionThe Splice Parameter indicates if splice points are to be inserted in packets for this video elementary stream. If the valueis Before, then a splice point is inserted in the packet containing the first byte of each I-frame. If the value is After, then asplice point is inserted after each I-frame. If Splice is set to None, then the Multiplexer will not insert splice points in thisvideo stream.

PES Parameters

PESalign

Data Formatenumerated

ValuesYes (align video access units to PES headers) No

Default

Page 82: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.074

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Standard: NoCableLabs SD: YesCableLabs HD: Yes

DescriptionThe PESalign Parameter indicates if every access unit in the video elementary stream should be aligned to a PES header.If the Yes option is selected, then the first byte of each PES packet payload is the first byte of an access unit. Thedata_alignment_indicator bit will also be set in the PES header. This type of alignment corresponds to an alignment_type of2 in the data_stream_alignment_descriptor. Note that this is the only alignment type supported by the Multiplexer.However, the Multiplexer does not automatically insert the data_stream_alignment_descriptor under these conditions; itmust be explicitly configured with the Video Descriptors Parameter. If the No option is selected, then the video access unitswill not be aligned to PES headers. For a CableLabs configuration, the PESalign parameter must always be set to Yes.

PEScopyrt

Data Formatenumerated

ValuesYes (copyright set to 1) No (copyright set to 0)

DefaultNo

DescriptionThe PEScopyrt Parameter sets the value of the copyright field that appears in all PES packet headers for this videoelementary stream. If the value of the PEScopyrt parameter is Yes, then the copyright field is set to 1. If the value is No,then the copyright field is set to 0.

PESid

Data Formatnon-negative integer, decimal or hexadecimal

Range0 (determine automatically)0x01 to 0xFF (255)

DefaultAuto

DescriptionThe PESid Parameter specifies the value for the stream_id field in PES packets that carry this video elementary stream. Ifthe Auto box is checked, then the Multiplexer will automatically assign a value of 0xE0 to the video PESid. If the Auto boxis unchecked, then the accompanying textbox will be enabled to allow entry of a value. The value should be an integer from1 through 255 (0x01 through 0xFF), inclusive. The MPEG standard assigns the values 0xE0 through 0xEF to thestream_id if the elementary stream is MPEG-1 or MPEG-2 video. The value may be specified in decimal, or if prefaced witha "0x", in hexadecimal. Setting the PESid value to 0 is equivalent to checking the Auto box.

stream_id_extension

Data Formatnon-negative integer, decimal or hexadecimal

Range0x00 to 0x7F

Defaultdisabled

DescriptionThe stream_id_extension Parameter is only enabled when the Auto box that accompanies the PESid Parameter isunchecked. This parameter specifies the value for the stream_id_extension field, when present, in PES packets that carrythis video elementary stream. The stream_id_extension field will only be encoded in the PES header if the stream_id hasthe value 0xFD. In other words, if the PESid Parameter is set to 0xFD, then the Multiplexer will use the value specified forthe stream_id_extension Parameter as the value of the PES stream_id_extension. If a value other than 0xFD is assignedto the PESid Parameter, then the Multiplexer ignores the stream_id_extension Parameter.

Page 83: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 75

Copyright © 1998 - 2010 Manzanita Systems, Inc.

PESnau

Data Formatnon-negative decimal integer

Unitsaccess units/PES header

Range1 to 100

Default1

DescriptionThe PESnau Parameter specifies the frequency of video access units relative to the frequency of PES headers. Forexample, if the PESnau Parameter is set to 3, then the Multiplexer will insert a PES header every third video access unit.The value must be an integer between 1 and 100, inclusive. Setting PESnau to a value of 1 will insert a PES header beforeevery access unit.

PESpri

Data Formatenumerated

ValuesYes (PES_priority set to 1) No (PES_priority set to 0)

DefaultNo

DescriptionThe PESpri Parameter indicates the state of the PES_priority field that appears in all PES headers for this videoelementary stream. If the value is Yes, then the PES_priority field in all PES headers will be set to 1. The default value forboth Standard and CableLabs configurations is No, which assigns the PES_priority a value of 0.

PESorig

Data Formatenumerated

ValuesYes (original_or_copy set to 1) No (original_or_copy set to 0)

DefaultNo

DescriptionThe PESorig Parameter indicates the state of the original_or_copy field that appears in all PES headers for this videoelementary stream. If the value is Yes, then the original_or_copy field in all PES headers will be set to a value of 1.Setting PESorig to No will set the original_or_copy field a value of 0.

PTSnPES

Data Formatnon-negative decimal integer

UnitsPES headers/time stamp

Range1 to 60

Default1

DescriptionThe PTSnPES Parameter specifies the frequency of PES headers relative to the frequency of time stamps for this video

Page 84: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.076

Copyright © 1998 - 2010 Manzanita Systems, Inc.

elementary stream. For example, if the PTSnPES Parameter is set to 2, then the Multiplexer will insert a PTS (and ifnecessary a DTS) in every second PES header. The value should be an integer between 1 and 60, inclusive. The defaultvalue for both Standard and CableLabs configurations is 1, which is to have a time stamp in every PES header.

MaxPESlen

Data Formatnon-negative integer

Unitsbytes

Range0 (no limit)184 to 2 000 000 000

DefaultNo limit

DescriptionThe MaxPESlen Parameter determines the maximum PES packet payload for the video stream. If the No limit box ischecked, then the Multiplexer will not force a limit on the PES packet payloads; the video PES packets will be created onlyas specified by the PESnau Parameter. If the No limit box is unchecked, then the accompanying textbox will be enabled toallow entry of the desired maximum payload in bytes. The value should be an integer between 184 through 2 000 000 000,inclusive. If the video PES packet size is going to exceed this value, then the Multiplexer will truncate the payload andinsert a new PES header. This feature is intended for use by decoders that can not handle the large PES packets that arefrequently created with video streams. Setting the MaxPESlen value to 0 is equivalent to checking the No limit box. Thedefault value for both Standard and CableLabs configurations is No limit.

PESPrivateDataFile

Data Formatpathname or filename string

Defaultnone

DescriptionThe PESPrivateDataFile Parameter specifies the name of an input file that contains private data that is to be inserted intothe video PES headers. The file name can be edited directly in the textbox, or you can click the browse button to select thelocation and name of input file on your system.

The input file must be in a specific format that is defined by Manzanita Systems as described in the section, PES PrivateData File Format. The file is organized as a sequence of data entries. Each entry includes fields that indicate the time oraccess unit index in which the data is to be inserted, and whether the data is to be carried in the 16-byte pes_private_datafield or in the reserved bytes following the PES_extension_flag_2. Note that the two insertion modes may be mixed withinthe input file.

Timing Parameters

FrameRate

Data Formatenumerated

ValuesAuto (use encoded frame rate)23.976, 24, 25, 29.97, 30, 50, 59.94, 60

DefaultAuto

Description

Page 85: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 77

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The FrameRate Parameter determines the frame rate that the Multiplexer uses to multiplex this video elementary stream. Ifthe Auto is selected, then the Multiplexer will use the frame rate that is encoded in the elementary stream syntax. TheAuto setting should normally be used, however, AVC (H.264) video streams may not be encoded with frame rateinformation. In this case, one of several discrete frame rates may be selected.

When the Multiplexer is run, an error will be issued if an AVC stream does not contain frame rate information and theFrameRate is set to Auto.

If the FrameRate Parameter is set to a value that overrides the frame rate in the video elementary stream syntax, theresulting transport stream will be illegal.

FrameRateTolerant

Data Formatenumerated

ValuesYes No

DefaultNo

DescriptionThe FrameRateTolerant Parameter is only applicable to AVC/H.264 video elementary streams. Unlike MPEG-2, AVCexpresses frame rates as a ratio, allowing any rate to be specified. Some AVC encoders may be configured to use astandard frame rate, but incorrectly represent it in the syntax. This problem can be corrected by setting theFrameRateTolerant Parameter to Yes. In this case, if the encoded frame rate is close to a standard frame rate, then theMultiplexer will use the standard frame rate when multiplexing instead of the "non-standard" rate.

If the FrameRateTolerant Parameter is set to No, then the Multiplexer will use the frame rate that is encoded in the videostream.

NotLowDelay

Data Formatenumerated

ValuesYes No

DefaultNo

DescriptionThe NotLowDelay Parameter tells the Multiplexer that the video stream will not be a low_delay stream. Normally theMultiplexer examines the beginning of the stream for the presence of any B-frames or for the low_delay flag. If B-framesare seen, then the stream is not a low_delay stream and the timing must be created differently than for a stream withoutany B-frames. In H.264 video streams, the low_delay flag may not be present, and often B-frames may not be encodeduntil much late in the stream. In this case the Multiplexer may erroneously assume that B-frames are not present and uselow_delay timing. The NotLowDelay Parameter allows the operator to force the Multiplexer to use timing appropriate forstreams with B-frames, even if there are none in the beginning of the stream. This parameter is only required to multiplexsome H.264 video streams. The Multiplexer will issue a warning if NotLowDelay should have been enabled.

IgnorePOC

Data Formatenumerated

ValuesYes No

DefaultNo

DescriptionThe IgnorePOC Parameter is only applicable to H.264 video elementary streams. H.264 video may contain many different

Page 86: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.078

Copyright © 1998 - 2010 Manzanita Systems, Inc.

pieces of information indicating the timing required for multiplexing. One of these is the Picture Order Count (POC). Insome cases a faulty encoder may put bad values in the stream, and the POC is unreliable. If the Multiplexer creates astream that does not play well, the problem may be fixed by rerunning the Multiplexer with the IgnorePOC Parameter setto Yes. The Multiplexer will then use information other than the POC to determine the picture timing.

MaxDecodeDelay

Data Formatnon-negative decimal integer

Units90 kHz clock cycles

Range0 to 900 000

Defaultdisabled

DescriptionThe MaxDecodeDelay Parameter limits the difference between the PTS and the PCR. If the Limit Decode Delay box ischecked, then the accompanying textbox will be enabled to allow entry of the desired maximum decode delay in units of 90kHz clock cycles. The value should be an integer with a valid range of 0 to 900 000 (10 seconds), inclusive. By default,the Limit Decode Delay box is unchecked. In this case, the decode delay is limited to 10 seconds (900 000 clock cycles)for AVC / H.264 video and one (1) second for all other types of video.

This parameter is primarily intended for use with H.264 video when the maximum ten second decode delay would resultin streams with unacceptable characteristics, e.g., excessive stream latency or acquisition time.

DBsize

Data Formatnon-negative decimal integer

Unitsbytes

Range0 (use MPEG-2 T-STD model)1 to 1 000 000 000

DefaultSTD

DescriptionThe DBsize Parameter determines the size of the decoder buffer for this video elementary stream. If the STD box ischecked, then the video decoder buffer size is based on the MPEG-2 T-STD model. If the STD box is unchecked, then theaccompanying textbox will be enabled to allow entry of the desired video buffer size in bytes. The value should be aninteger between 1 through 1 000 000 000, inclusive. Setting the DBsize value to 0 is equivalent to checking the STD box.

StreamDelay

Data Formatnon-negative decimal integer

Units90 kHz clock cycles

Range0 to 2 000 000 000

Default0

DescriptionThe StreamDelay Parameter specifies the length of time that the video elementary stream should be delayed from thebeginning of the program. The units for the value are 90 kHz clock cycles. The value must be an integer between 0 and 2000 000 000. This option is normally used to achieve lip sync when the various elementary streams in the multiplex werenot encoded beginning at the same time. For example, if the video timing is leading the audio timing, then the insertion ofthe video elementary stream could be delayed to align it with the audio stream.

If PCRs are carried in the video PID, there will not be any PCRs at the beginning of the transport stream if the video

Page 87: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 79

Copyright © 1998 - 2010 Manzanita Systems, Inc.

stream is delayed by the StreamDelay parameter.

IndDelay

Data Formatenumerated

ValuesYes (independent initial delay) No (initial delay set by Video1 stream)

DefaultNo

DescriptionThe IndDelay Parameter has no effect on the first video elementary stream that is configured in the program (Video1). When the value is set to Yes for a secondary video elementary stream, then its initial delay will be independent of all otherelementary streams in the program. Normally the first video stream sets when all subsequent elementary streams in theprogram will be decoded. This insures that all elementary streams in the program are aligned in presentation time. Sometimes this alignment can cause problems if the first video stream uses a very short delay, or its delay adverselyaffects the decoding of other video streams in the programs. In such a case, the IndDelay Parameter may be set to Yesfor the secondary video streams. In this case, the initial delay of the secondary video streams are set according to theTypeDelay Parameter plus the value of the Delay Parameter. If the IndDelay Parameter is set to No, the secondary videostream will not have an independent initial delay.

TypeDelay

Data Formatenumerated

ValuesVBV (use vbv_delay for initial delay) Max (use maximum initial delay)

DefaultVBV

DescriptionThe TypeDelay Parameter is only effective if this is the first video elementary stream in the program (Video1), or if theIndDelay Parameter is set to Yes. The value of Max indicates that the video stream's initial delay should be set to themaximum possible length. This delay would cause the decoder FIFO to fill to a maximum prior to the initial DTS. Use ofthis parameter may be necessary for video streams that do not have valid vbv_delay values, resulting in an underflow ofthe decoder. In this case, it is best to fill the decoder and rely on MP2TSM's model of the decoder to keep the decoder full.The value of VBV indicates that the initial delay should be set by the vbv_delay field from the first picture in the videoelementary stream.

For AVC/H.264 video, the Multiplexer will use the initial_CPB_removal_delay, when present, if the setting is VBV. IfTypeDelay is set to Max, the Multiplexer will use a maximum delay of 10 seconds, unless this limit is overridden with theMaxDecodeDelay Parameter.

The default value for all other types of video is VBV.

Delay

Data Formatinteger

Units90 kHz clock cycles

Range-90 000 to 90 000

Default0

DescriptionThe Delay Parameter represents an additional delay that is added to the precomputed initial delay for the first picture in thevideo stream. The units for the value are 90 kHz clock cycles. The value must be an positive or negative integer thatranges from -90 000 to 90 000, inclusive. The initial delay is used as the presentation time stamp (PTS) for the first picture.Normally, all elementary streams within a program are configured to have the same initial PTS, that of the first video

Page 88: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.080

Copyright © 1998 - 2010 Manzanita Systems, Inc.

elementary stream (Video1). This will insure that there are no lip sync problems, assuming all source material was alignedwhen encoded. In cases where there is a decoder buffer underflow early in the stream, the Delay Parameter can be set toallow more time for data to arrive in the decoder.

Priority

Data Formatenumerated

ValuesYes (give video packets multiplexing priority) No

DefaultNo

DescriptionThe Priority Parameter indicates if transport packets for this video stream should be inserted into the multiplex with minimaljitter. This option should not normally be used on a video stream. If the Priority Parameter is set to Yes, then the packetsfor this video stream are given priority when multiplexed. If the Priority Parameter is set to No, then the Multiplexer will notuse a higher multiplexing priority for the video stream.

SBrate

Data Formatnon-negative decimal integer

Unitsbits per second

Range0 to 1 000 000 000

Default0

DescriptionThe SBrate Parameter specifies the drain rate of the smoothing buffer for this video elementary stream. The value mustbe a non-negative integer representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000, inclusive. If a smoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given. If theSBRate Parameter is set to 0, then a smoothing buffer will not be indicated for the video stream.

SBsize

Data Formatnon-negative decimal integer

Unitsbytes

Range0 to 1 000 000 000

Default0

DescriptionThe SBsize Parameter specifies the size of the smoothing buffer for this video elementary stream. The value must be anon-negative integer representing the buffer size in bytes. The valid range is 0 to 1 000 000 000, inclusive. If a smoothingbuffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given. If the SBsize Parameteris set to 0, then a smoothing buffer will not be indicated for the video stream.

StartSeqHdr

Data Formatenumerated

ValuesYes (trim to first sequence header) No

Page 89: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 81

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DefaultNo

DescriptionThe StartSeqHdr Parameter is set to Yes if the input video stream should be modified by deleting all data up to the firstsequence header or IDR picture. The Multiplexer expects video data to begin with a sequence header and at thebeginning of a complete picture. This parameter may be used to trim input streams that do not start cleanly. If theStartSeqHdr Parameter is set to No, then the beginning of the input video stream will not be modified.

StrictVBV

Data Formatenumerated

ValuesYes No

DefaultNo

DescriptionThe StrictVBV Parameter is set to Yes to indicate that the video elementary stream should be inserted into the transportstream by strictly positioning each picture according to the vbv_delay field at the beginning of the picture header. Thisparameter can only be used if the video elementary stream is constant bit rate. If the StrictVBV Parameter is set to No,then the video will not be inserted strictly according to the vbv_delay values.

StillPicOffset

Data Formatnon-negative decimal integer

Unitsvideo frame times

Range0 to 65 535

Default0

DescriptionWhen the input video stream is coded for still pictures, the StillPicOffset Parameter specifies the minimum PTS offset foreach video picture relative to the PCR. The value is a non-negative integer that indicates the offset as a number of videoframe times. A value of 10, for example, would force all PTS values in the stream to be at least 10 picture times after thecurrent PCR when the picture is begun to be sent. The StillPicOffset should be set to allow the largest picture to arrive inthe decoder prior to the PTS equaling the PCR value. This feature allows streams that consist of only I-picture sequencesto be sent at low rates resulting in a slide show effect. The valid range for the StillPicOffset value is 0 to 65 535, inclusive.If the StillPicOffset Parameter is set to 0, then the Multiplexer will not force a minimum PTS offset.

RateAdjustment

Data Formatdecimal integer

Unitsbps

Range-1 000 000 to 1 000 000

Default0

DescriptionThe RateAdjustment Parameter specifies an adjustment to the bit rate that is encoded in the video elementary streamsyntax. The Multiplexer adds or subtracts this adjustment, and uses the resulting bit rate when multiplexing the videostream. The value for RateAdjustment is specified in bps, and the valid range is -1 000 000 to 1 000 000, inclusive. Thedefault value is 0.

The RateAdjustment Parameter can be used to boost the rate of AVC/H.264 video to compensate for a poor rate

Page 90: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.082

Copyright © 1998 - 2010 Manzanita Systems, Inc.

control algorithm in the encoder. However, the resulting stream may not be legal, although it may well work on alldecoders. Ideally, the encoder should be redesigned with accurate rate control.

Closed Captions Parameters

CreateDTVCC

Data Formatenumerated

ValuesYes No

DefaultNo

DescriptionThe CreateDTVCC Parameter is set to Yes to enable the Multiplexer to synthesize and insert DTVCC (specified byCEA-708-C, commonly referred to as 708) data in the video stream. The source for the inserted DTVCC data depends onwhether the SCCFile Parameter is used to specify an input closed caption data file.

If the SCCFile Parameter is not used, the Multiplexer will use any analog-compatible captions that it finds in the input videoas the source for the DTVCC data. In this case, the original A/53 608 or DVS157 (SCTE 20) source data will be left in thestream.

If the SCCFile Parameter specifies the name of an input file, then the Multiplexer will synthesize DTVCC data from thesource data, and insert both DTVCC and A/53 608 caption data in the multiplexed video. In this case, any A/53 608caption data that is in the input video will be replaced by the A/53 608 data that is sourced by the SCCFile.

In both of the preceding cases, any DVS157 (SCTE 20) data that is present in the input video stream is not removed orreplaced, and is still present in the multiplexed video.

The default value for CreateDTVCC is No, which configures the Multiplexer not to insert DTVCC data in the video stream.

SCCFile

Data Formatpathname or filename string

Defaultnone

DescriptionThe SCCFile Parameter specifies the name of an input closed caption data file. The file name can be edited directly in thetextbox, or you can click the browse button to select the location and name of input file on your system. The file must be atext file that is in one of the following formats:

· Scenarist_SCC V1.0 format

· Computer Prompting and Captioning Company's MCC format

· Simplified SCC format (described in the section Input Closed Caption Data Format)

The closed caption data is inserted in the video stream as specified by ATSC A/53 608 and/or DTVCC (commonly referredto as 708). The CreateDTVCC, CCField, and CCTimeOffset Parameters configure the insertion of the data.

Any DVS157 (SCTE 20) data that is present in the input video stream is not removed or replaced, and is still present inthe multiplexed video.

CCField

Data Formatenumerated

ValuesFirst

Page 91: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 83

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Second Default

disabledDescription

The CCField Parameter is only enabled if an input closed caption data file is specified using the SCCFile parameter. If the First option is selected, then the Multiplexer will encode the closed caption data for insertion on the first field (channelsCC1, CC2). If Second is selected, then the data is encoded for the second field (channels CC3, CC4).

CCTimeOffset

Data FormatDrop Frame Time Code (HH:MM:SS;FF)Non-Drop Frame Time Code (HH:MM:SS:FF)

Range00:00:00:00 to 24:00:00:00

Defaultdisabled

DescriptionThe CCTimeOffset Parameter is only enabled if an input closed caption data file is specified using the SCCFile parameter.If the timecodes in the SCCFile have an offset relative to the timecodes in the video stream, the CCTimeOffset Parametercan be used to align the captions with the video. The CCTimeOffset value is specified in either HH:MM:SS:FF (NDFTC) orHH:MM:SS;FF (DFTC) format. The Multiplexer will subtract the specified CCTimeOffset value from each closed captioninsertion time that it computes, and insert the closed caption data in the video stream at this new insertion time.

Page 92: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.084

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.1.14.1 PES Private Data File Format

The Multiplexer supports insertion of private data in the PES headers of video and audio streams. The data must be provided ina text file that is in a specific format. The file is organized as a sequence of data entries. Each entry must have the followingsyntax:

type time count mode data

Five fields are required in each entry as defined below:

Name Valid Values Description

type time | index The type field must be assigned either the value time or index. time specifies that the data in the entry should be inserted at aspecific PTS time in the elementary stream. index specifies that thedata is to be inserted based on an index to a particular access unit inthe elementary stream.

time double | non-negativeinteger

If type = time, then the value is a time in seconds that is expressedin fixed or floating point. The data will be inserted in the PES headerthat carries a PTS value that is equal to or greater than the specifiedtime. If type = index, then the value is a non-negative integer thatspecifies the position of an access unit in the elementary stream,where the first access unit in the stream has an index equal to 1. Inthis case, the data will be inserted in the PES header that precedesthe start of the specified access unit.

count non-negative integer The count field specifies the number of times that the data is to beinserted. If count is set to zero, then the data will be inserted in eachsuccessive PES header until the specified time of the next entry isreached.

mode 0 | 1 If mode = 0, then the data will be carried in the 16-bytepes_private_data field in the PES header. If fewer than 16 bytes arespecified, then the remaining bytes in the field will be zero. If mode =1, then the data is carried in the reserved bytes created when thePES_extension_flag_2 is set. This field may be up to 127 bytes inlength. For either mode, if more data is supplied than is supported,an error will be reported.

data byte list The data field specifies the sequence of data bytes that are to beinserted. The data is expressed as a list of hex byte valuesseparated by white space.

The two insertion modes may be mixed within a given PES private data file.

A typical PES private data file might begin something like:

time 1.5 0 0 55 aa 55 aaindex 455 3 1 11 cf

In this example, the four data bytes (0x55, 0xAA, 0x55, 0xAA) in the first entry will be inserted in the pes_private_data field ofthe first PES header that carries a PTS that is greater than or equal to 1.5 seconds. The data will be inserted in eachsubsequent PES header until the 455th access unit in the elementary stream. The two data bytes (0x11, 0xCF) in the secondentry will be inserted following the PES_extension_flag_2 in the PES header preceding the 455 access unit. The data will alsobe inserted in the next two PES headers.

Page 93: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 85

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.1.15 Setting Audio Parameters

MP2TSME allows you to configure up to 64 audio elementary streams in each program. The audio streams may be anycombination of MPEG-1, MPEG-2, Advanced Audio Coding (AAC), Dolby AC-3, DTS, Enhanced AC-3, or MPEG-4 (HE-AACand HE-AAC version 2) audio encoded elementary streams.

Each audio stream that you insert into a program will appear as a new entry under the appropriate Program entry in theMultiplex Pane. The audio streams are identified with a sequentially numbered label as they are added, i.e., Audio1, Audio2,etc.

The CableLabs VOD Specification allows up to two audio elementary streams in the transport stream, but requires that theyare encoded as Dolby AC-3. However, even if you have used a CableLabs SD or CableLabs HD default configuration,MP2TSME does not verify that the number or encoding of the input elementary streams meet the specification.

The title of the Parameters Dialog Box that is associated with a given audio stream will have both program and audio identifiers,e.g., "Program2 Audio1 Parameters". The Audio Parameters Dialog Box lists the configuration parameters that are specific forthe audio stream. These parameters define the input audio elementary stream, specify how the audio stream is identified in themultiplex, configure encoding of the audio packets and PES headers, and determine audio buffering and delays.

If the Audio Parameters Dialog Box is for a new multiplex configuration, the parameter settings depend upon whether you haveselected Standard, CableLabs SD, or CableLabs HD as the default configuration. You should review these default values andmodify them if necessary for your application before running the Multiplexer.

If the CableLabs SD or CableLabs HD default configuration is selected, MP2TSME will use initial settings that are compliantwith the CableLabs VOD Specification, however, it does not verify compliance if changes have been made to the configurationbefore running the Multiplexer.

The only Audio parameter that you must explicitly set to run the Multiplexer is the Files Parameter. If the audio elementarystream was inserted in the current configuration with the Insert File command or with a drag-and-drop operation, the FilesParameter will already be set to the name of the input audio file. However, if the Audio Parameters Dialog Box is for a newconfiguration with CableLabs SD or HD defaults, or the audio stream was inserted using the Insert Audio command, the FilesParameter will initially be blank. You must set it to the name of an input audio file or the Multiplexer will give you an error. Aquick method for doing this is to drag-and-drop the input file from a graphical file system browser/explorer onto the Audio entryin the Multiplex Pane.

In some cases, the audio stream to be multiplexed is not saved as an elementary stream file, but is instead part of an existingsystem, program, VOB, or transport stream multiplex. MP2TSME also excepts a multiplexed file as the source for a audioelementary stream, extracting and remultiplexing the data into a new output transport stream in one step. The section, Remultiplexing, further discusses the procedure for configuring MP2TSME to remultiplex.

The Audio parameters are divided into seven functional categories as listed below:

Input Remultiplex PMT Transport

Files Remux Stream StreamType PID

Rate SourceStreamID Descriptors TransportPriority

Comment SourceStreamSubtype

SourceTSPID

DescFromData

AVSync

TransitionCleanUp

Page 94: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.086

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Adaptation PES Timing

InitDI PESalign Decoder Buffer

RAI PEScopyrt DBsize

PESid StreamDelay

stream_id_extension IndDelay

PESnau Delay

PESpri Priority

PESorig SBrate

PTSnPES SBsize

PESPrivateDataFile SkipFrames

The Audio Parameters Dialog Box has seven button bars, one for each of the seven categories. The parameters under a givencategory appear below the associated button bar, which can be opened or collapsed with a single mouse click.

The rest of this section describes each Audio parameter in detail.

Input Parameters

Files

Data Formatpathname or filename string

Defaultnone

DescriptionThe Files Parameter specifies the name of the source of the input audio elementary stream. If you inserted the audiostream into the configuration using drag-and-drop or with the Insert File command on the Tool Bar or Menu Bar, then thepathname of the input file will be displayed in the Files textbox. To change the input file, the pathname can be edited

directly in the textbox or you can click the button to browse your system to select the location and name of a differentinput file.

The input file can be an MPEG (Layer I, II or III), AAC (Advanced Audio Coding), Dolby AC-3, DTS, Enhanced AC-3, orMPEG-4 (HE-AAC) audio elementary stream in binary format. The first byte of the file should be the first byte of an audioframe, and the file should contain an integral number of frames. The Multiplexer will determine the audio encoding method(e.g., MPEG, AAC, or AC-3) and bitrate from the stream’s syntax.

The input file may also be a system, program, unencrypted Video Object file, or transport stream that contains the audioelementary stream to be remultiplexed. In this case, the appropriate Remultiplex Parameters must also be specified.

The two-character string %i can be used in the specified name if the input stream is segmented into multiple files that aresequentially named. The %i string represents an integer index that begins with 1. For example, if the input stream iscontiguously segmented into four files named part1.mpa, part2.mpa, part3.mpa, and part4.mpa, the filename used for FilesParameter is part%i.mpa. The Multiplexer will look for a sequence of input files in the specified path starting with part1.mpa, and multiplex them as one continuous audio stream. It will stop multiplexing when it reaches the last file name in thesequence. The first byte of the first file should be the first byte of an audio frame. The remaining files do not have to beginwith the start of an audio frame, i.e., the audio elementary stream does not have to segmented on access unit boundaries.However, the multiple input files should make up a continuous audio elementary stream when they are concatenated.

If the input audio stream is segmented into files that are not sequentially named with an integer index starting from 1, thenthe Multiple button should be used to open the Input File List box. From this box you can explicitly specify the name ofeach input file by clicking the Add button to open the Select Stream box. The order that the names appear in the File List isthe order in which MP2TSME will sequentially read the input stream. You would use this method, for example, if you wantto multiplex the files promo.mpa, trailer.mpa, and movie.mpa as one continuous stream. The first byte of the first file should

Page 95: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 87

Copyright © 1998 - 2010 Manzanita Systems, Inc.

be the first byte of an audio frame. The remaining files do not have to begin with the start of an audio frame, i.e., the audioelementary stream does not have to segmented on access unit boundaries. However, the multiple input files should makeup a continuous audio elementary stream when they are concatenated.

MP2TSME will give you an error and will not proceed if you try to run the Multiplexer without specifying an audio Filesparameter.

Rate

Data Formatnon-negative real number

Unitsbits per second

Range0 (use encoded bit rate)1 to 60 000 000

DefaultStandard: AutoCableLabs SD: AutoCableLabs HD: Auto

DescriptionThe Rate Parameter determines the maximum rate in bits per second that should be used for this audio elementarystream. If the Auto box is checked, then the Multiplexer will use the bit rate that is encoded in the audio elementary streamsyntax. If the Auto box is unchecked, then the accompanying textbox will be enabled to allow entry of a value. The valueshould be a non-negative real number that specifies the desired bit rate in bits per second (bps). The valid range is 1 to 60000 000 bps, inclusive. It may include fractional bps. Setting the Rate value to 0 is equivalent to checking the Auto box.

An explicit value for the Rate parameter should only be specified if a rate that is other than the encoded value must beused to overcome a defectively encoded stream.

The Multiplexer will continue to protect the decoder FIFO in spite of a higher than appropriate rate. However, using arate that is too low will result in decoder buffer underflow. The Multiplexer can not prevent this from happening.

Comment

Data Formatstring

DescriptionThe Comment Parameter allows you to enter optional text comments when the current configuration is saved in a file. Thistext will appear as a comment block starting with the line immediately after the Audio Subsection Title (e.g., Audio1$) in thesaved configuration file. The text can have multiple lines. If the current configuration is loaded from a configuration file, theComment Parameter will display any comment lines that appear between the Audio Subsection Title and the title of thenext section or subsection in the file.

Page 96: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.088

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Remultiplex Parameters

Remux Stream

Data Formatenumerated

ValuesNone (no remultiplexing)System/ProgramVOBTransport

DefaultStandard: NoneCableLabs SD: NoneCableLabs HD: None

DescriptionThe Remux Stream Parameter indicates if the audio elementary stream is to be remultiplexed from an input system,program, or transport stream. The None option should be selected if the input file is not a multiplexed stream, but is theaudio elementary stream itself. If the input file is an MPEG-1 system stream or an MPEG-2 program stream containing theaudio elementary stream, then the System/Program option should be selected. The VOB option indicates that the audiostream is multiplexed in an unencrypted Video Object file. The Transport option is used to indicate that the input file is anMPEG-2 transport stream that contains the source audio stream.

SourceStreamID

Data Formatnon-negative integer, decimal or hexadecimal

Range0x01 to 0xFF (255)

DefaultStandard: disabledCableLabs SD: disabledCableLabs HD: disabled

DescriptionThe SourceStreamID Parameter is only enabled if the Remux Stream Parameter selects System/Program. SourceStreamID specifies the stream_id of the source audio stream when the input file is an MPEG-1 system or MPEG-2program stream. The Multiplexer will extract the elementary stream associated with the specified stream_id from the inputsystem or program stream file, and remultiplex it in the output transport stream. The stream_id is typically 0xC0 for MPEGaudio and 0xBD for AC-3 audio. The valid range for the SourceStreamID value is 0x01 to 0xFF (255), inclusive.

SourceStreamSubtype

Data Formatnon-negative integer, decimal or hexadecimal

Range0x01 to 0xFF (255)

DefaultStandard: disabledCableLabs SD: disabledCableLabs HD: disabled

DescriptionThe SourceStreamSubtype Parameter is only enabled if the Remux Stream Parameter is set to VOB.SourceStreamSubtype specifies the subtype that is assigned to the source audio stream in the input VOB file. In this case,the audio stream must be encoded as Dolby AC-3 and the VOB must be unencrypted. Most DVDs use subtype valuesstarting at 0x80 for AC-3 audio. The SourceStreamSubtype value should be a non-negative integer in the range 0x01 to

Page 97: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 89

Copyright © 1998 - 2010 Manzanita Systems, Inc.

0xFF (255), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

SourceTSPID

Data Formatnon-negative integer, decimal or hexadecimal

Range1 to 8190 (0x0001 to 0x1FFE)

DefaultStandard: disabledCableLabs SD: disabledCableLabs HD: disabled

DescriptionThe SourceTSPID Parameter is only enabled if the Remux Stream Parameter is set to Transport. SourceTSPID specifiesthe PID that carries the source audio stream when the input file is an MPEG-2 transport stream. The Multiplexer willextract the elementary stream associated with the specified PID, and remultiplex it in the output transport stream. Thevalid range for the SourceTSPID value is 1 to 8190. The value may be specified in decimal, or if prefaced with a "0x", inhexadecimal.

DescFromData

Data Formatenumerated

ValuesYes (insert descriptors extracted from input stream)No

DefaultStandard: NoCableLabs SD: NoCableLabs HD: No

DescriptionThe DescFromData Parameter is only enabled if the Remux Stream Parameter is set to Transport. If DescFromData isset to Yes, the Multiplexer will extract any descriptors that are associated with the audio elementary stream in the inputtransport stream, and insert them in the appropriate output PMT, maintaining their association with the remultiplexedstream. If DescFromData is set to No, the Multiplexer will ignore any descriptors that pertain to the audio stream in theinput transport stream.

If DescFromData is enabled, it will override any descriptor data defined by the Descriptors Parameter in theconfiguration for the audio elementary stream. That is, the descriptors defined by the Descriptor Parameter will be ignoredand only descriptors extracted from the input transport stream that pertain to the audio stream will be inserted in the outputPMT.

AVSync

Data Formatenumerated

ValuesYes No

DefaultStandard: YesCableLabs SD: YesCableLabs HD: Yes

DescriptionThe AVSync Parameter is only enabled if the Remux Stream Parameter is set to Transport. If AVSync is set to Yes andone or more transport streams are being remultiplexed, the audio-video synchronization is maintained across the filetransitions. This allows existing transport streams to be remultiplexed with the lip synch maintained in the new file. Thisfeature is useful for creating longer streams from trailers or multiple segments and also for remultiplexing existing transportstreams to correct PSI issues or multiplexing problems. All encoding types of audio elementary streams are supported

Page 98: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.090

Copyright © 1998 - 2010 Manzanita Systems, Inc.

including SMPTE digital audio.

If multiple transport streams are specified by the Files Parameter and the Remux Stream Parameter is enabled, the audiois effectively concatenated. In this case, the input audio elementary streams should begin and end with a complete audioframe, however, the TransitionCleanUp Parameter can be enabled if this not the case.

To be effective, the AVSync Parameter must be set to Yes in both the Video and Audio configurations that have thesame input transport stream.

TransitionCleanUp

Data Formatenumerated

ValuesYes No

DefaultStandard: YesCableLabs SD: YesCableLabs HD: Yes

DescriptionThe TransitionCleanUp Parameter is only enabled if the Remux Stream Parameter is set to Transport. If multiple transportstreams files are being remultiplexed and the audio does not begin and end cleanly in each file (i.e., on audio frameboundaries), then there will be a loss of audio sync at the transitions. The TransitionCleanup Parameter should be set to Yes to tell the multiplexer to clean up (delete) any partial audio frames at each file transition.

PMT Parameters

StreamType

Data Formatnon-negative integer, decimal or hexadecimal

Range0 (determine automatically)0x01 to 0xFF (255)

DefaultStandard: AutoCableLabs SD: AutoCableLabs HD: Auto

DescriptionThe StreamType Parameter determines the value for the stream_type field that identifies this audio elementary stream inthe PMT. If the Auto box is checked, then the Multiplexer will examine the input stream and assign a value of 0x03 forMPEG-1 audio, 0x04 for MPEG-2 audio, 0x06 for DTS, 0x0F for AAC, 0x81 for AC-3, 0x87 for E-AC-3, or 0x11 forMPEG-4 audio (HE-AAC). If the Auto box is unchecked, then the accompanying textbox will be enabled to allow entry of avalue. The value should be an integer from 1 through 255 (0x01 through 0xFF), inclusive. The value may be specified indecimal, or if prefaced with a "0x", in hexadecimal. Setting the StreamType value to 0 is equivalent to checking the Autobox.

Descriptors

Data Formathexadecimal data

Rangeup to 32 descriptors

DefaultStandard: no descriptor dataCableLabs SD: AC-3 Registration Descriptor (0x05), ISO 639 Language Descriptor (0x0A), AC-3 Audio Descriptor (0x81)

Page 99: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 91

Copyright © 1998 - 2010 Manzanita Systems, Inc.

CableLabs SD: AC-3 Registration Descriptor (0x05), ISO 639 Language Descriptor (0x0A), AC-3 Audio Descriptor (0x81)Description

The Descriptors Parameter specifies descriptor data that should be associated with this audio elementary stream in thePMT. Up to 32 descriptors may be specified with the Descriptors Parameter. To enter descriptor data, click the Edit buttonto open the Descriptors List.

The Descriptors List is the interface used to define and edit the audio elementary stream descriptors. A descriptor may beadded to the list as a sequence of hexadecimal byte values, or may be created using the Descriptor Generator. The listbox will display the hexadecimal data for each descriptor that is added as a separate entry. Use of the Descriptors List isdetailed in the section, Specifying Descriptors.

By default, no audio descriptors are defined for the Standard configuration. If a CableLabs configuration is used, an AC-3Registration Descriptor, an ISO 639 Language Descriptor, and an AC-3 Audio Descriptor are defined by default for Audio1as required by the CableLabs VOD Specification.

MP2TSME does not check the validity of the descriptor data that is specified.

The language code in the default ISO 639 Descriptor for a CableLabs configuration is set to "eng" (English). Thedescriptor data must be edited if a different language is used.

Transport Parameters

PID

Data Formatnon-negative integer

Range16 to 8190 (0x0010 to 0x1FFE)

DefaultStandard: See DescriptionCableLabs SD: 482 (0x01E2) for Audio1 and 483 (0x01E3) for Audio2CableLabs HD: 482 (0x01E2) for Audio1 and 483 (0x01E3) for Audio2

DescriptionThe PID Parameter specifies the PID value used for transport packets that carry this audio elementary stream. This PID isalso identified in the PMT as the audio stream's elementary_PID. For a Standard configuration, the PID value can be set toany integer between 16 and 8190 (0x0010 and 0x1FFE), inclusive. The value may be specified in decimal, or if prefacedwith a "0x", in hexadecimal.

If a Standard configuration is selected, the PID assignment algorithm specified by ATSC is used for the first 9 audiostreams (Audio1 to Audio9) in programs with ProgramNumber values 2 through 401. In this case, the default PID value is16 * ProgramNumber + 3 + N, where N is the number that identifies the audio elementary stream in the program. Forexample, the PID for the second audio stream (Audio2) in a program with a ProgramNumber of 3 would be assigned thedefault value of 16 * 3 + 3 + 2 = 53 (0x0035). Any audio streams inserted in a program after Audio9 will be assigned thefirst available PID value between 6432 and 8190 (0x1920 and 0x1FFE), inclusive. Similarly, all audio streams inserted inprograms with a ProgramNumber value greater than 401 will be assigned the first available value in the range 6432through 8190, inclusive.

If the default configuration is set for CableLabs SD or CableLabs HD, the default PID value used for Audio1 in Program1 is482 (0x01E2) and for Audio2 in Program1 is 483 (0x01E3) as required by the CableLabs VOD Specification. Although theCableLabs Specification only permits two audio elementary streams in a single program, MP2TSME does not preventadditional audio streams from being configured. The default PID value assigned to each additional audio stream that isinserted in a CableLabs configuration is identical to the Standard configuration default value.

TransportPriority

Data Formatenumerated

ValuesYes (set transport_priority to 1 in audio packets) No

Default

Page 100: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.092

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Standard: NoCableLabs SD: NoCableLabs HD: No

DescriptionThe TransportPriority Parameter determines the value of the transport_priority bit that appears in all transport packets forthis audio stream. If the TransportPriority value is Yes, then the transport_priority bit will be set to 1 in all packets. If it isNo, then the transport_priority will be set to 0.

Adaptation Parameters

InitDI

Data Formatenumerated

ValuesYes (initial audio discontinuity_indicator is set to 1) No

DefaultStandard: NoCableLabs SD: NoCableLabs HD: No

DescriptionThe InitDI Parameter indicates if the first transport packet carrying the audio elementary stream should contain adiscontinuity_indicator with the value of 1. If the Yes option is selected, the discontinuity_indicator will be set in the initialaudio packet. If the No option is selected, no discontinuity will be indicated in the first packet.

MP2TSME will always set the discontinuity_indicator in the first transport packet of the PCRPID. If the audio PID is alsothe PCRPID, then the discontintuity_indicator in the first audio packet will be set even if the InitDI Parameter is set to No.

RAI

Data Formatenumerated

ValuesYes (set random_access_indicator to 1) No

DefaultStandard: NoCableLabs SD: NoCableLabs HD: No

DescriptionThe RAI Parameter is set to Yes if the random_access_indicator flag should have the value of one in every transportpacket for this audio stream that contains a PES header with a PTS. If the audio PID is also the PCR PID, then a PCR willalso be inserted in this packet.

PES Parameters

PESalign

Data Formatenumerated

ValuesYes (align audio access units to PES headers)

Page 101: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 93

Copyright © 1998 - 2010 Manzanita Systems, Inc.

NoDefault

Standard: NoCableLabs SD: NoCableLabs HD: No

DescriptionThe PESalign Parameter indicates if every access unit in the audio elementary stream should be aligned to a PES header.If the Yes option is selected, then the first byte of each PES packet payload is the first byte of an access unit. Thedata_alignment_indicator bit will also be set in the PES header. If the No option is selected, then the audio access units willnot be aligned to PES headers.

If PESalign is set to Yes, the bandwidth required to multiplex audio will be increased to accommodate the alignment.

PEScopyrt

Data Formatenumerated

ValuesYes (copyright set to 1) No (copyright set to 0)

DefaultStandard: NoCableLabs SD: NoCableLabs HD: No

DescriptionThe PEScopyrt Parameter sets the value of the copyright field that appears in all PES packet headers for this audioelementary stream. If the value of the PEScopyrt parameter is Yes, then the copyright field is set to one. If the value is No,then the copyright field is set to zero.

PESid

Data Formatnon-negative integer, decimal or hexadecimal

Range0 (determine automatically)0x01 to 0xFF (255)

DefaultStandard: AutoCableLabs SD: AutoCableLabs HD: Auto

DescriptionThe PESid Parameter specifies the value for the stream_id field in PES packets that carry this audio elementary stream. Ifthe Auto box is checked, then the Multiplexer will automatically assign a value of 0xC0 for MPEG and AAC audio and0xBD (private_stream_1) for AC-3, Enhanced AC-3 and DTS streams. If the Auto box is unchecked, then theaccompanying textbox will be enabled to allow entry of a value. The value should be a non-negative integer that rangesfrom 0 through 255 (0xFF), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.Setting the StreamType value to 0 is equivalent to checking the Auto box.

stream_id_extension

Data Formatnon-negative integer, decimal or hexadecimal

Range0x00 to 0x7F

Defaultdisabled

DescriptionThe stream_id_extension Parameter is only enabled when the Auto box that accompanies the PESid Parameter isunchecked. This parameter specifies the value for the stream_id_extension field, when present, in PES packets that carry

Page 102: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.094

Copyright © 1998 - 2010 Manzanita Systems, Inc.

this audio elementary stream. The stream_id_extension field will only be encoded in the PES header if the stream_id hasthe value 0xFD. In other words, if the PESid Parameter is set to 0xFD, the Multiplexer will use the value specified for thestream_id_extension Parameter as the value of the PES stream_id_extension. If a value other than 0xFD is assigned tothe PESid Parameter, then the Multiplexer ignores the stream_id_extension Parameter.

PESnau

Data Formatnon-negative decimal integer

Unitsaccess units/PES header

Range0 (disabled)1 to 100

DefaultStandard: 2CableLabs SD: 2CableLabs HD: 2

DescriptionThe PESnau Parameter specifies the frequency of audio access units relative to the frequency of PES headers. Forexample, if the PESnau Parameter is set to 3, then the Multiplexer will insert a PES header every third audio access unit.The value must be an integer between one and 100.

PESpri

Data Formatenumerated

ValuesYes (PES_priority set to 1) No (PES_priority set to 0)

DefaultStandard: NoCableLabs SD: NoCableLabs HD: No

DescriptionThe PESpri Parameter indicates the state of the PES_priority field that appears in all PES headers for this audioelementary stream. If the value is Yes, then the PES_priority field in all PES headers will be set to 1. Setting the PESpriParameter to No will assign the PES_priority a value of 0.

PESorig

Data Formatenumerated

ValuesYes (original_or_copy set to 1) No (original_or_copy set to 0)

DefaultStandard: NoCableLabs SD: NoCableLabs HD: No

DescriptionThe PESorig Parameter indicates the state of the original_or_copy field that appears in all PES headers for this audioelementary stream. If the value is Yes, then the original_or_copy field in all PES headers will be set to a value of 1.Setting th PESorig Parameter to No will assign the original_or_copy field a value of 0.

PTSnPES

Data Format

Page 103: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 95

Copyright © 1998 - 2010 Manzanita Systems, Inc.

non-negative decimal integerUnits

PES headers/time stampRange

1 to 60Default

Standard: 1CableLabs SD: 1CableLabs HD: 1

DescriptionThe PTSnPES Parameter specifies the frequency of PES headers relative to the frequency of time stamps for this audioelementary stream. For example, if the PTSnPES Parameter is set to 2, then the Multiplexer will insert a PTS in everysecond PES header. The value should be an integer between 1 and 60, inclusive. The default value for both Standardand CableLabs is 1, which is to have a time stamp in every PES header.

PESPrivateDataFile

Data Formatpathname or filename string

Defaultnone

DescriptionThe PESPrivateDataFile Parameter specifies the name of an input file that contains private data that is to be inserted intothe audio PES headers. The file name can be edited directly in the textbox or you can click the browse button to select thelocation and name of input file on your system.

The input file must be in a specific format that is defined by Manzanita Systems as described in the section, PES PrivateData File Format. The file is organized as a sequence of data entries. Each entry includes fields that indicate the time oraccess unit index in which the data is to be inserted, and whether the data is to be carried in the 16-byte pes_private_datafield or in the reserved bytes following the PES_extension_flag_2. Note that the two insertion modes may be mixed withinthe input file.

Timing Parameters

Decoder Buffer

Data Formatenumerated

ValuesT-STDATSCDVBBluRayUser defined

DefaultStandard: T-STDCableLabs SD: ATSCCableLabs HD: ATSC

DescriptionThe Decoder Buffer Parameter selects the type of buffer model that should be used when this audio stream is multiplexed.If the ATSC option is selected, then the buffer model specified by the Advanced Television Systems Committee (ATSC) isused. If DVB is selected, then the Digital Video Broadcasting (DVB) standard buffer model is used. Both the ATSC andDVB settings are only valid if the audio stream is Dolby AC-3 or Enhanced AC-3, and will be ignored if the stream isencoded as MPEG, AAC, or HE-AAC audio. The T-STD option indicates that the audio buffer is the one defined by thestandard Transport Stream System Target Decoder (T-STD) model defined by MPEG. The T-STD model should always beused if the audio stream is MPEG, AAC or HE-AAC encoded. If the BluRay option is selected, then the audio buffer modelwill be adjusted for the Blu-Ray standard. If the User defined setting is selected, then the DBsize Parameter textbox is

Page 104: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.096

Copyright © 1998 - 2010 Manzanita Systems, Inc.

enabled to allow a custom value to be entered for the size of the audio decoder buffer.

DBsize

Data Formatnon-negative decimal integer

Unitsbytes

Range0 (use selected buffer model)1 to 1 000 000 000

DefaultStandard: disabledCableLabs SD: disabledCableLabs HD: disabled

DescriptionThe DBsize Parameter determines the size of the decoder buffer for this audio elementary stream. The parameter is onlyenabled if the User defined option is selected for the Decoder Buffer Parameter. The value for DBsize is the desired audiobuffer size in bytes. The valid range is 1 through 1 000 000 000, inclusive. A value of 0 indicates that the buffer size of themodel selected by the Decoder Buffer Parameter should be used.

StreamDelay

Data Formatnon-negative decimal integer

Units90 kHz clock cycles

Range0 to 2 000 000 000

DefaultStandard: 0CableLabs SD: 0CableLabs HD: 0

DescriptionThe StreamDelay Parameter specifies the length of time that the audio stream should be delayed from the beginning of theprogram. The units for the value are 90 kHz clock cycles. The value must be an integer between 0 and 2 000 000 000.This parameter may be used to achieve lip sync when the various streams were not encoded at the same time. Forexample, if this audio stream is leading the video stream, then the StreamDelay Parameter may be used to align audio andvideo. The default value for the StreamDelay parameter is 0, which is not to delay insertion of this elementary stream.

If PCRs are carried in the audio PID, i.e., there is no video stream in the program, there will not be any PCRs at thebeginning of the transport stream if the audio stream is delayed by the StreamDelay parameter.

IndDelay

Data Formatenumerated

ValuesYes (independent initial delay) No

DefaultStandard: NoCableLabs SD: NoCableLabs HD: No

DescriptionThe IndDelay Parameter is set to Yes to indicate that the initial delay for this audio stream should be independent of allother elementary streams in the program. Normally the first video stream sets when all subsequent elementary streams inthe program will be decoded. This insures that all elementary streams in the program are aligned in presentation time. Sometimes this alignment can cause problems if the first video stream uses a very short delay, or its delay adversely

Page 105: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 97

Copyright © 1998 - 2010 Manzanita Systems, Inc.

affects the decoding of other streams in the programs. In such a case, the IndDelay Parameter may be set to Yes. Thedefault value is No, which is not to have an independent initial delay.

Delay

Data Formatinteger

Units90 kHz clock cycles

Range-90 000 to 90 000

DefaultStandard: 0CableLabs SD: 0CableLabs HD: 0

DescriptionThe Delay Parameter represents an additional delay that is added to the precomputed initial delay for the first access unitin the audio stream. The units for the value are 90 kHz clock cycles. The value must be a positive or negative integer thatranges from -90 000 to 90 000. The initial delay is used as the presentation time stamp (PTS) for the first audio frame. Thebase initial delay for the audio stream can be adjusted with this parameter. Normally all streams within a program areconfigured to have their initial PTSs the same. This insures there will be no lip sync problems assuming the source materialis aligned. In some cases, it may be necessary to increase the initial delay to overcome an underflow early in the stream.

Priority

Data Formatenumerated

ValuesYes (give audio packets multiplexing priority) No

DefaultStandard: NoCableLabs SD: NoCableLabs HD: No

DescriptionThe Priority Parameter indicates if transport packets for this audio stream should be inserted into the multiplex with minimaljitter. This option should not normally be used on an audio stream. If the Priority Parameter is set to Yes, then the packetsfor this audio stream are given priority when multiplexed. The default value is No, which indicates that a highermultiplexing priority should not be used.

SBrate

Data Formatnon-negative decimal integer

Unitsbits per second

Range0 to 1 000 000 000

DefaultStandard: 0CableLabs SD: 0CableLabs HD: 0

DescriptionThe SBrate Parameter specifies the drain rate of the smoothing buffer for this audio elementary stream. The value mustbe a non-negative integer representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000, inclusive. If a smoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given. Thedefault value is 0, which is not to have a smoothing buffer for the audio stream.

Page 106: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.098

Copyright © 1998 - 2010 Manzanita Systems, Inc.

SBsize

Data Formatnon-negative decimal integer

Unitsbytes

Range0 to 2 000 000 000

DefaultStandard: 0CableLabs SD: 0CableLabs HD: 0

DescriptionThe SBsize Parameter specifies the size of the smoothing buffer for this audio elementary stream. The value must be anon-negative integer representing the buffer size in bytes. The valid range is 0 to 1 000 000 000, inclusive. If a smoothingbuffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given. The default value is 0,which is not to have a smoothing buffer for this audio stream.

SkipFrames

Data Formatinteger

Unitsaudio frames

Range0 to 65 535

DefaultStandard: 0CableLabs SD: 0CableLabs HD: 0

DescriptionThe SkipFrames Parameter specifies the number of audio frames that should be skipped in the beginning of the audioelementary stream. The value must be an integer between 0 and 65 535. This parameter may be used to achieve lip syncwhen the audio and video streams were not encoded beginning at the same instant in time. For example, if video is leadingaudio and the video PID carries the PCR, then the SkipFrames Parameter may be used to advance audio to meet video. Avalue of 0 indicates that no audio frames should be skipped.

Page 107: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 99

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.1.16 Setting Data Parameters

MP2TSME supports multiplexing of prepacketized data files into the output transport stream. There are no restrictions on thecontents of data files, only that it consists of contiguous 188-byte transport packets that begin with a valid sync byte of 0x47. The transport packets can all be a single PID, or multiple PIDs can be present. Because the data is prepacketized, theMultiplexer performs limited manipulation of the packets as they are inserted into the multiplex.

The prepacketized data can be configured with no program association at the Transport level, or as part of a program at theProgram level. In the first case, the PIDs used in the data stream would not be referenced in the PSI. Prepacketized DVB SI(Service Information) tables, for example, would be configured at the Transport level. On the other hand, if the prepacketizeddata uses a PID that must appear in a program's Program Map Table (PMT), it should be configured at the Program level. Thesection, Inserting a Prepacketized Data Stream, describes how to initialize the configuration for prepacketized data streams atboth the Transport and Program levels.

At the Transport level, up to 64 prepacketized data stream files may be configured. Each data stream that you insert at theTransport level will appear as a new Data entry under the Transport entry in the Multiplex Pane. The first data stream will belabeled Data1, the second as Data2, etc.

At the Program level, up to 64 prepacketized data stream files may be inserted in each configured program. Each data streamwill appear as a new Data entry under the Program entry in the Multiplex Pane. Within a program, the Data entries will belabeled Data1, Data2, etc., in the order that they are inserted.

For each configured data stream, there is a corresponding Data Parameters Dialog Box. The title of a Data Parameters DialogBox includes the numbered label, e.g., "Data1 Parameters". The Data Parameters Dialog Box lists the configuration parametersthat are specific for the data stream. These parameters define the input prepacketized data stream, and if it is inserted at theProgram level, specify how the data stream is identified in the PMT.

The only Data parameters that you must explicitly set to run the Multiplexer are the Files Parameter and the Rate Parameter. Ifthe data stream was inserted in the current configuration with the Insert File command or with a drag-and-drop operation, theFiles Parameter will already be set to the name of the input data file. However, if the data stream was inserted using the InsertData command, the Files Parameter will initially be blank. You must set it to the name of an input data file or the Multiplexer willgive you an error. A quick method for doing this is to drag-and-drop the input file from a graphical file system browser/exploreronto the Data entry in the Multiplex Pane.

The Rate Parameter specifies the desired output transport rate for the prepacketized data stream. The Multiplexer will report anerror if the Rate Parameter does not have a valid, non-zero value.

At the Transport level, the Data parameters are divided into three functional categories as listed below:

Input Adaptation Timing

Files FixCC StreamDelay

Rate Priority

Repeat SBrate

Comment SBsize

In addition to the three categories listed above, Data parameters at the Program level include the additional category shownbelow:

PMT

CreatePMTEntry

PID

ChangePID

StreamType

Descriptors

The Data Parameters Dialog Box has button bars for each functional category. The parameters under a given category appearbelow the associated button bar, which can be opened or collapsed with a single mouse click.

Page 108: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0100

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The rest of this section describes each Data parameter in detail. The listed default values are the same for all configurationtypes (Standard, CableLabs SD, and CableLabs HD).

Input Parameters

Files

Data Formatpathname or filename string

Defaultnone

DescriptionThe Files Parameter specifies the name of the input prepacketized data stream file. If you inserted the data stream into theconfiguration using drag-and-drop or with the Insert File command on the Tool Bar or Menu Bar, then the pathname of theinput file will be displayed in the Files textbox. To change the input file, the pathname can be edited directly in the textbox

or you can click the button to browse your system to select the location and name of a different input file. The inputdata stream file must be in binary format. The data must be contiguous 188-byte transport packets, each starting with avalid sync byte (0x47). The first byte in the file must be the sync byte for the first packet. The transport packets can all havea single PID, or multiple PIDs can be present.

The two-character string %i can be used in the specified name if the input stream is segmented into multiple files that aresequentially named. The %i string represents an integer index that begins with 1. For example, if the input stream iscontiguously segmented into four files named part1.mpg, part2.mpg, part3.mpg, and part4.mpg, then the filename used forFiles Parameter is part%i.mpg. The Multiplexer will look for a sequence of input files in the specified path starting withpart1.mpg, and multiplex them as one continuous stream. It will stop multiplexing when it reaches the last file name in thesequence. The first byte of the first file must be the sync byte for the first packet. The remaining files do not have to beginwith a sync byte, however, the multiple input files should make up a continuous transport stream of 188-byte packets whenthey are concatenated.

If the input data stream is segmented into files that are not sequentially named with an integer index starting from 1, thenthe Multiple button should be used to open the Input File List box. From this box you can specify the name of each inputfile by clicking the Add button to open the Select Stream box. The order that the names appear in the File List is the orderin which the Multiplexer will sequentially read the input stream. The first byte of the first file must be the sync byte for thefirst packet. The remaining files do not have to begin with a sync byte, however, the multiple input files should make up acontinuous transport stream of 188-byte packets when they are concatenated.

The last byte of the input prepacketized data stream does not have to be the last byte of a transport packet if the data isnot to be repeated in the output. In this case, the Repeat Parameter should be set to No, and the Multiplexer will discardany partial packet appearing at the end of the stream. However, if the Repeat Parameter is set to Yes, the Multiplexer willgive a fatal error if the last packet in the last input file is incomplete.

MP2TSME will give you an error and will not proceed if you try to run the Multiplexer without specifying a FilesParameter.

Rate

Data Formatnon-negative real number

Unitsbits per second

Range100 to 1 000 000 000

DescriptionThe Rate Parameter is the desired output transport rate in bits per second for this prepacketized data stream. The valuemust be a non-negative number in double format. It may include fractional bps. The valid range is 100 to 1 000 000 000bps.

Page 109: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 101

Copyright © 1998 - 2010 Manzanita Systems, Inc.

MP2TSME will give you an error and will not proceed if you try to run the Multiplexer without specifying a valid,non-zero Rate value.

If multiple PIDs are present in the data stream, the value specified for the Rate Parameter is the aggregate rate.

Repeat

Data Formatenumerated

ValuesYes (repeat input data for entire output transport stream)No (insert input data once)

DefaultYes

DescriptionIf the value of the Repeat Parameter is Yes, then the Multiplexer will repeat the sequence of packets in the input file(s) forthe entire length of the transport multiplex so that the rate specified by the Rate Parameter is maintained. This option isuseful when only a small number of packets have been generated for the input file, and it is desired for the packets to berepeated throughout the transport stream's duration. For example, three transport packets have been created, eachcontaining one DVB SI table. The Repeat Parameter is set to Yes to repeat insertion of these three packets in the outputtransport stream at the specified rate. If the value was instead No, then the three packets would be inserted once each atthe specified rate. After all of the packets have been inserted, no data will be multiplexed from the input file for theremainder of the transport multiplex.

Comment

Data Formatstring

DescriptionThe Comment Parameter allows you to enter optional text comments when the current configuration is saved in a file. Thistext will appear as a comment block starting with the line immediately after the Data Subsection Title (e.g., Data1$) in thesaved configuration file. The text can have multiple lines. If the current configuration is loaded from a configuration file, theComment Parameter will display any comment lines that appear between the Data Subsection Title and the title of the nextsection or subsection in the file.

PMT Parameters (Program level only)

CreatePMTEntry

Data Formatenumerated

ValuesYes (insert entry for data stream PID in PMT)No

DefaultNo

DescriptionThe CreatePMTEntry Parameter indicates if the Multiplexer should create an entry for this data stream in the program'sProgram Map Table (PMT). If the value is Yes, then the PMT will include an entry in the PMT for this data stream usingthe value specified by the PID and StreamType Parameters. If the value is No, then PMT will not include a reference to thisdata stream.

PID

Data Formatnon-negative integer, decimal or hexadecimal

Page 110: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0102

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Range0 to 8190 (0x0000 to 0x1FFE)

Default0

DescriptionThe PID Parameter is only enabled when the CreatePMTEntry Parameter is set to Yes. It specifies the PID value that is tobe used to identify this data stream in the program’s PMT. The value must be an integer between 0 and 8190, inclusive(0x0000 and 0x1FFE). The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

The specified PID value should be the same as the one used in the input prepacketized data. However, if it is not thesame, the ChangePID Parameter may be enabled. In this case, the Multiplexer will substitute the specified PID value forevery PID appearing in the input data stream.

MP2TSME will not verify that the specified PID value is the one that is actually in the prepacketized data stream.

ChangePID

Data Formatenumerated

ValuesYesNo

DefaultNo

DescriptionThe ChangePID Parameter indicates whether the Multiplexer should modify the PID fields in the input prepacketized datastream. If ChangePID is set to Yes, then the Multiplexer will substitute the value specified by the PID Parameter for everyPID appearing in the input data stream. If ChangePID is set to No, then the PIDs in the input stream will not be modified.

StreamType

Data Formatnon-negative integer, decimal or hexadecimal

Range0x00 to 0xFF (255)

Default0

DescriptionThe StreamType Parameter is only enabled when the CreatePMTEntry Parameter is set to Yes. It specifies the valueused in the stream_type field that identifies this data stream in the PMT. The value should be an integer between 0x00and 255 (0x00 and 0xFF). The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

Descriptors

Data Formathexadecimal data

Rangeup to 32 descriptors

Defaultnone

DescriptionThe Descriptors Parameter is only enabled when the CreatePMTEntry Parameter is set to Yes. It specifies descriptor datathat should be associated with this data stream in the PMT. Up to 32 descriptors may be specified with the DescriptorsParameter. To enter descriptor data, click the Edit button to open the Descriptors List.

The Descriptors List is the interface used to define and edit the data stream descriptors. A descriptor may be added to thelist as a sequence of hexadecimal byte values, or may be created using the Descriptor Generator. The list box will displaythe hexadecimal data for each descriptor that is added as a separate entry. Use of the Descriptors List is detailed in thesection, Specifying Descriptors.

Page 111: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 103

Copyright © 1998 - 2010 Manzanita Systems, Inc.

MP2TSME does not check the validity of the descriptor data that is specified.

Adaptation Parameters

FixCC

Data Formatenumerated

ValuesYes (correct continuity counter values)No

DefaultYes

DescriptionIf the FixCC Parameter is set to Yes, then the Multiplexer will correct the continuity counter values in the inputprepacketized data stream when the packets are multiplexed. If the No option is selected, then the continuity countervalues in the input packets will not be modified.

The FixCC Parameter should be set to Yes when the Repeat Parameter is set to Yes to insure that the continuity counteris correct when the packets from the input file are repeated. If multiple PIDs are present in the input data stream, eachassociated continuity counter is tracked and corrected individually.

The FixCC Parameter will only insure that the continuity counter is correct if the PID is being inserted from a singleinput data stream. If the same PID is also inserted from a prepacketized data stream file that is configured in another DataSubsection or is assigned to a configured elementary stream, there will be continuity counter errors.

Timing Parameters

StreamDelay

Data Formatnon-negative decimal integer

Units90 kHz clock cycles

Range0 to 2 000 000 000

Default0

DescriptionThe StreamDelay Parameter specifies the length of time that the insertion of the prepacketized data stream should bedelayed from the beginning of the output transport stream. The units for the value are 90 kHz clock cycles. The valuemust be a positive integer that ranges from 0 to 2 000 000 000. This delay may be used when the data stream containstime sensitive information that requires alignment with other streams.

Priority

Data Formatenumerated

ValuesYes (give data packets multiplexing priority) No

DefaultNo

DescriptionThe Priority Parameter indicates if this prepacketized data stream should be inserted into the multiplex with minimal jitter.

Page 112: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0104

Copyright © 1998 - 2010 Manzanita Systems, Inc.

This option should be used if there is time sensitive content in the data stream. If the Priority Parameter is set to Yes, thenpackets in this data stream are given priority when multiplexed.

SBrate

Data Formatnon-negative decimal integer

Unitsbits per second

Range0 to 1 000 000 000

Default0

DescriptionThe SBrate Parameter specifies the drain rate of the smoothing buffer for this data stream. The value must be anon-negative integer representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000, inclusive. If asmoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given. A value of 0indicates that a smoothing buffer is not used.

SBsize

Data Formatnon-negative decimal integer

Unitsbytes

Range0 to 2 000 000 000

Default0

DescriptionThe SBsize Parameter specifies the size of the smoothing buffer for this data stream. The value must be a non-negativeinteger representing the buffer size in bytes. The valid range is 0 to 1 000 000 000, inclusive. If a smoothing buffer is to beused, non-zero values for both the SBsize and SBrate Parameters must be given. A value of 0 indicates that a smoothingbuffer is not used.

Page 113: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 105

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.1.17 Setting Table Data Parameters

MP2TSME features an integrated Table Generator that enables users to construct MPEG, ATSC, DVB, and private tables. TheMultiplexer can be configured to convey one or more of the resulting tables in a Table Data stream. Such a stream must beassigned a unique PID value in the output transport stream.

The Table Generator only supports single section tables, i.e., tables that are comprised of only one section.

A Table Data stream can be configured with no program association at the Transport level, or as part of a program at theProgram level. In the first case, the PID assigned to the Table Data stream would not be referenced in the MPEG PSI. TheDVB SDT, BAT and ST, for example, should be configured at the Transport level and assigned to PID 0x0011. On the otherhand, if the tables will be in a PID that must appear in a program's Program Map Table (PMT), it should be configured at theProgram level. The section, Inserting a Table Data Stream, describes how to initialize the configuration for Table Data streamsat both the Transport and Program levels.

At the Transport level, up to 64 Table Data streams may be configured. Each stream that you insert at the Transport level willappear as a new TableData entry under the Transport entry in the Multiplex Pane. The first stream will be labeled TableData1,the second as TableData2, etc.

At the Program level, up to 64 Table Data streams may be inserted in each configured program. Each data stream will appearas a new TableData entry under the appropriate Program entry in the Multiplex Pane. Within a program, the TableData entrieswill be labeled TableData1, TableData2, etc., in the order that they are inserted.

For each configured Table Data stream, there is a corresponding Table Data Parameters Dialog Box. The title of a Table DataParameters Dialog Box includes the entry's numbered label, e.g., "TableData1 Parameters". The Table Data Parameters DialogBox includes the Table Generator interface for creating the tables to be conveyed in the stream, and lists the configurationparameters used by the Multiplexer. These parameters define the PID and table insertion rates, and if the Table Data stream isat the Program level, specify how the stream is identified in the PMT.

At the Transport level, the Table Data parameters are divided into four functional sections as listed below:

Table Data Transport Adaptation Timing

TablesPerSecond PID InitDI StreamDelay

Repeat Pack Priority

Comment TransportPriority SBrate

SBsize

The Table Data section also contains the Table List. The tables that are to be conveyed in the Table Data stream are defined inthis list. A table can be created using the set of templates provided with MP2TSME, loaded from binary data stored in a file, orentered as hexadecimal byte values.

In addition to the four categories listed above, Table Data parameters at the Program level include the additional categoryshown below:

PMT

CreatePMTEntry

StreamType

Descriptors

The Table Data Parameters Dialog Box has button bars for each functional category. The parameters under a given categoryappear below the associated button bar, which can be opened or collapsed with a single mouse click.

The rest of this section describes the Table List and each Table Data parameter in detail. The listed default values are thesame for all configuration types (Standard, CableLabs SD, and CableLabs HD).

Page 114: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0106

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Table List

The Table List is the interface used to define the tables that are to be conveyed in the Table Data stream. It appears at the topof the Table Data section. It consists of a list box above a set of nine function buttons. The list will initially be empty for a TableData stream that has been newly inserted in a multiplex configuration. Using the function buttons you can create new tables,load existing tables, and organize the list. The list box will display the hexadecimal data for each table as a separate entry. There is essentially no limit to the number of tables that may be defined in the list, however, all tables must be comprised of asingle section, i.e., multiple section tables are not supported.

The Table List has the following function buttons:

Name Description

Add Opens the Select Table Dialog Box that lists the available table templates. Thetable templates are defined by the Table Definition Script that has been selectedin the Preferences Dialog Box. The Table Definition Script consists of one ormore templates that each define the syntax for a table. MP2TSME includestemplates for standard MPEG, ATSC, and DVB tables, however, user-definedtemplates can also be created using the MP2TSME Table Scripting language.After a specific template is chosen from the Select Table list, the Table Generatorwill open, displaying the table syntax. Editable bit fields can then be set to theirdesired values. See the section, Table Generator, for a detailed description.

Edit Parses the currently selected table entry and if it is valid, loads it into the TableGenerator. Editable bit fields can then be changed to their desired values and thechanges can be saved. The data will only be recognized if it is defined in theTable Definition Script that is selected in the Preferences Dialog Box.

Add Hex Opens the Edit Table Data box, which accepts a string of hexadecimal characters.Each two-character word is interpreted as a byte of data. This function can beused to add a table if it has already been coded into a hexadecimal byte list. TheCompute CRC button can be used to replace the last four bytes of data in theentry box with the CRC value that is computed over the preceding bytes of data.

Edit Hex Opens currently selected table entry in the Edit Table Data box, where it isdisplayed as a string of hexadecimal characters. Each two-character word isinterpreted as a byte of data. The byte list can be edited and saved. TheCompute CRC button can be used to replace the last four bytes of data in theentry box with the CRC value that is computed over the preceding bytes of data.

Duplicate Creates a duplicate of the currently selected table entry in the list.

Remove Removes the currently selected table entry from the list.

Load Opens the Load Table box that enables selection of an input table data file. Thefile must be the binary data encoding of the table. The Table Generator Tool canbe used to generate the table data file.

Move Up Moves the currently selected table entry to the next higher position in the list.

Move Down Moves the currently selected table entry to the next lower position in the list.

The tables will be sent in the Table Data stream in the order in which they are listed. If the Repeat Parameter is disabled, eachtable in the list will only be sent one time. If the Repeat Parameter is enabled, the Multiplexer will continue to repeat the tablesin the same order over the duration of the transport stream. The rate at which each table in the Table List is sent is defined bythe TablesPerSecond Parameter. Note that although each table in the list is sent at the same rate, by replicating specific tableentries in the list, the relative rates of the tables can be made different. For example, if the two tables, Table A and Table B, areto be sent in the Table Data stream and it is desired to send Table A twice as frequently as Table B, the Table List should bebuild with the following entries: Table A, Table A, Table B. The Duplicate function button can be used to create duplicates of atable in the list.

Page 115: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 107

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Table Data Parameters

TablesPerSecond

Data Formatnon-negative real number

Unitstables per second

Range0.1 to 1000

Default10.0

DescriptionThe TablesPerSecond Parameter specifies the total rate at which all tables that are defined in this Table Data streamshould be sent in the transport stream. Note that this rate is the aggregate rate for all tables defined in the Table List. TheTablesPerSecond value should be a non-negative number in double format that represents the repetition rate in tables persecond. The valid range is 0.1 to 1000.

If you set the TablesPerSecond Parameter, then later add more tables, the existing tables will be multiplexed at arelatively lower rate to make room for the additional tables. Therefore, if you wish to have the same insertion rate, you willneed to increase this parameter if you add more tables to this table data stream.

Repeat

Data Formatenumerated

ValuesYesNo

DefaultYes

DescriptionIf the value of the Repeat Parameter is Yes, then the Multiplexer will repeat the sequence of tables defined in the TableList for the entire length of the transport multiplex. Each of the tables will be repeated at the rate specified by the TablesPerSecond Parameter. For example, two DVB SI tables have been created in the list and the TablesPerSecondParameter is set to 10.0. If the Repeat Parameter is set to Yes, then the sequence of two tables will be repeated 5 times asecond in the output transport stream at the specified rate. If the value was instead No, then each of the two tables wouldbe inserted one time near the beginning of the stream. The interval between the packets containing the tables will bebased on the rate specified by the TablesPerSecond Parameter.

Comment

Data Formatstring

DescriptionThe Comment Parameter allows you to enter optional text comments when the current configuration is saved in a file. Thistext will appear as a comment block starting with the line immediately after the Table Data Subsection Title (e.g.,TableData1$) in the saved configuration file. The text can have multiple lines. If the current configuration is loaded from aconfiguration file, the Comment Parameter will display any comment lines that appear between the Table Data SubsectionTitle and the title of the next section or subsection in the file.

PMT Parameters (Program level only)

Page 116: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0108

Copyright © 1998 - 2010 Manzanita Systems, Inc.

CreatePMTEntry

Data Formatenumerated

ValuesYesNo

DefaultNo

DescriptionThe CreatePMTEntry Parameter indicates if the Multiplexer should create an entry for the Table Data stream in theprogram's Program Map Table (PMT). If the value is Yes, then the PMT will include an entry in the PMT for this data usingthe value specified by the PID and StreamType Parameters. If the value is No, then PMT will not include a reference to thisTable Data stream.

StreamType

Data Formatnon-negative integer, decimal or hexadecimal

Range0x01 to 0xFF (255)

Defaultnone

DescriptionThe StreamType Parameter is only enabled when the CreatePMTEntry Parameter is set to Yes. It specifies the valueused in the stream_type field that identifies this Table Data stream in the PMT. The value should be an integer betweenzero and 255 (0x00 and 0xFF). The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

Descriptors

Data Formathexadecimal data

Rangeup to 32 descriptors

Defaultnone

DescriptionThe Descriptors Parameter is only enabled when the CreatePMTEntry Parameter is set to Yes. It specifies descriptor datathat should be associated with this Table Data stream in the PMT. Up to 32 descriptors may be specified with theDescriptors Parameter. To enter descriptor data, click the Edit button to open the Descriptors List.

The Descriptors List is the interface used to define and edit the Table Data stream descriptors. A descriptor may be addedto the list as a sequence of hexadecimal byte values, or may be created using the Descriptor Generator. The list box willdisplay the hexadecimal data for each descriptor that is added as a separate entry. Use of the Descriptors List is detailedin the section, Specifying Descriptors.

Transport Parameters

PID

Data Formatnon-negative integer

Range16 to 8190 (0x0010 to 0x1FFE)

DefaultSee description

Page 117: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 109

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DescriptionThe PID Parameter specifies the PID value used for transport packets that carry this table data stream. If the table datastream is at the program level, then the PID is also identified in the PMT as the stream's elementary_PID. The PID valuecan be set to any integer between 16 and 8190 (0x0010 and 0x1FFE), inclusive. The value may be specified in decimal, orif prefaced with a "0x", in hexadecimal.

The first three data streams (non-video and non-audio) in programs with ProgramNumber values 2 through 401 areassigned default PID values using the algorithm of 16 * ProgramNumber + 12 + N, where N equals 1 for the first datastream, 2 for the second data stream, and 3 for the third data stream. Program-related data streams that are assignedPIDs with this method include Table Data, Private Stream data, and SCTE 35 data. For example, if the first data streamthat is inserted in a program with ProgramNumber 3 is TableData1, it is assigned a default PID value of 16 * 3 + 11 + 2 =61 (0x003D). If PrivateStream_1 is next inserted, it will be given a default PID value of 0x003E. When a third data stream,whether it is Table Data, Private Stream, or SCTE 35, is added, it will be assigned a PID value of 0x003F.

The fourth and higher data streams (Table Data, Private Stream, or SCTE 35) that are inserted in a program will beassigned the first available PID value between 6432 and 8190 (0x1920 and 0x1FFE), inclusive. Similarly, all data streamsinserted in programs with a ProgramNumber value greater than 401 will be assigned the first available value in this upperrange.

If the Table Data is inserted at the transport level, then it will be assigned the first available PID value in the range 6432through 8190 (0x1920 and 0x1FFE), inclusive.

Pack

Data Formatenumerated

ValuesYes (convey list of tables in contiguous payload bytes) No

DefaultNo

DescriptionThe Pack Parameter defines the method that the Multiplexer uses to convey the tables that are defined in the Table List. When there are multiple tables in the list, the Multiplexer can begin each table in a new transport packet, or it can pack thesequence of tables in contiguous packet payload bytes. In the first case, the remaining payload after each table will befilled with stuffing bytes to complete the packet payload. In the second case, stuffing bytes will be used to fill the payload ofthe last packet after the data for all tables in the list have been packed contiguously in packets. If the Repeat Parameter isset to Yes, the sequence of tables will always begin at the start of a packet payload when it is repeated.

If the Pack value is set to No, then the Multiplexer will use the first method and will start each table at the beginning of apacket payload. If the value is Yes, then the tables defined in the Table List will be conveyed as contiguous packetpayload bytes in the order that they are listed. The first table that is listed will always start at the beginning of a packetpayload.

TransportPriority

Data Formatenumerated

ValuesYes (set transport_priority to 1) No

DefaultNo

DescriptionThe TransportPriority Parameter determines the value of the transport_priority bit that appears in all transport packets forthis Table Data stream. If the TransportPriority value is Yes, then the transport_priority bit will be set to 1 in all packets. Ifit is No, then the transport_priority will be set to 0.

Page 118: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0110

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Adaptation Parameters

InitDI

Data Formatenumerated

ValuesYes (initial discontinuity_indicator is set to 1) No

DefaultNo

DescriptionThe InitDI Parameter indicates if the first transport packet carrying this Table Data stream should contain adiscontinuity_indicator with the value of 1. If the Yes option is selected, the discontinuity_indicator will be set in the initialtransport packet. If the No option is selected, no discontinuity will be indicated in the first packet.

Timing Parameters

StreamDelay

Data Formatnon-negative decimal integer

Units90 kHz clock cycles

Range0 to 2 000 000 000

Default0

DescriptionThe StreamDelay Parameter specifies the length of time that this Table Data stream should be delayed from the beginningof the program. The units for the value are 90 kHz clock cycles. The value must be an integer between 0 and 2 000 000000. This parameter may be used to accurately position a table in the stream. The default value for the StreamDelayparameter is 0, which is not to delay insertion of this Table Data stream.

Priority

Data Formatenumerated

ValuesYes (give table data packets multiplexing priority) No

Default No

DescriptionThe Priority Parameter indicates if transport packets for this Table Data stream should be inserted into the multiplex withminimal jitter. This option should not normally be used. If the Priority Parameter is set to Yes, then the packets for thisstream are given priority when multiplexed. If the value is set to is No, then a higher multiplexing priority will not be used.

SBrate

Data Formatnon-negative decimal integer

Unitsbits per second

Page 119: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 111

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Range0 to 1 000 000 000

Default0

DescriptionThe SBrate Parameter specifies the drain rate of the smoothing buffer for this Table Data stream. The value must be anon-negative integer representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000, inclusive. If asmoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given. A value of 0indicates that a smoothing buffer is not used.

SBsize

Data Formatnon-negative decimal integer

Unitsbytes

Range0 to 2 000 000 000

Default0

DescriptionThe SBsize Parameter specifies the size of the smoothing buffer for this Table Data stream. The value must be anon-negative integer representing the buffer size in bytes. The valid range is 0 to 1 000 000 000, inclusive. If a smoothingbuffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given. A value of 0 indicatesthat a smoothing buffer is not used.

Page 120: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0112

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.1.18 Setting SMPTE 302M Parameters

The SMPTE 302M standard specifies the transport of linear PCM digital audio in MPEG-2 transport streams. MP2TSME allowsyou to configure up to 16 SMPTE 302M elementary streams in each program. By definition, each SMPTE 302M elementarystream may convey 2, 4, 6, or 8 channels. Each pair of channels are derived from a two-channel data source like an AES3stream, PCM data, or other digital audio data like Dolby-E.

If more than 8 channels are required, a second SMPTE 302M elementary stream may be configured to carry the additionalchannels. A channel_identification field in the SMPTE 302M header is used to indicate the channel number of the first channelin the SMPTE 302M elementary stream. Note that each SMPTE 302M elementary stream must be assigned a unique PID in thetransport stream.

Each SMPTE 302M elementary stream that you insert into a program will appear as a new entry under the appropriate Programentry in the Multiplex Pane. The elementary streams are identified with a sequentially numbered label as they are added, i.e.,SMPTE302M1, SMPTE302M2, etc.

The title of the Parameters Dialog Box that is associated with a given SMPTE 302M stream will have both program and SMPTEidentifiers, e.g., "Program2 SMPTE302M1 Parameters". The SMPTE 302M Parameters Dialog Box lists the configurationparameters that are specific for the SMPTE 302M stream. These parameters specify the input data streams, define how theinput data is encoded, configure encoding of the SMPTE 302M transport packets and PES headers, and determine bufferingand delays.

If the SMPTE 302M Parameters Dialog Box is for a new multiplex configuration, the parameters will have default settings. Youshould review these default values and modify them if necessary for your application before running the Multiplexer.

By default, the Parameters Dialog Box for a newly configured SMPTE 302M stream will only be set up for a single two-channelinput. Up to three more two-channel data streams can be added by changing the Streams Parameter. The input file for each ofthe enabled data stream must be specified before the Multiplexer is run.

The SMPTE 302M parameters are divided into eight functional categories as listed below:

Input Remultiplex PMT Transport

Streams Remux Stream StreamType PID

Files SourceTSPID Descriptors TransportPriority

CSdataN DescFromData

CSdataM AVSync

Rate

RefVideoPID

Comment

Adaptation PES Timing Source

InitDI PEScopyrt DBsize ChannelID

RAI PESid StreamDelay Validy

stream_id_extension Delay BitReversed

PESpri Priority ByteReversed

PESorig SBrate BytesPerWord

SBsize MSjustified

WordSize

The SMPTE 302M Parameters Dialog Box has eight button bars, one for each of the eight categories. The parameters under agiven category appear below the associated button bar, which can be opened or collapsed with a single mouse click.

The rest of this section describes each SMPTE 302M parameter in detail. The listed default values are the same for allconfiguration types (Standard, CableLabs SD, and CableLabs HD).

Page 121: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 113

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Input Parameters

Streams

Data Formatenumerated

Values1, 2, 3, 4

Default1

DescriptionThe Streams Parameter configures the number of input two-channel data streams that are to be contained in this SMPTE302M elementary stream. It may be set to 1, 2, 3 or 4. For each two-channel stream that is configured, a correspondingStream tab will be enabled that accepts the Files, CSdataN and CSdataM Parameters for the stream.

Files

Data Formatpathname or filename string

Defaultnone

DescriptionThe Files Parameter specifies the name of the input two-channel data stream file. To specify the input file, the pathname

can be edited directly in the textbox or you can click the button to browse your system to select the location and nameof a different input file.

The input file must be two-channel digital audio data. It can be an AES3 stream, PCM data, or other digital audio data likeDolby-E. The sampling resolution may be 16, 20, or 24 bits per sample. All channels in a SMPTE 302M elementarystream must have the same sampling resolution. The sampling frequency for all channels must be 48 kHz. The file shouldbegin with the first valid data word. Any header should be removed prior to multiplexing. An example of a PCM file with aheader is a Windows WAV file. In this case, the WAV header must be removed prior to multiplexing the PCM data in thefile.

The input file may also be a transport stream that contains a SMPTE 302M stream to be remultiplexed. Remultiplexing ofSMPTE 302M streams carrying multiple two-channel data streams is not supported. The SMPTE 302M stream may onlyconsist of one two-channel AES3 or PCM data stream. Note that if a SMPTE 302M stream is to be remultiplexed from ainput transport stream, the appropriate Remultiplex Parameters must also be specified.

The two-character string %i can be used in the specified name if the input stream is segmented into multiple files that aresequentially named. The %i string represents an integer index that begins with 1. For example, if the input stream iscontiguously segmented into four files named part1.pcm, part2.pcm, part3.pcm, and part4.pcm, the filename used for FilesParameter is part%i.pcm. The Multiplexer will look for a sequence of input files in the specified path starting withpart1.pcm, and multiplex them as one continuous stream. It will stop multiplexing when it reaches the last file name in thesequence. The first byte of the first file must be the first byte of an audio frame. The remaining files do not have to beginwith the start of an audio frame, i.e., the input stream does not have to segmented on access unit boundaries. However,the multiple input files should make up a continuous stream when they are concatenated.

If the input stream is segmented into files that are not named with an integer index starting from 1, then the Multiple buttonshould be used to open the Input File List box. From this box you can explicitly specify the name of each input file byclicking the Add button to open the Select Stream box. The order that the names appear in the File List is the order inwhich MP2TSME will sequentially read the input stream. You would use this method, for example, if you want to multiplexthe files promo.pcm, trailer.pcm, and movie.pcm as one continuous stream. The first byte of the first file must be the firstbyte of a frame. The remaining files do not have to begin with the start of a frame. However, the multiple input files shouldmake up a continuous stream when they are concatenated.

MP2TSME will give you an error and will not proceed if you try to run the Multiplexer without specifying an SMPTE302M Files parameter for any of the enabled input streams.

Page 122: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0114

Copyright © 1998 - 2010 Manzanita Systems, Inc.

CSdataN

Data Format24-bytes of hexadecimal data

Default0x8100000000000000000000000000000000000000000000D9 (PCM)

DescriptionThe CSdataN Parameter determines the 24-byte channel status sequence to use for the first channel of this two-channelinput stream. The data type of the input stream should be selected from the drop-down list. The possible data types are PCM, DATA and USER. If PCM is selected, then the accompanying textbox will be disabled and MP2TSME will use thepre-defined value for PCM data of 0x810000…0000D9. If DATA is selected, the channel status sequence will be set to0xC10000…000077. This value should be used for non-PCM data, for example, Dolby-E audio. If USER is selected, thetextbox will be enabled to allow the user to input a 24-byte value. The data should be entered as a string of 48hexadecimal characters.

CSdataM

Data Format24-bytes of hexadecimal data

Default0x8100000000000000000000000000000000000000000000D9 (PCM)

DescriptionThe CSdataM Parameter determines the 24-byte channel status sequence to use for the second channel of thistwo-channel input stream. The data type of the input stream should be selected from the drop-down list. The possibledata types are PCM, DATA and USER. If PCM is selected, then the accompanying textbox will be disabled andMP2TSME will use the pre-defined value for PCM data of 0x810000…0000D9. If DATA is selected, the channel statussequence will be set to 0xC10000…000077. This value should be used for non-PCM data, for example, Dolby-E audio. If USER is selected, the textbox will be enabled to allow the user to input a 24-byte value. The data should be entered as astring of 48 hexadecimal characters.

Rate

Data Formatnon-negative real number

Unitsbits per second

Range0 (use computed bit rate)1 to 60 000 000

DefaultAuto

DescriptionThe Rate Parameter specifies the maximum rate in bits per second that should be used for this SMPTE 302M stream. Ifthe Auto box is checked, then the Multiplexer will compute the rate based on the SMPTE 302M 48Ksps rate, the numberof AES3 streams and the word size. If the Auto box is unchecked, then the accompanying textbox will be enabled to allowentry of a value. The value should be a non-negative real number that specifies the desired bit rate in bits per second(bps). The valid range is 1 to 60 000 000 bps, inclusive. It may include fractional bps. Setting the Rate value to 0 isequivalent to checking the Auto box. By default, the Auto box is checked.

The Multiplexer will continue to protect the decoder FIFO in spite of a higher than appropriate rate. However, using alower rate will result in decoder buffer underflow. The Multiplexer can not prevent this from happening.

RefVideoPID

Data Formatnon-negative integer

Range16 to 8190 (0x0010 to 0x1FFE)

Page 123: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 115

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DefaultAuto

DescriptionThe RefVideoPID Parameter specifies the PID of the reference video stream for this SMPTE 302M stream. This videostream is used as the reference for this SMPTE 302M stream's timestamps. If the Auto box is checked, then the firstvideo stream in this program will be used. If the Auto box is unchecked, then the accompanying textbox will be enabled toallow entry of a value. The value must be an integer between 16 and 8190, inclusive (0x0010 and 0x1FFE). The value maybe specified in decimal, or if prefaced with a "0x", in hexadecimal. By default, the Auto box is checked.

Comment

Data Formatstring

DescriptionThe Comment Parameter allows you to enter optional text comments when the current configuration is saved in a file. Thistext will appear as a comment block starting with the line immediately after the SMPTE 302M Subsection Title (e.g.,SMPTE302M1$) in the saved configuration file. The text can have multiple lines. If the current configuration is loaded froma configuration file, the Comment Parameter will display any comment lines that appear between the SMPTE 302MSubsection Title and the title of the next section or subsection in the file.

Remultiplex Parameters

Remux Stream

Data Formatenumerated

ValuesNo (no remultiplexing)Yes

DefaultNo

DescriptionThe Remux Stream Parameter indicates if the SMPTE 302M stream is to be remultiplexed from an input transport stream.The No option should be selected if the input file is not a multiplexed stream, but is the SMPTE 302M stream itself. TheYes option should be selected if the input file is an MPEG-2 transport stream that contains the source SMPTE 302Mstream. The default value is No.

The SMPTE 302M stream to be remultiplexed may only consist of one AES3 or PCM data stream. Remultiplexing ofSMPTE 302M streams carrying multiple data streams is not supported.

SourceTSPID

Data Formatnon-negative integer, decimal or hexadecimal

Range1 to 8190 (0x0001 to 0x1FFE)

Defaultdisabled

DescriptionThe SourceTSPID Parameter is only enabled if the Remux Stream Parameter is set to Yes. SourceTSPID specifies thePID that carries the source SMPTE 302M stream when the input file is an MPEG-2 transport stream. The Multiplexer willextract the SMPTE 302M stream associated with the specified PID, and remultiplex it in the output transport stream. Thevalid range for the SourceTSPID value is 1 to 8190. The value may be specified in decimal, or if prefaced with a "0x", inhexadecimal.

Page 124: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0116

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DescFromData

Data Formatenumerated

ValuesYes (insert descriptors extracted from input stream)No

DefaultNo

DescriptionThe DescFromData Parameter is only enabled if the Remux Stream Parameter is set to Yes. If DescFromData is set toYes, the Multiplexer will extract any descriptors that are associated with the source SMPTE 302M stream in the inputtransport stream, and insert them in the appropriate output PMT, maintaining their association with the remultiplexedstream. If DescFromData is set to No, the Multiplexer will ignore any descriptors that pertain to the SMPTE 302M streamin the input transport stream.

If DescFromData is enabled, it will override any descriptor data defined by the Descriptors Parameter in theconfiguration for the SMPTE 302M stream. That is, the descriptors defined by the Descriptor Parameter will be ignoredand only descriptors extracted from the input transport stream that pertain to the SMPTE 302M stream will be inserted inthe output PMT.

AVSync

Data Formatenumerated

ValuesYes No

DefaultYes

DescriptionThe AVSync Parameter is only enabled if the Remux Stream Parameter is set to Yes. If AVSync is set to Yes and one ormore transport streams are being remultiplexed, the audio-video synchronization is maintained across the file transitions. This allows existing transport streams to be remultiplexed with the lip synch maintained in the new file. This feature isuseful for creating longer streams from trailers or multiple segments and also for remultiplexing existing transport streamsto correct PSI issues or multiplexing problems.

To be effective, the AVSync Parameter must be set to Yes in both the Video and SMPTE 302M configurations thathave the same input transport stream.

PMT Parameters

StreamType

Data Formatnon-negative integer, decimal or hexadecimal

Range0 (determine automatically)0x01 to 0xFF (255)

DefaultAuto

DescriptionThe StreamType Parameter determines the value for the stream_type field that identifies this SMPTE 302M stream in thePMT. If the Auto box is checked, then the Multiplexer will assign a default value of 0x06 to stream_type, indicating privatedata. If the Auto box is unchecked, then the accompanying textbox will be enabled to allow entry of a value. The valueshould be an integer from 1 through 255 (0x01 through 0xFF), inclusive. The value may be specified in decimal, or ifprefaced with a "0x", in hexadecimal. Setting the StreamType value to 0 is equivalent to checking the Auto box.

Page 125: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 117

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Descriptors

Data Formathexadecimal data

Rangeup to 32 descriptors

Defaultnone

DescriptionThe Descriptors Parameter specifies descriptor data that should be associated with this SMPTE 302M stream in the PMT.Up to 32 descriptors may be specified with the Descriptors Parameter. To enter descriptor data, click the Edit button toopen the Descriptors List.

The Descriptors List is the interface used to define and edit the SMPTE 302M stream descriptors. A descriptor may beadded to the list as a sequence of hexadecimal byte values, or may be created using the Descriptor Generator. The listbox will display the hexadecimal data for each descriptor that is added as a separate entry. Use of the Descriptors List isdetailed in the section, Specifying Descriptors.

MP2TSME does not check the validity of the descriptor data that is specified.

Transport Parameters

PID

Data Formatnon-negative integer

Range16 to 8190 (0x0010 to 0x1FFE)

DefaultSee Description

DescriptionThe PID Parameter specifies the PID value used for transport packets that carry this SMPTE 302M stream. This PID isalso identified in the PMT as the stream's elementary_PID. The PID value can be set to any integer between 16 and 8190(0x0010 and 0x1FFE), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal. Bydefault, the stream will be assigned the next available audio PID in the program.

TransportPriority

Data Formatenumerated

ValuesYes (set transport_priority to 1) No

DefaultNo

DescriptionThe TransportPriority Parameter determines the value of the transport_priority bit that appears in all transport packets forthis SMPTE 302M stream. If the TransportPriority value is Yes, then the transport_priority bit will be set to 1 in all packets.If it is No, then the transport_priority will be set to 0.

Adaptation Parameters

Page 126: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0118

Copyright © 1998 - 2010 Manzanita Systems, Inc.

InitDI

Data Formatenumerated

ValuesYes (initial discontinuity_indicator is set to 1) No

DefaultNo

DescriptionThe InitDI Parameter indicates if the first transport packet carrying this SMPTE 302M stream should contain adiscontinuity_indicator with the value of 1. If the Yes option is selected, the discontinuity_indicator will be set in the initialSMPTE 302M packet. If the No option is selected, no discontinuity will be indicated in the first packet.

RAI

Data Formatenumerated

ValuesYes (set random_access_indicator to 1) No

DefaultNo

DescriptionThe RAI Parameter is set to Yes if the random_access_indicator flag should have the value of one in every transportpacket for this SMPTE 302M stream that contains a PES header with a PTS. If the SMPTE 302M PID is also the PCR PID,then a PCR will also be inserted in this packet.

PES Parameters

PEScopyrt

Data Formatenumerated

ValuesYes (copyright set to 1) No (copyright set to 0)

DefaultNo

DescriptionThe PEScopyrt Parameter sets the value of the copyright field that appears in all PES packet headers for this SMPTE302M stream. If the value of the PEScopyrt parameter is Yes, then the copyright field is set to one. If the value is No, thenthe copyright field is set to zero.

PESid

Data Formatnon-negative integer, decimal or hexadecimal

Range0 (determine automatically)0x01 to 0xFF (255)

DefaultAuto (0xBD)

DescriptionThe PESid Parameter specifies the value for the stream_id field in PES packets that carry this SMPTE 302M stream. If the

Page 127: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 119

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Auto box is checked, then the Multiplexer will automatically assign a value of 0xBD (private_stream_1) as specified by theSMPTE standard. If the Auto box is unchecked, then the accompanying textbox will be enabled to allow entry of a value.The value should be a non-negative integer that ranges from 0 through 255 (0xFF), inclusive. The value may be specifiedin decimal, or if prefaced with a "0x", in hexadecimal. Setting the StreamType value to 0 is equivalent to checking the Autobox.

stream_id_extension

Data Formatnon-negative integer, decimal or hexadecimal

Range0x00 to 0x7F

Defaultdisabled

DescriptionThe stream_id_extension Parameter is only enabled when the Auto box that accompanies the PESid Parameter isunchecked. This parameter specifies the value for the stream_id_extension field, when present, in PES packets that carrythis SMPTE 302M stream. The stream_id_extension field will only be encoded in the PES header if the stream_id has thevalue 0xFD. In other words, if the PESid Parameter is set to 0xFD, the Multiplexer will use the value specified for thestream_id_extension Parameter as the value of the PES stream_id_extension. If a value other than 0xFD is assigned tothe PESid Parameter, then the Multiplexer ignores the stream_id_extension Parameter.

PESpri

Data Formatenumerated

ValuesYes (PES_priority set to 1) No (PES_priority set to 0)

DefaultNo

DescriptionThe PESpri Parameter indicates the state of the PES_priority field that appears in all PES headers for this SMPTE 302Mstream. If the value is Yes, then the PES_priority field in all PES headers will be set to 1. Setting the value to No assignsthe PES_priority a value of 0.

PESorig

Data Formatenumerated

ValuesYes (original_or_copy set to 1) No (original_or_copy set to 0)

DefaultNo

DescriptionThe PESorig Parameter indicates the state of the original_or_copy field that appears in all PES headers for this SMPTE302M stream. If the value is Yes, then the original_or_copy field in all PES headers will be set to a value of 1. Setting thevalue to No assigns the original_or_copy field a value of 0.

Timing Parameters

Page 128: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0120

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DBsize

Data Formatnon-negative decimal integer

Unitsbytes

Range0 (use SMPTE 302M model)1 to 2 000 000 000

DefaultSTD

DescriptionThe DBsize Parameter determines the size of the decoder buffer for this SMPTE 302M stream. If the STD box is checked,then the decoder buffer size is 65024 bytes as defined by SMPTE 302M specification. If the STD box is unchecked, thenthe accompanying textbox will be enabled to allow entry of the desired buffer size in bytes. The value should be an integerbetween 1 through 2 000 000 000, inclusive. Setting the DBsize value to 0 is equivalent to checking the STD box.

StreamDelay

Data Formatnon-negative decimal integer

Units90 kHz clock cycles

Range0 to 1 000 000 000

Default0

DescriptionThe StreamDelay Parameter specifies the length of time that this SMPTE 302M stream should be delayed from thebeginning of the program. The units for the value are 90 kHz clock cycles. The value must be an integer between 0 and 1000 000 000. This parameter may be used to achieve lip sync when the various streams were not encoded at the sametime. If the value is set to 0, then insertion of this elementary stream will not be delayed.

Delay

Data Formatinteger

Units90 kHz clock cycles

Range-90 000 to 90 000

Default0

DescriptionThe Delay Parameter represents an additional delay that is added to the precomputed initial delay for the first access unitin this SMPTE 302 M stream. The units for the value are 90 kHz clock cycles. The value must be a positive or negativeinteger that ranges from -90 000 to 90 000. The initial delay is used as the presentation time stamp (PTS) for the first PESpacket. SMPTE 302M streams have their base initial delay set to match the reference video stream. The base initial delaycan be adjusted with this parameter. The SMPTE specification requires that the SMPTE data have the same PTS valuesas the corresponding video access units. Therefore this parameter should not be used unless an illegal stream is desired.

Priority

Data Formatenumerated

ValuesYes (give SMPTE 302M packets multiplexing priority) No

Page 129: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 121

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DefaultNo

DescriptionThe Priority Parameter indicates if transport packets for this SMPTE 302M stream should be inserted into the multiplex withminimal jitter. This option should not normally be used. If the Priority Parameter is set to Yes, then the packets for thisSMPTE 302M stream are given priority when multiplexed. Setting the value to No indicates that a higher multiplexingpriority should not be used.

SBrate

Data Formatnon-negative decimal integer

Unitsbits per second

Range0 to 1 000 000 000

Default0

DescriptionThe SBrate Parameter specifies the drain rate of the smoothing buffer for this SMPTE 302M stream. The value must be anon-negative integer representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000, inclusive. If asmoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given. A value of 0indicates that a smoothing buffer is not used.

SBsize

Data Formatnon-negative decimal integer

Unitsbytes

Range0 to 2 000 000 000

Default0

DescriptionThe SBsize Parameter specifies the size of the smoothing buffer for this SMPTE 302M stream. The value must be anon-negative integer representing the buffer size in bytes. The valid range is 0 to 1 000 000 000, inclusive. If a smoothingbuffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given. A value of 0 indicatesthat a smoothing buffer is not used.

Source Parameters

ChannelID

Data Formatnon-negative decimal integer

Range0 to 255

Default0

DescriptionThe ChannelID Parameter specifies the channel_identification field in the SMPTE 302M header. This parameter isnormally used when more than four AES3 streams, or eight channels, are desired, in which case the additional channelsmust be carried in a separately configured SMPTE 302M stream. The channel_identification is the channel number of thefirst channel in this SMPTE 302M stream. Setting the value to 0 indicates this is either the first or only set of AES3streams.

Page 130: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0122

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Validity

Data Formatenumerated

ValuesYesNo

DefaultNo

DescriptionThe Validity Parameter determines the value of the Validity bit in each subframe of this SMPTE 302M stream. If theValidity Parameter is set to Yes, then the Validity bit will have a value of one. If it is set to No, then the Validity bit will begiven a value of zero.

BitReversed

Data Formatenumerated

ValuesYesNo

DefaultNo

DescriptionThe BitReversed Parameter indicates if the AES3 data is in bit reversed order. Bit reversed data will have the leastsignificant bit in the highest position of the word. If the data is bit reversed, the entire sample word is reversed. If only thebits in each byte of the sample word are reversed, then both BitReversed and ByteReversed should be active. Setting theBitReversed Parameter to No indicates that the input data is not in bit reversed order.

ByteReversed

Data Formatenumerated

ValuesYesNo

DefaultNo

DescriptionThe ByteReversed Parameter indicates if the AES3 data words are in byte reversed order. Byte reversed data will havethe least significant byte in the highest or first position. Setting the ByteReversed Parameter to No indicates that the inputdata is not in byte reversed order.

BytesPerWord

Data Formatnon-negative decimal integer

Range1 to 4

Default3

DescriptionThe BytesPerWord Parameter indicates how many bytes are in the source file for each AES3 word. There may be from 1to 4 bytes per source word. Note that if the source word is smaller than the WordSize Parameter value, then the additionalrequired bits will be set to zero.

Page 131: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 123

Copyright © 1998 - 2010 Manzanita Systems, Inc.

MSjustified

Data Formatenumerated

ValuesYesNo

DefaultNo

DescriptionThe MSjustified Parameter indicates how the input data is positioned within the input data bytes. The data sample may befrom 16 to 24 bits, while the input data word may be from 1 to 4 bytes. The data may be either positioned in the upper bitsof the data (MSjustified = Yes), or in the least significant bits (MSjustified = No). Note that if the WordSize is larger thanthe BytesPerWord in bits, then MSjustified is ignored. Setting the MSjustified Parameter to No indicates that the data bitsare in the least significant bit positions of the input word.

WordSize

Data Formatenumerated

Values162024

Default24

DescriptionThe WordSize Parameter specifies the number of bits in each AES3 data word. The allowable values are 16, 20 or 24 bitsper word.

Page 132: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0124

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.1.19 Setting Private Stream Parameters

Private Streams are program associated data streams, like subtitles and teletext, that are identified in the program's PMT with astream_type of 0x06, or "PES packets containing private data". MP2TSME can multiplex up to 16 Private Streams in eachprogram.

MP2TSME supports two types of Private Streams:

· private_stream_1 - Streams that carry data that must be synchronized to the video stream in the program, like DVBsubtitles and ITU-R System B Teletext, are generally assigned a PES stream_ID of 0xBD, or "private_stream_1". ThePES headers for private_stream_1 may contain time stamps (PTS/DTS) and extra information such as the copyrightfield.

· private_stream_2 - Asynchronous data streams, like KLV (Key Length Value) data, may also be associated with aprogram and multiplexed in PES packets. These streams are typically identified with a PES stream_ID of 0xBF, or"private_stream_2". The PES headers for private_stream_2 only contain the stream_ID and a length field, and can carryno time stamps.

Each Private Stream that you insert into a program will appear as a new entry under the appropriate Program entry in theMultiplex Pane. The entries are identified with a sequentially numbered label as they are added, i.e., PrivateStream1,PrivateStream2, etc.

The title of the Parameters Dialog Box that is associated with a given Private Stream entry will have both program and PrivateStream identifiers, e.g., "Program2 PrivateStream1 Parameters". The Private Stream Parameters Dialog Box lists theconfiguration parameters that are specific for the Private Stream multiplexed stream. These parameters specify the input datafile, define how the input data is encoded, configure encoding of the transport packets and PES headers, and determinebuffering and delays.

If the Private Stream Parameters Dialog Box is for a new multiplex configuration, the parameters will have default settings. Youshould review these default values and modify them if necessary for your application before running the Multiplexer.

The Private Stream parameters are divided into seven functional categories as listed below:

Input Remultiplex PMT Transport

Files Remux Stream StreamType PID

Rate SourceTSPID DescFromFile TransportPriority

DataOnly DescFromData Descriptors

FrameSize

Comment

Adaptation PES Timing

InitDI PEScopyrt DBsize

RAI PESid StreamDelay

PESpri Priority

PESorig SBrate

SBsize

TimeOffset

TimestampRatio

AdvanceTime

SyncVideoTC

AdjustStart

NoVideoBase

Page 133: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 125

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The Private Stream Parameters Dialog Box has seven button bars, one for each of the seven categories. The parameters undera given category appear below the associated button bar, which can be opened or collapsed with a single mouse click.

The rest of this section describes each Private Stream parameter in detail. The listed default values are the same for allconfiguration types (Standard, CableLabs SD, and CableLabs HD).

Input Parameters

Files

Data Formatpathname or filename string

Defaultnone

DescriptionThe Files Parameter specifies the name of the input file for the Private Stream. If the file was inserted into the configurationusing drag-and-drop or with the Insert File command on the Tool Bar or Menu Bar, then the pathname of the input file willbe displayed in the Files textbox. To change the input file, the pathname can be edited directly in the textbox or you can

click the button to browse your system to select the location and name of a different input file.

The input data for a Private Stream can be provided to the Multiplexer in four different ways:

· Data only - The input file is the binary data that will be the payload of the Private Stream PES packets. In this case,the DataOnly Parameter must be set to Yes, the FrameSize Parameter must be specified, and the Rate Parametermust be assigned a value, i.e., the Auto setting cannot be used.

· Index and data in one file - The input file is a Private Stream Data file that uses a specific format defined byManzanita Systems. The file includes PES packet information, lengths, and timing in an XML "index", followed by thebinary payload data. In this case, the DataOnly Parameter must be set to No.

· Index and data in separate files - Instead of a combined index-data file, the text-readable index and the binarypayload data can be provided as two separate files. Both files must be located in the same directory. The index filemust be specified as the input file, i.e., assigned to the Files Parameter. In this case, the DataOnly Parameter mustbe set to No.

· Multiplexed data stream - The input stream, e.g., DVB subtitle data, is multiplexed in an existing transport stream. In this case, the appropriate Remultiplex Parameters must also be specified, and the transport stream file must be specified as the input file using the Files Parameter. Only private_stream_1 can be remultiplexed.

The two-character string %i can be used in the specified name if the input data is segmented into multiple files that aresequentially named. The %i string represents an integer index that begins with 1. For example, if the input stream iscontiguously segmented into four files named part1.dvbsub, part2.dvbsub, part3.dvbsub, and part4.dvbsub, the filenameused for Files Parameter is part%i.dvbsub. The Multiplexer will look for a sequence of input files in the specified pathstarting with part1.dvbsub, and multiplex them as one continuous data stream. It will stop multiplexing when it reaches thelast file name in the sequence. The multiple input files should make up a continuous data stream when they areconcatenated.

If the input data is segmented into files that are not sequentially named with an integer index starting from 1, then the Multiple button should be used to open the Input File List box. From this box you can explicitly specify the name of eachinput file by clicking the Add button to open the Select Stream box. The order that the names appear in the File List is theorder in which MP2TSME will sequentially read the input stream. You would use this method, for example, if you want tomultiplex the files promo.dvbsub, trailer.dvbsub, and movie.dvbsub as one continuous stream. The multiple input filesshould make up a continuous data stream when they are concatenated.

MP2TSME will give you an error and will not proceed if you try to run the Multiplexer without specifying a PrivateStream Files parameter.

Page 134: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0126

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Rate

Data Formatnon-negative real number

Unitsbits per second

Range0 (use encoded bit rate)1 to 60 000 000

DefaultAuto

DescriptionThe Rate Parameter determines the maximum rate in bits per second that should be used for the Private Stream datawhen it is multiplexed.

If the Auto box is checked, then the Multiplexer will use a maximum rate of 192 kbps for Standard Definition (SD) DVBsubtitles and 400 kbps for High Definition (HD) DVB subtitles. For other types of data, e.g., teletext, the Multiplexer willexamine the first 100 packets of data and use the highest rate that was computed.

If the Auto box is unchecked, then the accompanying textbox will be enabled to allow entry of a value. The value should bea non-negative real number that specifies the desired bit rate in bits per second (bps). The valid range is 1 to 60 000 000bps, inclusive. It may include fractional bps. Setting the Rate value to 0 is equivalent to checking the Auto box.

If the DataOnly Parameter is set to Yes, then the Auto box will be disabled, and the Rate parameter must be assigned anon-zero value. This rate will determine the spacing of the PES packets in time. A higher rate results in packets that arespaced further apart.

Private Streams that are identified as private_stream_1 are packaged in access units that are each time-stamped witha presentation time to synchronize with the video and audio elementary streams. The Multiplexer will multiplex eachPrivate Stream access unit at the rate indicated by the Rate parameter as necessary to maintain timing with video andaudio. However, because of the nature of subtitles and teletext, there may be a period when there is no data. In thiscase, the Private Stream PID will be absent from the output transport stream until it is time to transport the next accessunit.

DataOnly

Data Formatenumerated

ValuesYes No

Default No

DescriptionThe DataOnly Parameter indicates the format of the input file specified by the Files Parameter. If DataOnly is No, then thefile is in a specific format defined by Manzanita Systems referred to in this document as a Private Stream Data file. Thisfile consists of the binary data preceded by an XML document that defines the PES packet sizes and presentation times tobe used when the stream is packetized. If DataOnly is set to Yes, then the input file is only the binary data. In this case,the FrameSize Parameter must be specified, and the Rate Parameter must be assigned a non-zero value, i.e., the Autosetting cannot be used.

If DataOnly is Yes, the Multiplexer will use the PESid Parameter to determine if the data should be multiplexed asprivate_stream_1 or private_stream_2.

If DataOnly is Yes, then all Private Stream PES packets will have the same length as specified by the FrameSizeParameter.

FrameSize

Data Formatnon-negative integer

Units

Page 135: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 127

Copyright © 1998 - 2010 Manzanita Systems, Inc.

bytesRange

0 to 100 000Default

disabledDescription

The FrameSize Parameter is only enabled if the DataOnly Parameter is set to Yes. FrameSize specifies the size in bytesof the PES packet payload for the stream. The valid range for the FrameSize value is 0 to 100 000. FrameSize has noeffect if DataOnly is No.

If DataOnly is Yes, then all Private Stream PES packets will be the same length as specified by the FrameSizeParameter.

Comment

Data Formatstring

DescriptionThe Comment Parameter allows you to enter optional text comments when the current configuration is saved in a file. Thistext will appear as a comment block starting with the line immediately after the Private Stream Subsection Title (e.g.,PrivateStream1Data1$) in the saved configuration file. The text can have multiple lines. If the current configuration isloaded from a configuration file, the Comment Parameter will display any comment lines that appear between the PrivateStream Subsection Title and the title of the next section or subsection in the file.

Remultiplex Parameters

Remux Stream

Data Formatenumerated

ValuesNone (no remultiplexing)Transport

DefaultNone

DescriptionThe Remux Stream Parameter indicates if the Private Stream data (e.g., DVB subtitle or teletext) is to be remultiplexedfrom an input transport stream. The None option should be selected if the input file is not a multiplexed stream, but is aManzanita format Private Stream Data file. The Transport option is used to indicate that the input file is an MPEG-2transport stream that contains the source DVB subtitle or teletext data.

Only private_stream_1 can be remultiplexed.

SourceTSPID

Data Formatnon-negative integer, decimal or hexadecimal

Range1 to 8190 (0x0001 to 0x1FFE)

Defaultdisabled

DescriptionThe SourceTSPID Parameter is only enabled if the Remux Stream Parameter is set to Transport. SourceTSPID specifiesthe PID that carries the source DVB subtitle or teletext data in the input transport stream. The Multiplexer will extract thedata associated with the specified PID, and remultiplex it in the output transport stream. The valid range for theSourceTSPID value is 1 to 8190. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

Page 136: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0128

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DescFromData

Data Formatenumerated

ValuesYes (insert descriptors extracted from input stream)No

Default Yes

DescriptionThe DescFromData Parameter is only enabled if the Remux Stream Parameter is set to Transport. If DescFromData isset to Yes, the Multiplexer will extract any descriptors that are associated with the source data stream in the input transportstream, and insert them in the appropriate output PMT, maintaining their association with the remultiplexed stream. IfDescFromData is set to No, the Multiplexer will ignore any descriptors that pertain to the source stream in the inputtransport stream.

If DescFromData is enabled, it will override any descriptor data defined by the Descriptors Parameter in theconfiguration for the Private Stream stream. That is, the descriptors defined by the Descriptor Parameter will be ignoredand only descriptors extracted from the input transport stream that pertain to the source data will be inserted in the outputPMT.

PMT Parameters

StreamType

Data Formatnon-negative integer, decimal or hexadecimal

Range0 (determine automatically)0x01 to 0xFF (255)

DefaultAuto

DescriptionThe StreamType Parameter determines the value for the stream_type field that identifies this Private Stream stream in thePMT. If the Auto box is checked, then the Multiplexer will use a value of 0x06, i.e., "PES packets containing private data".If the Auto box is unchecked, then the accompanying textbox will be enabled to allow entry of a value. The value should bean integer from 1 through 255 (0x01 through 0xFF), inclusive. The value may be specified in decimal, or if prefaced with a"0x", in hexadecimal. Setting the StreamType value to 0 is equivalent to checking the Auto box.

DescFromFile

Data Formatenumerated

ValuesYes (insert descriptors specified in the input file)No

DefaultNo

DescriptionThe DescFromFile Parameter indicates the source for the descriptor data that should be associated with this PrivateStream. If DescFromFile is set to Yes, the Multiplexer will use the descriptors, if any, that are defined in the input PrivateStream Data file, and any descriptors specified using the Descriptors Parameter will be ignored. If DescFromFile is set to No, the Multiplexer will ignore any descriptors that are in the input data file, and only use those configured with theDescriptors Parameter.

Page 137: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 129

Copyright © 1998 - 2010 Manzanita Systems, Inc.

In general, the DescFromFile Parameter should be Yes, if the input file has been generated by the DVB Subtitles Tool.In this case, the input file may include DVB-required descriptors. These descriptors, however, can be overridden by settingDescFromFile to No and defining replacement descriptors with the Descriptors Parameter.

Descriptors

Data Formathexadecimal data

Rangeup to 32 descriptors

Defaultnone

DescriptionThe Descriptors Parameter specifies descriptor data that should be associated with this Private Stream in the PMT. Up to32 descriptors may be specified with the Descriptors Parameter. To enter descriptor data, click the Edit button to open theDescriptors List.

The Descriptors List is the interface used to define and edit the descriptors. A descriptor may be added to the list as asequence of hexadecimal byte values, or may be created using the Descriptor Generator. The list box will display thehexadecimal data for each descriptor that is added as a separate entry. Use of the Descriptors List is detailed in thesection, Specifying Descriptors.

MP2TSME does not check the validity of the descriptor data that is specified.

Transport Parameters

PID

Data Formatnon-negative integer

Range16 to 8190 (0x0010 to 0x1FFE)

DefaultSee Description

DescriptionThe PID Parameter specifies the PID value used for transport packets that carry this Private Stream. This PID is alsoidentified in the PMT as the stream's elementary_PID. Tthe PID value can be set to any integer between 16 and 8190(0x0010 and 0x1FFE), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

The first three data streams (non-video and non-audio) in programs with ProgramNumber values 2 through 401 areassigned default PID values using the algorithm of 16 * ProgramNumber + 12 + N, where N equals 1 for the first datastream, 2 for the second data stream, and 3 for the third data stream. Program-related data streams that are assignedPIDs with this method include Table Data, Private Stream data, and SCTE 35 data. For example, if the first data streamthat is inserted in a program with ProgramNumber 3 is TableData1, it is assigned a default PID value of 16 * 3 + 11 + 2 =61 (0x003D). If PrivateStream1 is next inserted, it will be given a default PID value of 0x003E. When a third data stream,whether it is Table Data, Private Stream, or SCTE 35, is added, it will be assigned a PID value of 0x003F.

The fourth and higher data streams (Table Data, Private Stream, or SCTE 35) that are inserted in a program will beassigned the first available PID value between 6432 and 8190 (0x1920 and 0x1FFE), inclusive. Similarly, all data streamsinserted in programs with a ProgramNumber value greater than 401 will be assigned the first available value in this upperrange.

TransportPriority

Data Formatenumerated

ValuesYes (set transport_priority to 1)

Page 138: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0130

Copyright © 1998 - 2010 Manzanita Systems, Inc.

NoDefault

NoDescription

The TransportPriority Parameter determines the value of the transport_priority bit that appears in all transport packets forthis Private Stream. If the TransportPriority value is Yes, then the transport_priority bit will be set to 1 in all packets. If it isNo, then the transport_priority will be set to 0.

Adaptation Parameters

InitDI

Data Formatenumerated

ValuesYes (initial audio discontinuity_indicator is set to 1) No

DefaultNo

DescriptionThe InitDI Parameter indicates if the first transport packet carrying the Private Stream should contain adiscontinuity_indicator with the value of 1. If the Yes option is selected, the discontinuity_indicator will be set in the initialpacket. If the No option is selected, no discontinuity will be indicated in the first packet.

RAI

Data Formatenumerated

ValuesYes (set random_access_indicator to 1) No

Default

NoDescription

The RAI Parameter is set to Yes if the random_access_indicator flag should have the value of one in every transportpacket for this Private Stream that contains a PES header with a PTS. If the stream's PID is also the PCR PID, then a PCRwill also be inserted in this packet.

PES Parameters

PEScopyrt

Data Formatenumerated

ValuesYes (copyright set to 1) No (copyright set to 0) From Input File

DefaultNo

Description

Page 139: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 131

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The PEScopyrt Parameter determines how the Multiplexer sets the value of the copyright field that appears in all PESpacket headers for this Private Stream. If the value of the PEScopyrt parameter is Yes, then the copyright field is set toone. If the value is No, then the copyright field is set to zero. If the value is From Input File, then the Multiplexer will setthe copyright field according to the settings in the input Private Stream Data file.

PESid

Data Formatnon-negative integer, decimal or hexadecimal

Range0 (determine automatically)0x01 to 0xFF (255)

DefaultAuto

DescriptionThe PESid Parameter can be used to override the stream_id value that is specified in the input Private Stream Data file. Itcan also be used to set the stream_id value if the Private Stream Data file does not, or if the input file payload data only,i.e., the DataOnly Parameter is Yes.

If the PESid Auto box is checked, then the stream_id value assigned in the input file will be used. If no stream_id value isassigned in the input file, then a default value of value of 0xBD (private_stream_1) is used.

If the Auto box is unchecked, then the accompanying textbox will be enabled to allow entry of a value. The value should bea non-negative integer that ranges from 0 through 255 (0xFF), inclusive. The value may be specified in decimal, or ifprefaced with a "0x", in hexadecimal. Setting the StreamType value to 0 is equivalent to checking the Auto box. The valuethat is assigned to the PESid Parameter will override the stream_id that is specified in the input Private Stream Data file (ifpresent).

The stream_id that is ultimately assigned will determine whether the Private Stream is multiplexed as private_stream_1 orprivate_stream_2. A value of 0xBD indicates that the stream is private_stream_1, while a value of 0xBD indicatesprivate_stream_2.

To multiplex a Private Stream as private_stream_2, the input file should be payload data only, the DataOnly Parametershould be Yes, and the PESid value must be 0xBF.

PESpri

Data Formatenumerated

ValuesYes (PES_priority set to 1) No (PES_priority set to 0) From Input File

Default

NoDescription

The PESpri Parameter determines how the Multiplexer sets the value of the PES_priority field that appears in all PESheaders for this Private Stream. If the value is Yes, then the PES_priority field in all PES headers will be set to 1. Settingthe PESpri Parameter to No will assign the PES_priority a value of 0. If the value is From Input File, then the Multiplexerwill set the PES_priority field according to the settings in the input Private Stream Data file.

PESorig

Data Formatenumerated

ValuesYes (original_or_copy set to 1) No (original_or_copy set to 0) From Input File

Default

No

Page 140: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0132

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DescriptionThe PESorig Parameter determines how the Multiplexer sets the value of the original_or_copy field that appears in all PESheaders for this Private Stream. If the value is Yes, then the original_or_copy field in all PES headers will be set to a valueof 1. Setting the PESorig Parameter to No will assign the original_or_copy field a value of 0. If the value is From InputFile, then the Multiplexer will set the original_or_copy field according to the settings in the input Private Stream Data file.

Timing Parameters

DBsize

Data Formatnon-negative decimal integer

Unitsbytes

Range0 (use standard buffer model)1 to 1 000 000 000

Default0

DescriptionThe DBsize Parameter determines the size of the decoder buffer for this Private Stream. The value for DBsize is thedesired buffer size in bytes. The valid range is 1 through 1 000 000 000, inclusive. A value of 0 indicates that the standardbuffer size should be used.

StreamDelay

Data Formatnon-negative decimal integer

Units90 kHz clock cycles

Range0 to 2 000 000 000

Default0

DescriptionThe StreamDelay Parameter specifies the length of time that the Private Stream should be delayed from the beginning ofthe program. The units for the value are 90 kHz clock cycles. The value must be an integer between 0 and 2 000 000 000.This parameter may be used to achieve sync when the various streams were not encoded at the same time. For example,if this Private Stream data is leading the video stream, then the StreamDelay Parameter may be used for alignment. Thedefault value for the StreamDelay parameter is 0, which is not to delay insertion of this elementary stream.

Priority

Data Formatenumerated

ValuesYes (give audio packets multiplexing priority) No

DefaultNo

DescriptionThe Priority Parameter indicates if transport packets for this Private Stream should be inserted into the multiplex withminimal jitter. If the Priority Parameter is set to Yes, then the packets for this Private Stream are given priority whenmultiplexed. The default value is No, which indicates that a higher multiplexing priority should not be used.

Page 141: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 133

Copyright © 1998 - 2010 Manzanita Systems, Inc.

SBrate

Data Formatnon-negative decimal integer

Unitsbits per second

Range0 to 1 000 000 000

Default0

DescriptionThe SBrate Parameter specifies the drain rate of the smoothing buffer for this Private Stream. The value must be anon-negative integer representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000, inclusive. If asmoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given. The defaultvalue is 0, which is not to have a smoothing buffer for the Private Stream.

SBsize

Data Formatnon-negative decimal integer

Unitsbytes

Range0 to 2 000 000 000

Default0

DescriptionThe SBsize Parameter specifies the size of the smoothing buffer for this Private Stream. The value must be anon-negative integer representing the buffer size in bytes. The valid range is 0 to 1 000 000 000, inclusive. If a smoothingbuffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given. The default value is 0,which is not to have a smoothing buffer for this Private Stream.

TimeOffset

Data FormatDuration (HH:MM:SS:FF)

Range-24:00:00:00 to 24:00:00:00

Default0:0:0:0

DescriptionThe TimeOffset Parameter enables adjustment of the start time of the Private Stream. The specified value should be induration format (HH:MM:SS:FF), where HH is a number of hours (00 to 24), MM is a number of minutes (00 to 59), SS is anumber of seconds (00 to 59), and FF is a number of frames. The duration may be negative, which will adjust the datastream backward in time. The most significant places in the timecode default to zero, and may be omitted. For example, atimecode of "1:20:5" would be interpreted as one minute, twenty seconds and five frames.

Note that if the original PTS is T, and both the TimeOffset and the TimestampRatio have non-zero values, then theadjusted PTS will be: TimestampRatio * T + TimeOffset.

TimestampRatio

Data Formatnon-negative real number

UnitsPMTs per second

Range0.1 to 4.0

Default

Page 142: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0134

Copyright © 1998 - 2010 Manzanita Systems, Inc.

1.0Description

The TimestampRatio Parameter specifies a value by which all presentation time stamps (PTS) in the Private Stream datafile should be multiplied. The TimestampRatio value should be a non-zero, non-negative number in double format. Thevalid range is 0.1 to 4.0.

Note that if the original PTS is T, and both the TimeOffset and the TimestampRatio have non-zero values, then theadjusted PTS will be: TimestampRatio * T + TimeOffset.

AdvanceTime

Data Formatnon-negative integer

Unitsms

Range0 to 30 000

DefaultAuto

DescriptionThe AdvanceTime Parameter specifies the number of milliseconds that a Private Stream access unit should be delivered inadvance of its designated presentation time. If the Auto box is checked, then the Multiplexer will use a value of 333 ms ifthe stream is DVB subtitle data, and 40 ms if it is teletext. If the Auto box is unchecked, then the accompanying textbox willbe enabled to allow entry of a value. The value should be an integer from 0 through 30 000, inclusive. Setting theAdvanceTime value to 0 is equivalent to checking the Auto box.

SyncVideoTC

Data Formatenumerated

ValuesYesNo

DefaultNo

DescriptionThe SyncVideoTC Parameter indicates if the Private Stream should be synchronized to the timecodes in the videoelementary stream. If the SyncVideoTC Parameter is set to No, then the Private Stream presentation times are expectedto be 0-based. If it is set to Yes, then the Private Stream presentation times are expected to be synchronized to thetimecodes found in the associated video's GOP headers

AdjustStart

Data Formatenumerated

ValuesYesNo

DefaultYes

DescriptionThe Start Parameter can be used to multiplex the input video stream starting at a specified timecode, discarding the initialduration of the video before that point. If the Start Parameter is enabled and set in the configuration, the AdjustStartParameter can be set to Yes to direct the Multiplexer to discard the same duration from the start of the Private Streamdata. If AdjustStart is set to No, the Multiplexer will always multiplex Private Stream data from the start of the file. Bydefault, AdjustStart is set to Yes.

Page 143: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 135

Copyright © 1998 - 2010 Manzanita Systems, Inc.

NoVideoBase

Data Formatenumerated

ValuesYesNo

DefaultNo

DescriptionThe NoVideoBase Parameter should be set to Yes if the Private Stream data is not time-aligned with the video elementarystream. In this case, the Multiplexer will set the timestamps using only the timing information in the input Private StreamData file. If NoVideoBase is set to No and a video elementary stream is present in the program, the Private Streamtimestamps will be synchronized with the video timestamps.

4.1.19.1 Private Stream Data File

To multiplex synchronous data, e.g., DVB subtitles, in a single Private Stream PID as private_stream_1, the input file must be ina specific format that is defined by Manzanita Systems. This file, referred to as a Private Stream Data file, includes PES packetinformation, lengths, and timestamps in an XML "index" document. The index can be concatenated with the binary payloaddata, or can contain a file attribute that names the binary payload data file.

Similarly, the input file for a Private Stream to be multiplexed as private_stream_2 can also be a Private Stream Data file. In thiscase, the timestamps that are provided in the index are used as insertion times for the PES packets rather than PTS.

The Private Stream Data file can be generated by inputting subtitle data into the DVB Subtitles Tool, or by extracting a privatestream from an existing transport stream using the Demultiplexer (see Demultiplexing Private Stream Data from the UI).

The index can contain the following general information about the private stream:

· Maximum data rate

· Data buffer size and data drain rate

· Associated PMT descriptors

For each PES packet of data there will be an element that contains the following information:

· Timestamp for the presentation or insertion time of the data

· Optional timestamp for the decoding time of the data

· Optional filename where the data to be inserted can be found

· Offset into the data file that indicates the start of this packet of data

· Optional alignment flag

The XML Schema for the Private Stream Data file can be found at:

http://www.manzanitasystems.com/schema/v1.01/private_stream_1

Page 144: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0136

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.1.20 Setting SCTE 35 Data Parameters

MP2TSME supports the multiplexing of data streams carrying Splice Information Table messages as defined in ANSI/SCTE 352007, including all features specified in CableLabs Content Encoding Profiles 2.0. The Splice Information Table can be used tocarry notification and timing commands about upcoming splice and insertion events to the receiver. For each program, up tofour streams may be configured as SCTE 35 Data streams.

The input file for an SCTE 35 Data stream must be in a specific format that is defined by Manzanita Systems as discussed inthe section, SCTE 35 Data File.

Each SCTE 35 Data stream that you insert into a program will appear as a new entry under the appropriate Program entry in theMultiplex Pane. The entries are identified with a sequentially numbered label as they are added, i.e., SCTE35_1, SCTE35_2,etc.

The title of the Parameters Dialog Box that is associated with a given SCTE 35 Data stream entry will have both program andSCTE 35 Data identifiers, e.g., "Program2 SCTE35_1 Parameters". The SCTE 35 Data Parameters Dialog Box lists theconfiguration parameters that are specific for the SCTE 35 Data multiplexed stream.

If the SCTE 35 Data Parameters Dialog Box is for a new multiplex configuration, the parameters will have default settings. Youshould review these default values and modify them if necessary for your application before running the Multiplexer.

The SCTE 35 Data parameters are divided into five functional categories as listed below:

Input PMT Transport Transport Timing

Files Descriptors PID InitDI TimeOffset

Rate TransportPriority Heartbeat

Comment AdvanceTime

SyncVideoTC

AdjustStart

The SCTE 35 Data Parameters Dialog Box has five button bars, one for each of the five categories. The parameters under agiven category appear below the associated button bar, which can be opened or collapsed with a single mouse click.

The rest of this section describes each SCTE 35 Data Parameter in detail. The listed default values are the same for allconfiguration types (Standard, CableLabs SD, and CableLabs HD).

Input Parameters

Files

Data Formatpathname or filename string

Defaultnone

DescriptionThe Files Parameter specifies the name of the input SCTE 35 Data file. If the file was inserted into the configuration usingdrag-and-drop or with the Insert File command on the Tool Bar or Menu Bar, then the pathname of the input file will bedisplayed in the Files textbox. To change the input file, the pathname can be edited directly in the textbox or you can click

the button to browse your system to select the location and name of a different input file.

The input file for an SCTE 35 Data stream must be in a specific format that is defined by Manzanita Systems as describedin the section, SCTE 35 Data File.

The two-character string %i can be used in the specified name if the input data is segmented into multiple files that are

Page 145: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 137

Copyright © 1998 - 2010 Manzanita Systems, Inc.

sequentially named. The %i string represents an integer index that begins with 1. For example, if the input stream iscontiguously segmented into four files named part1.txt, part2.txt, part3.txt, and part4.txt, the filename used for FilesParameter is part%i.txt. The Multiplexer will look for a sequence of input files in the specified path starting withpart1.txt, and multiplex them as one continuous data stream. It will stop multiplexing when it reaches the last file name inthe sequence. The multiple input files should make up a continuous data stream when they are concatenated.

If the input data is segmented into files that are not sequentially named with an integer index starting from 1, then the Multiple button should be used to open the Input File List box. From this box you can explicitly specify the name of eachinput file by clicking the Add button to open the Select Stream box. The order that the names appear in the File List is theorder in which MP2TSME will sequentially read the input stream. You would use this method, for example, if you want tomultiplex the files promo.txt, trailer.txt, and movie.txt as one continuous stream. The multiple input files should make up acontinuous data stream when they are concatenated.

MP2TSME will give you an error and will not proceed if you try to run the Multiplexer without specifying an SCTE 35Data Files parameter.

Rate

Data Formatnon-negative real number

Unitsbits per second

Range0 (use encoded bit rate)1 to 60 000 000

DefaultAuto

DescriptionThe Rate Parameter determines the maximum rate in bits per second that should be used for the SCTE 35 stream when itis multiplexed.

If the Auto box is checked, then the Multiplexer will use a maximum rate of 192 kbps.

If the Auto box is unchecked, then the accompanying textbox will be enabled to allow entry of a value. The value should bea non-negative real number that specifies the desired bit rate in bits per second (bps). The valid range is 1 to 60 000 000bps, inclusive. It may include fractional bps. Setting the Rate value to 0 is equivalent to checking the Auto box.

The messages in an SCTE 35 Data stream have time-stamps to define specific splice and segmentation points. TheMultiplexer will multiplex packets carrying the messages at a set interval in advance of the time-stamps. However,because splice information is only sent when necessary, there may be a period when there are no messages to deliver. Inthis case, the SCTE 35 Data PID stream will be absent from the output transport stream until it is time to transport the nextmessage.

Comment

Data Formatstring

DescriptionThe Comment Parameter allows you to enter optional text comments when the current configuration is saved in a file. Thistext will appear as a comment block starting with the line immediately after the SCTE 35 Data Subsection Title (e.g.,Scte35Data1$) in the saved configuration file. The text can have multiple lines. If the current configuration is loaded from aconfiguration file, the Comment Parameter will display any comment lines that appear between the SCTE 35 DataSubsection Title and the title of the next section or subsection in the file.

PMT Parameters

Page 146: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0138

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Descriptors

Data Formathexadecimal data

Rangeup to 32 descriptors

Defaultnone

DescriptionThe Descriptors Parameter specifies descriptor data that should be associated with this SCTE 35 Data stream in the PMT. Up to 32 descriptors may be specified with the Descriptors Parameter. To enter descriptor data, click the Edit button toopen the Descriptors List.

The Descriptors List is the interface used to define and edit the descriptors. A descriptor may be added to the list as asequence of hexadecimal byte values, or may be created using the Descriptor Generator. The list box will display thehexadecimal data for each descriptor that is added as a separate entry. Use of the Descriptors List is detailed in thesection, Specifying Descriptors.

MP2TSME does not check the validity of the descriptor data that is specified.

A registration_descriptor containing the SCTE_splice_format_identifier of "CUEI" is automatically added to the PMT forthe program defining the SCTE 35 Data PID.

Transport Parameters

PID

Data Formatnon-negative integer

Range16 to 8190 (0x0010 to 0x1FFE)

DefaultSee Description

DescriptionThe PID Parameter specifies the PID value used for transport packets that carry this SCTE 35 Data stream. This PID isalso identified in the PMT as the stream's elementary_PID. The PID value can be set to any integer between 16 and 8190(0x0010 and 0x1FFE), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

The first three data streams (non-video and non-audio) in programs with ProgramNumber values 2 through 401 areassigned default PID values using the algorithm of 16 * ProgramNumber + 12 + N, where N equals 1 for the first datastream, 2 for the second data stream, and 3 for the third data stream. Program-related data streams that are assignedPIDs with this method include Table Data, Private Stream data, and SCTE 35 data. For example, if the first data streamthat is inserted in a program with ProgramNumber 3 is TableData1, it is assigned a default PID value of 16 * 3 + 11 + 2 =61 (0x003D). If PrivateStream1 is next inserted, it will be given a default PID value of 0x003E. When a third data stream,whether it is Table Data, Private Stream, or SCTE 35, is added, it will be assigned a PID value of 0x003F.

The fourth and higher data streams (Table Data, Private Stream, or SCTE 35) that are inserted in a program will beassigned the first available PID value between 6432 and 8190 (0x1920 and 0x1FFE), inclusive. Similarly, all data streamsinserted in programs with a ProgramNumber value greater than 401 will be assigned the first available value in this upperrange.

TransportPriority

Data Formatenumerated

ValuesYes (set transport_priority to 1) No

DefaultNo

Page 147: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 139

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DescriptionThe TransportPriority Parameter determines the value of the transport_priority bit that appears in all transport packets forthis SCTE 35 Data stream. If the TransportPriority value is Yes, then the transport_priority bit will be set to 1 in all packets.If it is No, then the transport_priority will be set to 0.

Adaptation Parameters

InitDI

Data Formatenumerated

ValuesYes (initial audio discontinuity_indicator is set to 1) No

DefaultNo

DescriptionThe InitDI Parameter indicates if the first transport packet carrying the SCTE 35 Datastream should contain adiscontinuity_indicator with the value of 1. If the Yes option is selected, the discontinuity_indicator will be set in the initialpacket. If the No option is selected, no discontinuity will be indicated in the first packet.

Timing Parameters

TimeOffset

Data FormatDuration (HH:MM:SS:FF)

Range-24:00:00:00 to 24:00:00:00

Default0:0:0:0

DescriptionThe TimeOffset Parameter enables adjustment of the start time of the SCTE 35 Data stream. The specified value shouldbe in duration format (HH:MM:SS:FF), where HH is a number of hours (00 to 24), MM is a number of minutes (00 to 59),SS is a number of seconds (00 to 59), and FF is a number of frames. The duration may be negative, which will adjust thedata stream backward in time. The most significant places in the timecode default to zero, and may be omitted. Forexample, a timecode of "1:20:5" would be interpreted as one minute, twenty seconds and five frames.

Heartbeat

Data Formatnon-negative integer

Unitsmilliseconds

Range0 to 3 600 000

Default0

DescriptionThe Heartbeat Parameter specifies the interval in milliseconds at which a splice_null command should be sent in the SCTE35 Data stream if no splice events are being transmitted. The valid range is 0 to 3 600 000 (one hour). By default, theHeartbeat Parameter is 0, which indicates that no splice_null commands are sent.

Page 148: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0140

Copyright © 1998 - 2010 Manzanita Systems, Inc.

AdvanceTime

Data Formatcomma separated integer list

Unitsseconds

Default4

DescriptionThe AdvanceTime Parameter specifies the number of times that the Multiplexer should send a given splice_insertmessage, and how far in advance of the message time code each message copy should be transmitted. It is specified witha sequence of one or more integers that are separated by commas. Each value gives the number of seconds in advanceof the message time-code that a copy of the message should be sent. For example, if the AdvanceTime Parameter is setto "4,2,1", then the Multiplexer will repeat a splice_insert message at four seconds, two seconds, and one second beforethe message time-code for a total of three times. If the AdvanceTime is left blank, a value of 4 is used, and the Multiplexerwill send each splice_insert message only once at four seconds in advance.

SyncVideoTC

Data Formatenumerated

ValuesYesNo

DefaultNo

DescriptionThe SyncVideoTC Parameter indicates if the SCTE 35 Data stream should be synchronized to the timecodes in the videoelementary stream. If the SyncVideoTC Parameter is set to No, then the SCTE 35 Data presentation times are expectedto be 0-based. If it is set to Yes, then the presentation times are expected to be synchronized to the timecodes found inthe associated video's GOP headers

AdjustStart

Data Formatenumerated

ValuesYesNo

DefaultYes

DescriptionThe Start Parameter can be used to multiplex the input video stream starting at a specified timecode, discarding the initialduration of the video before that point. If the Start Parameter is enabled and set in the configuration, the AdjustStartParameter can be set to Yes to direct the Multiplexer to discard the same duration from the start of the SCTE 35 data. IfAdjustStart is set to No, the Multiplexer will always multiplex SCTE 35 data from the start of the file. By default,AdjustStart is set to Yes.

4.1.20.1 SCTE 35 Data File

To create the data for an SCTE 35 Data PID stream, MP2TSME uses an input text file that is in a Manzanita-specific XMLformat. This file specifies timed splice and/or segmentation points in the program that are to be carried as commands in SpliceInformation Table (splice_info_section) messages.

ANSI/SCTE 35 2007 defines five commands for use in the splice_info_section: splice_null, splice_schedule, splice_insert,time_signal, and bandwidth_reservation. MP2TSME currently only supports use of the following three commands:

Page 149: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 141

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· splice_null - MP2TSME may be configured using the Heartbeat Parameter to send the splice_null command periodically inthe SCTE 35 Data stream if no splice or segmentation information is being transmitted. The splice_null command may act asa heartbeat message to downstream splicing equipment.

· splice_insert - The splice_insert command may be sent one or more times to inform equipment of an impending splice point.Splice points are defined in the input SCTE 35 Data file. The AdvanceTime Parameter is used to specify how many timesthe resulting splice_insert command is sent. MP2TSME supports use of splice_insert to specify a presentation time stamp(PTS) at which all PIDs in the program are to be spliced. Component splice points and cancellations are not supported.

· time_signal - The time_signal command is used with the segmentation descriptor to specify one or more precisely timedsegmentation points in the program. Segmentation points are defined in the input SCTE 35 Data file. Componentsegmentation points and cancellations are not supported.

SCTE 35 Data File Syntax

The XML Schema for the SCTE 35 Data file can be found at:

http://www.manzanitasystems.com/schema/v1/scte35

The SCTE 35 Data file can be constructed with a text editor. Comments can be inserted anywhere in the document bybeginning the comment with the characters <!-- and ending with -->.

The syntax for the XML elements in the SCTE 35 Data file is described below.

<scte35>

The root element for the SCTE 35 Data file is the <scte35> element. The file should begin with the following standard header:

<scte35 xmlns="http://www.manzanitasystems.com/schema/v1/scte35" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.manzanitasystems.com/schema/v1/scte35" version="1">

The file should end with the following footer:

</scte35>

Within the root element, any number of <splice> or <signal> child elements may be present:

<splice>

The <splice> element specifies the precise time of one splice point in the program, and indicates whether it is an "out" point, i.e.,an opportunity to exit from the network feed, or an "in" point, i.e., an opportunity to return to the network feed. MP2TSME willgenerate a splice_insert command in the SCTE 35 Data stream to indicate a splice point in response to the <splice> element.

The <splice> element has the following syntax:

<splice id=”1” upid=”2”> <time>30.000</time> <network>in</network> <duration>15.000</duration> <avail_num expected=”3”>3</avail_num></splice>

The id attribute is a 32-bit unique identifier for the splice point, and is required.

The upid attribute is an integer from 0 to 65535, and is required. It should match the associated event_id field in theATSC or DVB standards.

The <time> element indicates the activation time of the splice, and is required. It is in HH:MM:SS.SSS format.

Page 150: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0142

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The <network> element's contents indicate whether the splice point is an opportunity to exit from the network feed (“out”),an opportunity to return to the network feed (“in”), or an opportunity to exit from the network feed with auto-return(“outauto”). If “outauto”, the <duration> element must be present.

The <duration> element indicates the splice duration, and is optional unless the <network> element contains “outauto”.It is in HH:MM:SS.SSS format. If <duration> is omitted, a duration will not be specified.

The <avail_num> element contains an integer from 0 to 255, and is optional. It identifies a specific avail in the program,and should be less than or equal to the value specified by the required attribute expected. The value specified by<avail_num> is expected to increment with each new avail within a viewing event, and to reset to one for the first avail ina new viewing event.

The attribute expected is an integer from 0 to 255. It provides a count of the expected number of individual avails withthe current viewing event. It is required when the <avail_num> element is present.

An example of an SCTE 35 Data file that defines several splice points is shown below:

<scte35 xmlns="http://www.manzanitasystems.com/schema/v1/scte35" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.manzanitasystems.com/schema/v1/scte35" version="1"> <!-- Example SCTE 35 XML file --> <splice id=”1” upid=”2”> <time>4:00.000</time> <network>out</network> <duration>30.000</duration> <avail_num expected=”3”>1</avail_num> </splice> <splice id=”2” upid=”2”> <time>4:30.000</time> <network>in</network> </splice> <splice id=”3” upid=”3”> <time>9:00.000</time> <network>out</network> <duration>30.000</duration> <avail_num expected=”3”>2</avail_num> </splice> <splice id=”4” upid=”3”> <time>9:30.000</time> <network>in</network> </splice> <splice id=”5” upid=”4”> <time>9:45.000</time> <network>outauto</network> <duration>30.000</duration> <avail_num expected=”3”>3</avail_num> </splice></scte35>

<signal>

The <signal> element specifies the precise time for a sequence of one or more segmentation events in the program, which arerepresented by <segment> child elements. Each segmentation event is characterized by an identifier and a type, e.g.,local_ad_start. MP2TSME will generate a time_signal command and segmentation descriptors in the SCTE 35 Data stream toindicate a segmentation points in response to the <signal> element containing <segment> child elements.

The <signal> element has the following syntax:

<signal time=”10:00.000”> <segment id=”9”> <type>chapter_start</type> <duration>5:00.000</duration> <upid type=”origin” length=”4” encoding=”decimal”>1 2 3 4</upid> <segment_num expected=”2”>1</segment_num> </segment>

Page 151: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 143

Copyright © 1998 - 2010 Manzanita Systems, Inc.

</signal>

The required time attribute indicates the activation time for the segmentation events (expressed as <segment> elements),and is expressed in HH:MM:SS.SSS format.

id is a 32-bit unique identifier for the segmentation event.

<type> is the type of the segmentation event. Valid values are:

program_startnot_indicatedcontent_identificationprogram_endprogram_early_terminationprogram_breakawayprogram_resumptionprogram_runover_plannedprogram_runover_unplannedchapter_startchapter_endprovider_advertisement_startprovider_advertisement_enddistributor_advertisement_startdistributor_advertisement_endunscheduled_event_startunscheduled_event_endor an integer from 0 to 255

<duration> is optional. If present, its contents are in HH:MM:SS.SSS format. If omitted, then a duration will not bespecified.

The <upid> element conveys the unique program id for the segmentation event. It must have a type attribute. It may alsocontain the length and encoding attributes. Its contents are treated as a string, unless the encoding attribute isprovided and indicates otherwise. If a string, the characters '<', '>', and '&' must be escaped as: '&gt;', '&lt;', and '&amp;'.

The type attribute is one of the following: isci, ad-id, umid, isan, v-isan, tid, or adi. The value can also be aninteger from 0 to 255. It indicates the type of system supported by the programmer.

The length attribute is an integer that indicates the number of bytes in the upid. If omitted, the length is determined bythe upid type or the upid contents. Most of the defined upid types have lengths that are specified by the SCTE 35 standard.

The encoding attribute indicates the encoding of the <upid> element's contents.Valid values are decimal, hex, and string.Decimal is a series of decimal values, each from 0 to 255. Hex is a series of hexadecimal values of any length. String is asequence of ASCII characters, including spaces. If the attribute is omitted, the contents are treated as a string.

<segment_num> is optional, its contents are an integer from 0 to 255. It provides identification for a specific chapter oradvertisement within a upid. The value is expected to increment for each new chapter/ad within a upid, and to reset to onefor the first chapter/ad in a new viewing event.

The expected attribute for <segment_num> is required, an integer from 0 to 255. It provides a count of the expectednumber of individual chapters within the current segmentation event.

Multiple <segment> child elements with the same activation time can be specified under a parent <signal> element, however,the maximum number is restricted by the size of an MPEG-2 packet. Depending on the <upid> length, the following tableshows the approximate maximum number of <segment> elements that can be placed in one <signal>:

<upid>length

<upid> type Maximum number of <segment>

32 umid 3

12 ad-id, v-isan, tid 5

8 iscii, isan 6

Page 152: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0144

Copyright © 1998 - 2010 Manzanita Systems, Inc.

An example of an SCTE 35 Data file that defines several segmentation points is shown below:

<scte35 xmlns="http://www.manzanitasystems.com/schema/v1/scte35" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.manzanitasystems.com/schema/v1/scte35" version="1">

<signal time="15.00"> <segment id="1"> <type>program_start</type> <upid type="tid">AB123456789012</upid> <segment_num expected="0">0</segment_num> </segment> </signal> <signal time="00:30.00"> <segment id="2"> <type>program_start</type> <upid type="tid">CD123456789012</upid> <duration>1:00.00</duration> <segment_num expected="0">0</segment_num> </segment> <segment id="3"> <type>chapter_start</type> <upid type="ad-id">ABCD12345678</upid> <duration>30.00</duration> <segment_num expected="2">1</segment_num> </segment> </signal> <signal time="1:00.00"> <segment id="4"> <type>chapter_end</type> <upid type="ad-id">ABCD12345678</upid> <segment_num expected="2">1</segment_num> </segment> <segment id="5"> <type>chapter_start</type> <upid type="ad-id">BCDE87654321</upid> <duration>30.00</duration> <segment_num expected="2">2</segment_num> </segment> </signal> <signal time="1:30.00"> <segment id="6"> <type>chapter_end</type> <upid type="ad-id">BCDE87654321</upid> <segment_num expected="2">2</segment_num> </segment> <segment id="7"> <type>program_end</type> <upid type="tid">CD123456789012</upid> <segment_num expected="0">0</segment_num> </segment> <segment id="8"> <type>program_start</type> <duration>1:00.00</duration> <upid type="isan" encoding="decimal">1 2 3 4 5 6 7 9</upid> <segment_num expected="0">0</segment_num> </segment> <segment id="9"> <type>chapter_start</type> <upid type="isci">ABCD1234</upid> <duration>45.00</duration> <segment_num expected="2">1</segment_num> </segment> </signal> <signal time="2:15.00">

Page 153: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 145

Copyright © 1998 - 2010 Manzanita Systems, Inc.

<segment id="10"> <type>chapter_end</type> <upid type="isci">ABCD1234</upid> <segment_num expected="2">1</segment_num> </segment> <segment id="11"> <type>chapter_start</type> <upid type="isci">BCDE4321</upid> <duration>15.00</duration> <segment_num expected="2">2</segment_num> </segment> </signal> <signal time="2:31.00"> <segment id="12"> <type>chapter_end</type> <upid type="isci">BCDE4321</upid> <segment_num expected="2">2</segment_num> </segment> <segment id="13"> <type>program_end</type> <upid type="isan" encoding="decimal">1 2 3 4 5 6 7 9</upid> <segment_num expected="0">0</segment_num> </segment> </signal></scte35>

Page 154: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0146

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.1.21 Specifying Descriptors

Descriptors are optional structures that may be included in the Program Map Table to extend the definitions of programs andprogram elements. When configuring a transport multiplex, you may define descriptors for each program and each elementarystream that is included in the program. Descriptors may also be included in other tables.

If descriptors can be defined for an entry that is configured in the multiplex, a Descriptors Parameter will be listed in the entry'sParameters Dialog Box. The Descriptors Parameter specifies the descriptor data that should be associated with the entry in thePMT. For example, to associate an ISO 639 Language Descriptor with an audio stream, an encodedISO_639_language_descriptor must be added to the stream's Descriptors Parameter.

Up to 32 descriptors may be specified with a Descriptors Parameter. The data for each descriptor is specified using theDescriptors List, the interface used to define and edit a Descriptors Parameter. The Descriptors List is opened by clicking theEdit button on the Descriptors Parameter line.

The Descriptors List consists of a list box and a set function buttons. Using the function buttons you can createnew descriptors, edit existing ones, and organize the list. The list box will display the hexadecimal data for eachdescriptor as a separate entry. Descriptors will be inserted in the table in the order in which they appear in the list.

The Descriptors List has the following function buttons:

Name Description

Add Opens the Descriptor Selector that lists the available descriptor templates. After aspecific template is chosen from the list, the Descriptor Generator will open,displaying the descriptor syntax. Editable bit fields can then be set to their desiredvalues.

Edit Parses the currently selected list entry, and if it is valid descriptor, loads it into theDescriptor Generator. Editable bit fields can then be changed to their desiredvalues and the changes can be saved.

Add Hex Opens the Edit Descriptor box, which accepts a string of hexadecimal characters.Each two-character word is interpreted as a byte of data. This function can beused to add a descriptor if it has already been coded into a hexadecimal byte list.

MP2TSME does not check the validity of the specified data.

Edit Hex Opens currently selected entry in the Edit Descriptor box, where it is displayed asa string of hexadecimal characters. Each two-character word is interpreted as abyte of data. The byte list can be edited and saved.

Remove Removes the currently selected descriptor entry from the list

Move Up Moves the currently selected table entry to the next higher position in the list

Move Down Moves the currently selected table entry to the next lower position in the list

OK Apply the descriptors that are currently listed to the Descriptors Parameter andclose the Descriptors List

4.1.21.1 Descriptor Generator

The Descriptor Generator is a tool for defining and generating descriptor data. The interface to the Generator presents aneditable template of a selected descriptor that follows the exact syntax of the defining specification (e.g., MPEG, DVB, ATSC). Bit fields in the descriptor can be set to desired values and the resulting data can be added to a Descriptors Parameter forinclusion in a table.

The set of descriptors that are available to the Descriptor Generator is defined by a Table Definition Script. This script consistsof several templates that each specify the syntax for a descriptor or table section. The MP2TSME installation includes severalTable Definition Scripts, including ones for ATSC, DVB, and standard MPEG. The Table Definition Script that is currently usedby the Descriptor Generator is set up in the Preferences Dialog Box. Table Definition Scripts are written in the MP2TSME TableScripting language. User-defined templates can easily be created in the scripting language, and new Table Definition Scripts

Page 155: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 147

Copyright © 1998 - 2010 Manzanita Systems, Inc.

can be created or existing ones can be modified.

The Descriptor Generator is invoked when a new descriptor is added to the Descriptors Parameter, or when a previously addeddescriptor is selected for editing.

When using the Descriptor Generator, the following tips should be considered:

· Disabled, or "grayed out", fields either have static values, or are disabled by the current value of a flag field.

· To change an editable field, double-click on the value. The value will change to edit mode, allowing a new value to beentered, or if the field has enumerated values, to be selected from a drop-down list.

· If an "Elements" heading is displayed, zero or more elements can be inserted in the descriptor. The definition of eachelement depends on the type of descriptor. An element can be added by selecting the "Elements" heading and clickingthe plus ("+") button at the bottom of the window. Elements can be deleted by selecting the specific element entry, e.g.,"Element #2", and clicking the minus ("-") button at the bottom of the window.

· MP2TSME does not check the validity of the data that is entered into the editable fields.

Page 156: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0148

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.2 Using Configuration Files

The MP2TSME configuration file is a simple text file that defines the configuration of a transport stream multiplex. It allows youto save and restore a specific multiplex configuration that you have defined. You can configure and multiplex streams in theMP2TSME interface without ever saving or opening a configuration file. However, if you need to create many streams that usethe same or similar configuration, you will probably want to use configuration files. This section tells you how to save, open, andmodify configuration files, and describes the use and format of the configuration file in detail. It includes the followingsubsections:

· Saving a Configuration File in the UI tells you how to save the configuration that you have set up in the MP2TSMEinterface.

· Opening a Configuration File in the UI explains how to load the MP2TSME interface with configuration that has beenpreviously saved in a file.

· Creating a Configuration File Manually discusses "manual" creation of configuration files with a text editor.

· Configuration File Format describes the configuration file syntax, gives general format rules, and defines all configurationparameters.

The section, Multiplexing from the Command Line, later in this manual describes use of the command line version ofMP2TSME with a configuration file.

4.2.1 Saving a Configuration File in the UI

After you have set up the MP2TSME interface for your desired transport stream, you may want to generate many other streamsin the future with the same or similar characteristics. You can do this by saving your settings to a configuration file. Theconfiguration file is a simple text file that defines the configuration of a transport stream multiplex. You can either save a newconfiguration file or overwrite an existing one.

To save a configuration file:

1. Choose File > Save As... from the Menu Bar.

or

1. Click (Save Config) on the Tool Bar.

The Save As dialog box will appear.

2. Browse your system to select the location that you want the file to be written. Specify the name of the file in the File Namebox, or click on an existing file if you want to overwrite it.

3. Click the Save button.

If the file already exists, you will be asked it you want to replace it.

4.2.2 Opening a Configuration File in the UI

You can load the MP2TSME interface with a configuration that you have previously saved in a configuration file. This saves timeif you are generating transport streams with the same characteristics, but in different MP2TSME sessions.

To open an existing configuration file:

1. Choose File > Open... from the Menu Bar.

Page 157: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 149

Copyright © 1998 - 2010 Manzanita Systems, Inc.

or

1. Click (Open Config) on the Tool Bar.

If no configuration is currently displayed in the interface, or if the configuration was loaded from an existing configuration fileand not modified, then the Open File dialog box will appear. This dialog box allows you to browse your system to select aconfiguration file.

If a multiplex configuration that has been modified is currently displayed in the interface, then a dialog box will appear thatasks you if you would like to save your changes. Click Save to specify a file name, or if the modified configuration wasloaded from an existing configuration file, to overwrite the opened configuration file. Click Discard to continue withoutsaving the previous configuration. In both cases, the Open File dialog box will next appear.

2. Browse your system with the Open File dialog box to select a configuration file.

3. Click the Open button.

If the format of the opened configuration file is correct, then the configuration that it defines will be displayed in the MultiplexPane. The Parameters Dialog Box for each entry will display parameter values that are explicitly specified in theconfiguration file. Parameters that are not defined in the configuration file will be set to their default values.

Any problems found in the configuration file will be displayed in the Status Pane. For example, an error will be indicatedwhen a line appears in the configuration file that is in an invalid format and cannot be interpreted. Even if errors aredetected, the interface will be loaded with all the information that can be correctly interpreted from the file. If an invalidvalue was assigned in the configuration file, then the default value will be used for the parameter in the UI.

4.2.3 Creating a Configuration File Manually

The easiest and best way to create a configuration file is to use the MP2TSME user interface. By saving the configuration that iscreated using the MP2TSME UI, you can be sure that the configuration file format is correct and that the values assigned to allparameters are valid and within the accepted ranges. However, because it is a simple text file, an MP2TSME configuration filecan also be created using a text editor such as MS Notepad. If you choose to create a configuration file outside of theMP2TSME interface, here are some caveats to consider:

· All section and parameter names must be spelled correctly. In most cases, the MP2TSME Multiplexer will issue awarning message when it encounters a word that it does not recognize. Therefore, it is always a good idea to review allstatus messages that are issued by the Multiplexer when creating a multiplex.

· If the command line version of the MP2TSME Multiplexer encounters a parameter that has a value outside of the validrange, it will ignore it and use the default value. The Multiplexer may or may not issue a warning message.

· If you want to include comments in your configuration file and be able to retain these comments when you open the file inthe MP2TSME UI, you must insert the comments after the Section Title to which they apply. This is because theMP2TSME interface considers comment lines that appear between two Section Titles to apply to the first of the Sections.Any comment lines in a configuration file that are before the Transport Section Title will be discarded if the file isoverwritten from within the MP2TSME UI.

4.2.4 Configuration File Format

The MP2TSME configuration file is a simple text file that defines the configuration of a transport stream multiplex. The file is asequence of single line entries. This section describes the format of the configuration file in detail. The following subsectionsdiscuss general use of the configuration file:

· Configuration File Entries

· Configuration File Rules

Page 158: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0150

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The configuration file is organized into Sections and Subsections that specify different levels of the multiplex configuration.Within a Section or Subsection are the configuration parameter entries that pertain to the associated configuration level. Thefollowing Sections and Subsections may appear in the MP2TSME configuration file:

· The Transport Section specifies configuration that effects the entire transport stream and that defines the ProgramAssociation Table (PAT).

· The Program Section defines characteristics of a program, including the Program Map Table (PMT) and Program ClockReference (PCR).

· The Video Subsection defines multiplexing characteristics of a video elementary stream in a program.

· The Audio Subsection defines multiplexing characteristics of an audio elementary stream in a program.

· The Data Subsection defines multiplexing characteristics of a prepacketized data stream.

· The Table Data Subsection defines one ore more tables and the multiplexing characteristics of the PID stream in whichthey are to be conveyed.

· The SMPTE 302M Subsection defines multiplexing characteristics of a linear PCM digital audio stream as specified bythe SMPTE 302M standard.

· The Private Stream Subsection defines multiplexing characteristics of an elementary stream that is identified in theprogram's PMT as Private Stream.

· The SCTE 35 Data Subsection defines multiplexing characteristics of an SCTE 35 data stream that carries digitalprogram insertion (splicing) messages for a program.

4.2.4.1 Configuration File Entries

The MP2TSME configuration file follows a simple format. Each line in the file is considered to be a single entry. The followingtypes of entries may appear in a configuration file:

Comment

Comments allow the user to insert text information in the configuration file. Comments are ignored by MP2TSME. A Commententry begins with a "#" character. The remainder of the line may be any text. Two or more Comment entries can appearconsecutively in the configuration file for a block of comment text. A Comment or Comment block should appear immediatelyafter the Section Title or Subsection Title to which it applies.

Example:# This is the configuration for the video stream.

Section Title

A Section Title is used to identify the start of a Section. A Section Title consists of a Section Name at the start of the linefollowed by the "*" character. With the exception of the italicized character “N”, a Section Name should be entered in theconfiguration file exactly as it is defined in this document. The character “N” appearing in a Section Name represents aninteger that uniquely identifies the Section. The Section Name defines the scope of the information that follows. There shouldbe no spaces between the Section Name and the "*", and the "*" should be the last character on the line.

Examples:Transport*Program2*

Subsection Title

A Subsection Title is used to identify the start of a Subsection. One or more Subsections may be specified in a Section. ASubsection Title consists of a Subsection Name at the start of the line followed by the "$" character. With the exception of the“N”, a Subsection Name should be entered in the configuration file exactly as it is defined in this document. The character “N”appearing in a Subsection Name represents an integer that uniquely identifies the Subsection within its Section. TheSubsection Name defines the component to which the information applies. There should be no spaces between the

Page 159: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 151

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Subsection Name and the "$", and the "$" should be the last character on the line.

Examples:Video1$Audio3$Data2$

Parameter Assignment

A Parameter Assignment specifies a value for an operational parameter within a Section or Subsection. A ParameterAssignment consists of the Parameter Name (e.g., "Rate", "File", and "StreamType") followed by an "=" character and then avalue. Spaces before and after the "=" character are optional. The valid format of the value depends upon the ParameterName. With the exception of enumerated values, each Parameter Assignment definition given in this document has theformat Name = value, where Name is the Parameter Name and value is the format that is valid for the Parameter Name.For enumerated value assignments, the definition has the format Name = [Value1 | Value2] where Name is theParameter Name that may be assigned either Value1 or Value2.

The following formats are possible for a Parameter value:

integerAn integer value is an optionally signed whole number. The value may be specified in decimal, or if prefaced with a "0x", inhexadecimal.

Examples:PID = 0x1EAPMTvsn = 18

doubleA double value may be entered as a fixed point or a floating point number.

Examples:PSIPATrep = 12.5Rate = 3.753e6

stringA string value consists of text characters. The string may be optionally delimited with double quotes. If not delimited withdouble quotes, any leading spaces will be omitted.

Example:File = c:\Video Streams\myaudio.m2v

enumeratedAn enumerated value is a text string that is selected from a list that is specific for the Parameter Name. The value must beentered exactly as it appears in the list. For example, if the enumerated value list for a parameter only includes the textstrings Yes and No, then the parameter may only be assigned one of these two strings. The definition for each ParameterAssignment with enumerated values that appears in this document gives the list of acceptable values, e.g., PESalign =[Yes | No].

Example:PESalign = Yes

bytelistA byte list value consists of a list of one or more single byte values. The values must be in hexadecimal format with no "0x"prefix. Each adjacent, i.e., with no intervening spaces, two character sequence is interpreted as one byte value. A singlecharacter delimited with spaces is read as a complete byte value. If there are more than two adjacent characters, theneach successive two character sequence is interpreted as one byte. For example, the byte list value "12345 6" would beparsed as the four byte values, 0x12, 0x34, 0x05, and 0x06.

Examples:

Page 160: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0152

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Descriptor1 = 0A 04 65 6E 67 00Descriptor2 = 050441432D33

multiline bytelistA multi-line byte list value consists of a list of one or more single byte values. The list may span multiple lines. The valuesmust be in hexadecimal format with no "0x" prefix. Each adjacent, i.e., with no intervening spaces, two character sequenceis interpreted as one byte value. A single character delimited with spaces is read as a complete byte value. If there aremore than two adjacent characters, then each successive two character sequence is interpreted as one byte. For example,the byte list value "12345 6" would be parsed as the four byte values, 0x12, 0x34, 0x05, and 0x06.

Example:Table1 = 0A 04 65 6E 67 00 6A 60 19 05 2B 80 4F 1C 86 37 62 E8

hh:mm:ss :ff or hh:mm:ss;ffA duration value has the format hh:mm:ss:ff or hh:mm:ss;ff, where hh is the number of hours, mm is the number ofminutes, ss is the number of seconds, and ff is the number of frames. Values are non-negative integer numbers.

The duration can be given in either Drop Frame Time Code (DFTC) or Non-Drop Frame Time Code (NDFTC) format.DFTC durations use the syntax hh:mm:ss;ff, where ff indicates the number of frames in addition to the specified time.NDFTC used the syntax hh:mm:ss:ff where the stream duration is based upon an integer number of frames persecond. For example, the NDFTC duration "1:00" is interpreted as 30 frames, which for 29.97 fps audio is 1.001 seconds.In contrast, the DFTC duration "1.0" is interpreted as exactly one second. In long streams, this 0.1% difference in durationbecomes significant.

A colon, ":", is used to separate the first three numbers in either format, and to separate the ss and ff numbers inNDFTC format. A period, ".", separates the ss and ff numbers in DFTC format. In both cases, there are no interveningspaces between the numbers and the delimiting punctuation. If the most significant numbers in a duration value areomitted, they will be assigned a value of zero. For example, a duration value of "20:5" is interpreted as zero hours, zerominutes, twenty seconds and five frames.

Examples:Duration = 50:13:15 (50 minutes, 13 seconds, 15 frames NDFTC)Duration = 30.0 (30 seconds, DFTC)

4.2.4.2 Configuration File Rules

The following general rules apply to the format of the MP2TSME configuration file:

· Each line in the configuration file consists of a single entry. An entry may be a Comment, Section Title, Subsection Title,or Parameter Assignment.

· The first non-Comment entry in the configuration file must be the Transport Section Title, "Transport*". That is, the firstsection in the configuration file must be a Transport Section. There may be only one Transport Section in the file.

· Up to 64 Data Subsections may be listed in the Transport Section.

· Up to 64 Table Data Subsections may be listed in the Transport Section.

· There may be one or more Program Sections following the Transport Section. Each Program Section pertains to aunique program in the multiplex.

· Video, Audio, SMPTE 302M, Private Data 1, and SCTE 35 Data Subsections may appear only within a Program Section.The Subsections may be in any order.

· There may be up to 16 Video Subsections in a Program Section.

· There may be up to 64 Audio Subsections in a Program Section.

Page 161: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 153

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· There may be up to 16 SMPTE 302M Subsections in a Program Section.

· There may be up to 16 Private Stream Subsections in a Program Section.

· There may be up to 4 SCTE 35 Subsections in a Program Section.

· There may be up to 64 Data Subsections in a Program Section.

· There may be up to 64 Table Data Subsections in a Program Section.

· Parameter Assignments may be listed in any order in the Section or Subsection to which they apply. The TransportSection, Program Section, Data Subsection, Video Subsection, Audio Subsection, SMPTE 302M Subsection, Table DataSubsection, Private Stream Subsection, and SCTE 35 Data Subsection descriptions in this document indicate whichParameter Assignments are applicable.

· Each Parameter Assignment may appear only once in a given Section or Subsection.

· Required Parameter Assignments must be explicitly specified in the appropriate Section or Subsection, or MP2TSME willhalt and issue a fatal error. The Section and Subsection descriptions indicate which Parameter Assignments arerequired.

· Optional Parameter Assignments may be omitted, in which case MP2TSME will use a default value for the Parameter.The Section and Subsection descriptions indicate which Parameter Assignments are optional, and give their defaultvalues.

· MP2TSME is case insensitive when interpreting configuration file entries.

Page 162: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0154

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.2.4.3 Transport Section

The Transport Section is always the first Section in the configuration file. There may be only one Transport Section in the file.The Section Title should be the only string on the first line of the Transport Section. It appears as follows:

Transport*

Within the Transport Section are the parameters that effect the entire transport multiplex. Transport Parameter Assignments arelisted in the configuration file after the Transport Section Title. All Parameter Assignments appearing between the TransportSection Title and the Program Section Title are considered to be part of the Transport Section.

The File Parameter is required in the Transport Section. All other Parameter Assignments are optional in the Transport Section.If an optional Parameter Assignment is not present, then the Multiplexer will assign a default value. In most cases, the defaultvalue is adequate. Each Parameter Assignment may appear only once in the Transport Section.

The default values used by the Multiplexer are the same as those used by the Standard default configuration available in theMP2TSME graphical UI program. In order to create a configuration file for a transport stream that is compliant with theCableLabs VOD Specification, you will need to explicitly set the required parameter values that differ from the Standard defaults.The easiest way to create a CableLabs compliant configuration file is to set up a multiplex in the MP2TSME UI with CableLabsSD or HD defaults and then save the configuration to a file.

The following Parameter Assignments (shown categorized by functionality) are defined for the Transport Section:

Output PSI DVB SI Transport Adaptation

File / FileN CreatePSI DIT TransportPriority InitDI

FileSize PSIPATrep DITTransition PktCountMultiple PCRi

Rate PSIPMTrep SIT NoEmptyAF

VBR PATtsid SITPeriod

Duration PATvsn SITVersion

StopOnAV NITPID SITTransDescr

Leader SITServiceID

StopOnWarning SITRunningStatus

StopOnError SITSvcDescr

Start

End

PktSize

Timing Terminator Time Stamps HDV Mode HD2

Priority Terminate PktTS HDVModeHD2

BurstNulls Overlap PktTSPre AUXVPID

BurstNullsCount PktTSBytes AUXAPID

BurstNullsSpacing PktTSBits HDVDropFrame

PktTSLSByteFirst

The rest of this section describes each Transport Parameter in detail.

File = string

The File Parameter specifies the name of the output transport stream file. The string value that is entered may be the fullpath, relative path, or filename only. If only a filename is given, then the output file will be written to the current directory.

The output stream can also be segmented automatically into sequentially named files. To accomplish this, a single outputfile is specified as described above with the two-character string %i included in the file name. The characters %i will bereplaced with an incrementing value with each successive output file. For example, if the output file name is specified as

Page 163: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 155

Copyright © 1998 - 2010 Manzanita Systems, Inc.

part%i.mpg, than the series of output files will be named part1.mpg, part2.mpg, part3.mpg, etc. Note that theFileSize Parameter must be assigned a non-zero value that specifies the maximum size of each of the output files.

Either this parameter or multiple FileN Parameters must be specified in the configuration file in normal operation. However,the File Parameter may be omitted if the output filename is specified on the command line using the -o option (see UsingCommand Line File I/O Override).

Example:

File = c:\Transport Streams\movie1.mpg

FileN = string

The FileN Parameter specifies an output file name when the output stream is to be segmented into multiple files. The stringvalue that is entered may be the full path, relative path, or filename only. If only a filename is given, then the output will bewritten with the specified filename to the current directory. The Parameter Name is FileN where N is a number thatidentifies a specific output file. There may be no spaces between File and the file number. The file number is for MP2TSMEuse only; it is not associated with any MPEG parameter or with the actual filename. The number of the first output file mustbe 1, and the number is incremented for each subsequent file. For example, if three output files are to be written, theParameter Names would be File1, File2 and File3. If FileN Parameters are used to specify multiple output files, then theFileSize Parameter must also be specified. Either multiple FileN Parameters or the File Parameter must be specified in theconfiguration file, unless the output filename is specified on the command line (see Using Command Line File I/O Override).

Examples:

File1 = f:\Video\movie2a.mpgFile2 = f:\Video\movie2b.mpg

FileSize = integer

When multiple output files are specified by using more than one FileN Parameters or by including the %i string in the FileParameter assignment, the FileSize Parameter is required. It specifies the maximum size of each output file in bytes. Whenmultiple files are being created, MP2TSME will proceed sequentially through the filenames provided by the FileNParameters. After the first file reaches the specified file size, it is closed and the next file in the list is opened and written.The output files do not have to end at packet boundaries; MP2TSME will split the last packet being written when the size isreached. If there are insufficient filenames provided to save the output stream, MP2TSME will report an error and stop. It istherefore safer to provide extra filenames; the additional filenames will be ignored if they are not required. The maximumfile size is limited by the operating system. No default value is provided, so this parameter must be specified if there aremultiple files.

Rate = double

The Rate Parameter specifies the output transport rate in bits per second. The value is a non-negative number in doubleformat. It may include fractional Hz. The valid range is 100 000 to 1 000 000 000 bps (100 kbps to 1 Gbps). However, if avalue of zero is given, then a minimum rate will be used by the Multiplexer. This minimum rate is computed based on thesum of the maximum rates for all streams in the multiplex. If a non-zero rate is given and it is less than the computedminimum rate, the Multiplexer will issue a warning when it creates the transport stream. The resulting stream may not beusable. The Rate Parameter is optional. The default value is 0, which indicates that the computed minimum rate should beused.

If the VBR Parameter is set to Yes and there is only one program configured, then the Rate Parameter specifies themaximum rate of the output stream.

VBR = [Yes | No]

If the VBR Parameter is set to No, then the Multiplexer will multiplex the output transport stream at the constant bit rate thatis determined by the Rate Parameter. If it is set to Yes and only one program is configured, then the Multiplexer will createa variable bit rate transport stream. In this case, the Rate Parameter specifies the maximum rate of the output stream. The VBR Parameter is optional. The default value is No.

This parameter should only be set to Yes if the transport stream is configured with a single program. If more than oneprogram is configured and the VBR Parameter is set to Yes, the Multiplexer will ignore the setting, multiplex the outputstream at a constant bit rate, and issue a warning

Page 164: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0156

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Duration = hh:mm:ss:ff or hh:mm:ss;ff

The Duration Parameter specifies the output transport stream duration in hours, minutes, seconds, and frames. Thespecified value is entered as non-negative integer numbers in duration format. The minimum value is one second and themaximum value is 24 hours. The most significant places in the duration default to zero, and may be omitted. For example,a duration of "1:20:5" would be interpreted as one minute, twenty seconds and five frames. The length of one frame isderived from the frame rate of the video elementary stream. If there is no video elementary stream present, then the lengthof one frame is derived from the frame rate of the first audio stream. The duration of the output transport stream will bewithin one packet of the value specified. If the elementary streams are not complete at the specified ending time, they willbe truncated at the final packet. If the Duration Parameter is not specified, then the Multiplexer will create a transportstream of maximum duration. This maximum duration is the length that is sufficient to transport all of the configuredelementary streams. The Duration Parameter is optional. By default, the maximum duration is used.

StopOnAV = [Yes | No]

If the StopOnAV Parameter is set to Yes, then the output stream will be stopped when the end of the video or audioelementary stream with the shortest length is reached. If it is set to No, then the Multiplexer will create a transport stream ofmaximum duration, or of the length specified by the Duration Parameter. The StopOnAV Parameter is optional. Thedefault value is No.

Leader = integer

The Leader Parameter specifies the length of the leader at the beginning of the output transport stream. The leadercontains only null packets and PSI packets, and no elementary stream packets. The Leader value is a non-negative integerthat represents the length of the leader in 90 kHz clock cycles. The valid range is zero to 1 000 000 000. A leader istypically used to delay all payload in the transport stream. Such a delay may be required, for example, when the beginningof the transport stream may be lost or corrupted by downstream equipment. The Leader Parameter is optional. The defaultvalue is 0, which indicates that no leader is to be inserted in the beginning of the stream.

StopOnWarning = [Yes | No]

The StopOnWarning Parameter determines how the Multiplexer behaves when a warning condition is encountered. If theYes option is selected, then the Multiplexer will halt execution when the first warning condition is detected. If the No optionis selected, then the Multiplexer will continue processing while warnings are issued. The StopOnWarning Parameter isoptional. The default value is No.

StopOnError = [Yes | No]

The StopOnError Parameter determines how the Multiplexer behaves when an error condition is encountered. If the Yesoption is selected, then the Multiplexer will halt execution when the first error condition is detected. If the No option isselected, then the Multiplexer will continue processing while errors are issued. The StopOnError Parameter is optional. The default value is Yes.

Error conditions are generally considered fatal. The Multiplexer will attempt to continue if StopOnError is disabled,however, in most cases the output will not be usable.

Start = hh:mm:ss:ff

The Start Parameter specifies the video timecode at which the video elementary stream should begin in the output transportstream. This parameter may only be used if the transport stream is configured with one video elementary stream in a singleprogram. The program may include up to 64 audio elementary streams. If timecodes are present in the video elementarystream, the timecodes will be compared to the specified Start value, and the first I or IDR frame at or after this value will bethe first video access unit multiplexed in the output stream. All audio elementary streams that are configured in theprogram will be started at the corresponding time, and the initial audio delay will be adjusted to match the initial video Iframe. If timecodes are not present in the video elementary stream, then they will be computed starting with an initial timeof 00:00:00:00. In both cases if the specified timecode is not encountered, then the transport stream will not be created andan error is issued that video never acquired.

The specified value should be non-negative integer numbers in NDFTC (HH:MM:SS:FF) duration format, where HH is anumber of hours (00 to 24), MM is a number of minutes (00 to 59), SS is a number of seconds (00 to 59), and FF is a

Page 165: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 157

Copyright © 1998 - 2010 Manzanita Systems, Inc.

number of frames. The value must be less than or equal to 24 hours. The most significant places in the timecode defaultto zero, and may be omitted. For example, a timecode of "1:20:5" would be interpreted as one minute, twenty seconds andfive frames.

The Start parameter is optional. The default is to have no Start timecode set and to start at the beginning of the videoelementary stream.

End = hh:mm:ss:ff

The End Parameter specifies the video timecode which determines the end of the transport stream. This parameter shouldonly be enabled if the transport stream is configured with one video elementary stream in a single program. The programmay include up to 64 audio elementary streams. If timecodes are present in the video elementary stream, the timecodeswill be compared to the specified End value to determine the last video access unit. All audio elementary streams that arepresent will be stopped at the same time. The transport stream will then end. If timecodes are not present in the videoelementary stream, then they will be computed starting with an initial time of 00:00:00:00. In both cases if the specifiedtimecode is not encountered, then the video elementary stream will not be truncated and the transport stream will have amaximum duration. Note that selecting an arbitrary frame to end a stream may cause artifacts if B frames are present. Ifsuch artifacts are encountered, they may be eliminated if the End parameter is altered by one or two frames.

The specified value should be non-negative integer numbers in NDFTC (HH:MM:SS:FF) duration format, where HH is anumber of hours (00 to 24), MM is a number of minutes (00 to 59), SS is a number of seconds (00 to 59), and FF is anumber of frames. The value must be less than or equal to 24 hours. The most significant places in the timecode defaultto zero, and may be omitted. For example, a timecode of "1:20:5" would be interpreted as one minute, twenty seconds andfive frames.

The last access unit in the output transport stream will be the access unit that corresponds to the specified End time,i.e., the stream is inclusive of the End time.

The End parameter is optional. The default is to have no End timecode set and to allow a transport stream of maximumduration to be created.

PktSize = integer

The PktSize Parameter specifies the length in bytes of the packets output by MP2TSME. The value must be either zero,or between 188 and 512, inclusive. If a size other than the standard 188 byte packet is specified, then the extra bytes willbe set to zero. An optional 27 MHz time stamp can be inserted in place of some of the extra bytes using the PktTSParameter.

The PktSize Parameter is optional. The default value is zero, which indicates that the standard 188 byte packet sizeshould be used.

CreatePSI = [Yes | No]

The CreatePSI Parameter indicates if the Multiplexer should create the MPEG PSI tables for the output transport stream. If the value is Yes, then the PAT and PMT(s) will be created and inserted. If it is No, then no PAT or PMTs will be insertedin the output stream. In this case, the user may elect to insert PSI as prepacketized data or as a Table Data stream. Thedefault value is Yes.

PSIPATrep = double

The PSIPATrep Parameter specifies the rate at which the Program Association Table (PAT) should be repeated in thetransport stream. The PSIPATrep value is a non-negative number in double format that represents the repetition rate inPATs per second. The valid range is 0.001 to 1000. The PSIPATrep Parameter is optional. The default value is 10, whichindicates that 10 PATs per second should be inserted.

PSIPMTrep = double

The PSIPMTrep Parameter specifies the rate at which the Program Map Table (PMT) should be repeated in the transportstream. The PSIPMTrep value is a non-negative number in double format that represents the repetition rate in PMTs persecond. The valid range is 0.001 to 1000. The PSIPMTrep Parameter is optional. The default value is 10, which indicatesthat 10 PMTs per second should be inserted.

Page 166: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0158

Copyright © 1998 - 2010 Manzanita Systems, Inc.

PATtsid = integer

The PATtsid Parameter sets the value of the transport_stream_id that appears in the PAT. The PATtsid value must be aninteger between 0 and 65535 (0x0000 and 0xFFFF). The PATtsid Parameter is optional. The default value is 0.

PATvsn = integer

The PATvsn Parameter sets the value of the version_number of the PAT. The PATvsn value must be an integer between 0and 31 (0x00 and 0x1F). The PATvsn Parameter is optional. The default value is 0.

NITPID = integer

The NITPID Parameter specifies the PID to be identified as the Network PID in the PAT. The value must be an integerbetween 16 and 8190 (0x0010 and 0x1FFE). The value may be specified in decimal, or if prefaced with a "0x", inhexadecimal. The PAT will associate a program_number value of 0 with the NITPID. In general, the Network PID carriesthe Network Information Table (NIT) for the transport stream. MP2TSME will not automatically generate the NIT orNetwork PID packets. To insert a NIT in the transport stream, the user can create a Table Data stream that contains anetwork_information_section. The PID that is assigned to this stream should be the same as the NITPID. A prepacketizeddata stream can also be used.

The NITPID Parameter is optional. The default value is 0, which indicates that no Network PID entry is to be inserted inthe PAT.

DIT = [Yes | No]

The DIT Parameter determines whether the DVB Discontinuity Information Table (DIT) should be carried in the transportstream. If the value is Yes, then MP2TSME will insert the DIT in PID 0x001E once at the beginning of the transport stream.The DIT is used only in "partial" (i.e. recorded) bitstreams. If the value is No, then no DIT will be carried. The default valueis No.

DITTransition = integer

The DITTransition Parameter is only valid if the DIT Parameter is set to Yes. This parameter sets the value of thetransition_flag in the DIT. The DITTransition Parameter can only be set to 0 or 1. The default value is 0.

SIT = [Yes | No]

The SIT Parameter determines whether the DVB Selection Information Table (SIT) should be carried in the transportstream. If the value is Yes, then MP2TSME will insert the SIT in PID 0x001E at the frequency specified by the SITPeriodParameter. The SIT is used only in "partial" (i.e. recorded) bitstreams. If the value is No, then no SIT will be carried. Thedefault value is No.

The SIT that is inserted using this parameter can only have one service_loop, i.e., only one service_id andrunning_status. If a SIT that has multiple service_loops is required, then the SIT must instead be defined in a Table Datastream that is assigned a PID value of 0x001E.

SITPeriod = integer

The SITPeriod Parameter is only valid if the SIT Parameter is set to Yes. It determines how often the SIT is inserted in PID0x001F. The SITPeriod value should be a non-negative integer that represents the period between SIT insertions inmilliseconds. The valid range is 1 to 2 000 000 000. If the SITPeriod is set to 0, the SIT will be inserted once at thebeginning of the transport stream. The default value is 0.

SITVersion = integer

The SITVersion Parameter sets the value of the version_number in the SIT. The SITVersion Parameter will be ignoredunless the SIT Parameter is set to Yes. The SITVersion value must be an integer between 0 and 31 (0x00 and 0x1F). Thevalue may be specified in decimal, or if prefaced with a "0x", in hexadecimal. The default value is 0.

Page 167: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 159

Copyright © 1998 - 2010 Manzanita Systems, Inc.

SITTransDescrN = byte list

A SITTransDescrN Parameter specifies a sequence of data bytes that should be included as descriptor data in thetransmission_info_loop of the SIT. Multiple descriptors may be specified in a single SITTransDescrN Parameter, although itis recommended that the data assigned to each SITTransDescrN Parameter should consist of only one descriptor. Up to32 SITTransDescrN Parameters may be configured in the Transport Section. The parameter name is SITTransDescrNwhere N is a number that identifies the parameter. The number of the first SITTransDescrN Parameter is 1, and thenumber is incremented with each subsequent SITTransDescrN Parameter that appears in this Transport Section. Forexample, if there are three SITTransDescrN Parameters, then they would be named SITTransDescr1, SITTransDescr2and SITTransDescr3. The SITTransDescrN Parameter will be ignored unless the SIT Parameter is set to Yes. The defaultis to have no transmission_info_loop descriptors.

MP2TSME does not check the validity of the specified descriptor data bytes.

Examples:

SITTransDescr1 = 0D 4 4D 41 4E 5ASITTransDescr2 = 0D044D414E5A

SITServiceID = integer

The SITServiceID Parameter specifies the value of the service_id field in the SIT. Although the SIT may carry multipleservice_id fields, the SITServiceID Parameter only supports a single service_id value. The value assigned to theSITServiceID should be the same as the one assigned to the ProgramNumber Parameter. The SITServiceID Parameterwill be ignored unless the SIT Parameter is set to Yes. The default value is 2.

If a SIT that uses multiple service_id values is required, then the SIT must instead be defined in a Table Data streamthat is assigned a PID value of 0x001E.

MP2TSME does not check that the values of the SITServiceID and ProgramNumber Parameters agree.

SITRunningStatus = integer

The SITRunningStatus Parameter specifies the value of the running_status field in the SIT. Although the SIT may carrymultiple service_id fields, the SITRunningStatus Parameter only supports a single running_status value. TheSITRunningStatus value must be an integer between 0 and 7. The SITRunningStatus Parameter will be ignored unless theSIT Parameter is set to Yes. The default value is 0.

If a SIT that uses multiple running_status values is required, then the SIT must instead be defined in a Table Datastream that is assigned a PID value of 0x001E.

SITSvcDescrN = byte list

The SITSvcDescrN Parameter specifies a sequence of data bytes that should be included as descriptor data in theservice_loop of the SIT. Multiple descriptors may be specified in a single SITSvcDescrN Parameter, although it isrecommended that the data assigned to each SITSvcDescrN Parameter should consist of only one descriptor. Up to 32SITSvcDescrN Parameters may be configured in the Transport Section. The parameter name is SITSvcDescrN where N isa number that identifies the parameter. The number of the first SITSvcDescrN Parameter is 1, and the number isincremented with each subsequent SITSvcDescrN Parameter that appears in this Transport Section. For example, if thereare three SITSvcDescrN Parameters, then they would be named SITSvcDescr1, SITSvcDescr2 and SITSvcDescr3. TheSITSvcDescrN Parameter will be ignored unless the SIT Parameter is set to Yes. The default is to have no service_loopdescriptors.

MP2TSME does not check the validity of the specified descriptor data bytes.

Examples:

SITSvcDescr1 = 0D 4 4D 41 4E 5ASITSvcDescr2 = 0D044D414E5A

TransportPriority = [Yes | No]

The TransportPriority Parameter determines the value of the transport_priority bit that appears in all PID 0 packets in theoutput stream. If the TransportPriority value is Yes, then all PID 0 transport_priority bits will be set to one.

Page 168: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0160

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The TransportPriority Parameter is optional. The default is No, which indicates that the transport_priority bit should have avalue of zero in all PID 0 packets. This parameter may be used only if the CreatePSI Parameter is set to Yes.

PktCountMultiple = integer

The PktCountMultiple Parameter forces the output transport stream file to be a multiple of the specified number of packets.The PktCountMultiple value should be a non-negative integer that species the desired packet multiple. The valid range is 0to 1 000 000.

The PktCountMultiple Parameter is optional. The default value is 0.

InitDI = [Yes | No]

The InitDI Parameter indicates if the PID 0 packet containing the first PAT in the output transport stream should contain adiscontinuity_indicator with a value of one. If the InitDI value is Yes, then the discontinuity_indicator is set in the packetcontaining the initial PAT. If the value is No, then no discontinuity is indicated with the first PAT.

The InitDI Parameter is optional. The default value is No. This parameter may only be used if the CreatePSI Parameter isset to Yes.

PCRi = integer

The PCRi Parameter specifies the initial PCR for the first packet in the transport stream. The value must be between zeroand 2 576 953 377 600. Note that this maximum value is one second less than the maximum value of the PCR field.

The PCRi Parameter is optional. The default value is zero.

NoEmptyAF = [Yes | No]

The NoEmptyAF Parameter indicates if MP2TSME should avoid using zero length adaptation fields in all transport packetsthat carry video elementary streams. If the PESalign Parameter is set to Yes, MP2TSME will occasionally use anadaptation field with a zero length in order to align video access units to PES headers. Some models of the Motorola/GIDCT-1000 and DCT-1200, have problems when they encounter zero length adaptation fields. To avoid this condition, theNoEmptyAF Parameter should be set to Yes. Note that the NoEmptyAF Parameter is only effective when the VideoPESalign Parameter is also set to Yes. The default value is No, which indicates that adaptation fields with a zero length donot need to be avoided.

Priority = [Yes | No]

The Priority Parameter indicates if PID 0 packets should be inserted into the multiplex with minimal jitter. This optionshould be used if PID 0 is configured to carry a PCR. Without giving priority to PID 0 packets, multiplex jitter could causePCR interval violations because of the low rate at which the PAT is inserted.

The Priority Parameter is optional. The default value is No, which indicates that a higher priority should not be assigned toPID 0 packets. This parameter may be used only if the CreatePSI Parameter is set to Yes.

BurstNulls = [Yes | No]

If set to Yes, the BurstNulls Parameter directs the Multiplexer to insert a periodic burst of consecutive null packets in thetransport stream. The BurstNullsCount Parameter specifies the number of null packets in the burst, and theBurstNullsSpacing Parameter specifies the number of transport packets between each burst.

The BurstNulls Parameter is optional. The default value is No, which disables the null packet burst feature.

The BurstNullsCount and BurstNullsSpacing Parameters must be specified if BurstNulls is Yes. A warning will beissued if either parameter value is zero.

The Burst Nulls feature is not supported if the VBR Parameter is enabled. A warning will be issued.

The insertion of the null packet bursts with the configured periodicity takes priority over the multiplexing of all othertypes of packets. For example, if null bursts have been configured and also the Priority Parameter has been enabled tohave the Multiplexer insert PID 0 packets with minimal jitter, the Multiplexer will always insert null bursts at the configuredrate even if it results in extra jitter in the PID 0 stream. As such, the BurstNulls feature should be used with caution.

Page 169: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 161

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Because an output transport stream that is created with BurstNulls enabled may easily be invalid, it is recommended thatthe stream is verified by a transport stream analyzer.

The BurstNulls feature is primarily used in generating test streams, e.g., in testing mobile devices.

BurstNullsCount = integer

The BurstNullsCount Parameter should only be specified if the BurstNulls Parameter is set to Yes. This parameterspecifies the number of consecutive packets in each null packet burst. The value must be a decimal integer between 1and 1 000 000 000, inclusive.

BurstNullsSpacing = integer

The BurstNullsSpacing Parameter should only be specified if the BurstNulls Parameter is set to Yes. This parameterspecifies the number of transport packets between each null packet burst, i.e., the number of packets between the last nullpacket of a burst and the first null packet of the next burst. The value must be a decimal integer between 1 and 1 000 000000, inclusive.

Terminate = [Yes | No]

The Terminate Parameter indicates if this stream should be terminated using the Terminator technology. The Terminatorenables seamless concatenation of transport streams. If the value is set to Yes, the transport stream will be terminated forthe first program in the multiplex configuration, Program1. Within the first program, the first video elementary stream willdetermine the timing of the termination. If the first program does not contain a video elementary stream, then the firstaudio elementary stream in the first program will be processed for seamless concatenation. Use of this option requires thatthe Duration Parameter is assigned a non-zero value that is less than the duration of the actual elementary streams in theterminated program. This is necessary to allow MP2TSME to fix the timing at the end of the transport stream.

An in-depth description of use of the Terminatory technology is given in the chapter, The Terminator.

The Terminate Parameter is optional. The default value is No.

Overlap = integer

The Overlap Parameter sets the overlap between the time when the transport stream is delivered to the decoder and thetime when the first access unit is decoded. The value should be a non-negative integer that represents the overlap as anumber of video frame periods. The Overlap Parameter applies to both the beginning and end of terminated streams.

The Overlap Parameter is optional. The default value is 15 frames of overlap.

The value assigned to the Overlap Parameter must not change over a collection of terminated streams that areintended for seamless concatenation. If two streams are terminated with different values for the Overlap Parameter, theremay be buffer problems at the transitions.

PktTS = [Yes | No]

If the PktTS Parameter is set to Yes, then MP2TSME will either prepend or append every transport packet with a 27 MHztime stamp. The clock on which this external timestamp is derived is locked to the PCRs in the stream. The timestamp isrelative to the first byte of the transport packet.

The PktPre Parameter determines whether the timestamp is before or after the transport packet, and the PktTSBytesParameter sets the length of the timestamp in bytes.

The PktTS Parameter is optional. The default value is No.

The PktSize Parameter must be set to a value that is greater than or equal to 188 plus the PktTSBytes value toaccomodate the timestamp, else MP2TSME will report an error.

PktTSPre = [Yes | No]

The PktTSPre Parameter is only valid if the PktTS Parameter is set to Yes. This parameter determines the position of thetimestamp relative to the transport packet. If it is set to Yes, then the time stamp immediately precedes the transportpacket. If it is set to No, then the time stamp will begin in the byte immediately after the last, or 188th, byte of the packet.

Page 170: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0162

Copyright © 1998 - 2010 Manzanita Systems, Inc.

For example, if PktTSBytes has a value of four, PktSize is 500 and PktTSPre is Yes, each transport packet will bepreceded by its 4-byte timestamp. After the packet and before the next timestamp will be 308 bytes of zero. If insteadPktTSPre is No, each transport packet will be followed by its timestamp and then 308 zero bytes.

The PktTSPre Parameter is optional. The default value is No.

PktTSBytes = integer

The PktTSBytes Parameter is only valid if the PktTS Parameter is set to Yes. This parameter sets the length of thetimestamp that is inserted before or after each transport packet. The value must be a decimal integer between zero and 8.

The PktTSBytes Parameter is optional. The default value is 0.

PktTSBits = integer

The PktTSBits Parameter is only valid if the PktTS Parameter is set to Yes. This parameter sets the number of bits in theinserted timestamp. The value must be a decimal integer between zero and 64, inclusive.

The PktTSBytes Parameter specifies the number of bytes in the field that contains the timestamp. The length of thetimestamp specified by PktTSBits may be less than the length of the field, in which case the timestamp will be left-alignedin the field and the remaining bits set to zero.

If the PktTSBits is set to zero, then all bits in the number of bytes specified by PktTSBytes are used for the timestamp.

If PktTSBits is greater than PktTSBytes * 8, then the extra bits in the time stamp are discarded. The Multiplexer doesnot issue a warning if this occurs.

PktTSLSByteFirst = [Yes | No]

The PktTSLSByteFirst Parameter is only valid if the PktTS Parameter is set to Yes. If PktTSLSByteFirst is set to Yes, thenthe timestamp will be formatted with the least significant byte in the first position (AKA "little-endian"). If it is set to No, thenthe most significant byte will be in the first position (AKA "big-endian"). The timestamp value is always written with themost significant bit of each byte in the left-most position.

The PktTSLSByteFirst Parameter is optional. The default value is No.

HDVModeHD2 = [Yes | No]

If the HDVModeHD2 Parameter is set to Yes, then MP2TSME will create a transport stream that is compatible with theHD2 mode defined by the HDV Recording Format specification. The default value is No, which disables compliance withthe HD2 mode format.

AUXVPID = integer

The AUXVPID Parameter specifies the PID that carries the AUX-V data stream in HD2 mode as defined by the HDVRecording Format specification. The AUXVPID Parameter is ignored unless the HDVModeHD2 Parameter is set to Yes. The AUXVPID value must be an integer between 16 and 8190 (0x0010 and 0x1FFE). The value may be specified indecimal, or if prefaced with a "0x", in hexadecimal.

AUXAPID = integer

The AUXAPID Parameter specifies the PID that carries the AUX-A data stream in HD2 mode as defined by the HDVRecording Format specification. The AUXAPID Parameter is ignored unless the HDVModeHD2 Parameter is set to Yes. The AUXAPID value must be an integer between 16 and 8190 (0x0010 and 0x1FFE). The value may be specified indecimal, or if prefaced with a "0x", in hexadecimal.

HDVDropFrame = [Yes | No]

The HDVDropFrame Parameter controls how timecodes are generated for the AUX-V data stream. When it is set to Yes,drop frame time codes are used. When it is set to No, non-drop frame time codes are used. The HDVDropFrameParameter is ignored unless the HDVModeHD2 Parameter is set to Yes. The default value is No.

Page 171: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 163

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.2.4.4 Program Section

The Program Section defines the characteristics and components of a single program in the transport multiplex. Each programmust be specified in a separate Program Section. The Program Section Title should be the only string on the first line of theProgram Section. It appears as follows:

ProgramN*

The N in the Program Section Title represents a number that identifies the program. There may be no spaces in the title string,and there should be no other characters on the line. The identifying number, N, is for MP2TSME use only; it is not associatedwith any MPEG-2 parameter. The identifying number of the first program defined in the configuration file must be 1. Thenumber is incremented in the Title of each subsequent Program Section. For example, if there will be three programs in themultiplex, then three Program Sections would be defined in the configuration file with the titles Program1*, Program2* andProgram3*.

Following the Program Section Title are the Parameter Assignments that affect the program as a whole. All ParameterAssignments appearing between the Program Section Title and the next Section or Subsection Title are considered to be part ofthe Program Section. There are no required Parameter Assignments in the Program Section.

After the Program Parameter Assignments, there may be one or more elementary stream Subsections. Seven types ofSubsections are possible: Video, Audio, Data, SMPTE 302M, Table Data, Private Stream, and SCTE 35 Data.

The default values used by the Multiplexer are the same as those used by the Standard default configuration available in theMP2TSME graphical UI program.

The following Parameter Assignments (shown categorized by functionality) are defined for the Program Section:

PMT Transport Adaptation Timing

ProgramNumber TransportPriority PCRper Priority

PMTPID PCRPES SBrate

PMTvsn InitDI SBsize

DescriptorN

PCRPID

The rest of this section describes each Program Parameter in detail.

ProgramNumber = integer

The ProgramNumber Parameter specifies the value of the program_number field that identifies the program in the PAT andthe associated PMT. The ProgramNumber value must be an non-negative integer between one and 65 535 (0x0001 and0xFFFF). The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal. The ProgramNumberParameter is optional. The default value is 1 + N, where N is the number that identifies the program in the multiplexconfiguration. For example, Program1 will have a default ProgramNumber value of 2.

PMTPID = integer

The PMTPID Parameter specifies the PID used to transport the program's PMT. This PID is also identified in the PAT asthe program_map_PID for the program. The value must be an integer between 16 and 8190 (0x0010 and 0x1FFE). Thevalue may be specified in decimal, or if prefaced with a "0x", in hexadecimal. The PMTPID Parameter is optional. Thedefault value is 16 x (1 + N), where N is the number that identifies the program in the multiplex configuration. For example,Program2 will have a default PMTPID value of 48 (0x0030).

PMTvsn = integer

The PMTvsn Parameter sets the value of the version_number of the PMT. The PMTvsn value must be an integer between0 and 31 (0x00 and 0x1F). The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal. The PMTvsnParameter is optional. The default value is 0.

Page 172: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0164

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DescriptorN = byte list

A DescriptorN Parameter specifies a sequence of data bytes that should be included as descriptor data at the programlevel in the PMT associated with this program. Multiple descriptors may be specified in a single DescriptorN Parameter,although it is recommended that the data assigned to each DescriptorN Parameter should consist of only one descriptor.Up to 32 DescriptorN Parameters may be configured in the Program Section. The number of the first DescriptorNParameter is 1, and the number is incremented with each subsequent DescriptorN Parameter that appears in this ProgramSection. For example, if there are three DescriptorN Parameters, then they would be named Descriptor1, Descriptor2 andDescriptor3. The default is to have no program level descriptors.

MP2TSME does not check the validity of the specified descriptor data bytes.

Examples:

Descriptor1 = 0D 4 4D 41 4E 5ADescriptor2 = 0D044D414E5A

PCRPID = integer

The PCRPID Parameter specifies the PID that carries the PCR for this program. The PCRPID value may be 0, 1, orbetween 0x10 and 0x1FFE, inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal. Ifthe specified PID is not one of the elementary streams or PSI PIDs, then MP2TSME will create packets containing onlyPCRs and insert them in the output transport stream at the appropriate times. If the PCRPID Parameter is not specified,then the PCR PID value will be set to the first video PID value. If no video elementary stream is in the program, then thePCR PID value is set to the first audio PID in the stream. If no video or audio streams are defined, then the PCRPIDdefaults to a value of 0x1FFF, indicating no PCR is present in the program.

The PCRPID may not be the PID used by a Table Data stream.

TransportPriority = [Yes | No]

The TransportPriority Parameter determines the value of the transport_priority bit that appears in all PMT PID packets forthis program. If the TransportPriority value is Yes, then all PMT PID transport_priority bits are set to one.

The TransportPriority Parameter is optional. The default is No, which indicates that the transport_priority bit should have avalue of zero in all PMT PID packets. This parameter may be used only if the CreatePSI Parameter is set to Yes.

PCRper = integer

The PCRper Parameter specifies the period between PCR fields that are inserted in the PCR PID stream for the program.The PCRper value must be a non-negative decimal integer between 1 and 65 535 that specifies the PCR interval in units ofmilliseconds. The default PCRper value is 90ms.

The MPEG specification requires that the interval between PCRs for a program must be less than or equal to 100 ms.

PCRPES = [Yes | No]

The PCRPES Parameter indicates if a PCR should be inserted in each transport packet containing a PES header. If thePCRPES value is Yes, then a PCR will be sent in each packet that contains a PES header start. The parameter may onlybe used if the PCR for this program is in the video elementary stream. The PCR spacing interval will be reset when aPCR is inserted in a packet with a PES header even if the previous PCR interval is less than the configured PCRperParameter value.

The PCRPES Parameter is optional. The default value is No, which is not to force a PCR in packets containing a PESheader.

InitDI = [Yes | No]

The InitDI Parameter indicates if the packet containing the first PMT for this program should contain adiscontinuity_indicator with the value of one. If the InitDI value is Yes, then the discontinuity_indicator is set in the packetcontaining the initial PMT. If the value is No, then no discontinuity is indicated with the first PMT.

The InitDI Parameter is optional. The default value is No. This parameter may only be used if the CreatePSI Parameter is

Page 173: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 165

Copyright © 1998 - 2010 Manzanita Systems, Inc.

set to Yes.

As required in the MPEG-2 specification, the PMT that is sent in the initial discontinuity packet will be a 13-byte PMT.This PMT does not contain any elementary stream information or descriptors, but is present only to signal a discontinuity tothe decoder. The next PMT that is sent will contain the full definition of the program. The version_number in this secondPMT will be an increment of one above the version_number in the PMT that is sent in the initial discontinuity packet. If theversion_number was specified with the PMTvsn Parameter it will be used in the second, complete PMT.

Priority = [Yes | No]

The Priority Parameter indicates if PMT PID packets for this program should be inserted into the multiplex with minimaljitter. This option should be used if the PMT PID is configured to carry a PCR. Without giving priority to the PMT PIDpackets, multiplex jitter could cause PCR interval violations because of the low rate at which the PMT is inserted. If thePriority Parameter is set to Yes, then the PMT PID packets for this program are given priority when multiplexed.

The Priority Parameter is optional. The default value is No, which indicates that a higher priority should not be assigned tothe PMT PID packets. This parameter may be used only if the CreatePSI Parameter is set to Yes.

SBrate = integer

The SBrate Parameter specifies the drain rate of the smoothing buffer for this program. The value must be a non-negativeinteger representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000. If a smoothing buffer is to beused, non-zero values for both the SBsize and SBrate Parameters must be given.

The SBrate Parameter is optional. The default is 0, which is not to have a smoothing buffer for this program.

SBsize = integer

The SBsize Parameter specifies the size of the smoothing buffer for this program. The value must be a non-negativeinteger representing the buffer size in bytes. The valid range is 0 to 1 000 000 000. If a smoothing buffer is to be used,non-zero values for both the SBsize and SBrate Parameters must be given.

The SBsize Parameter is optional. The default is 0, which is not to have a smoothing buffer for this program.

4.2.4.5 Video Subsection

The Video Subsection is included in a Program Section to configure a video elementary stream as part of the program. Thevideo stream may be MPEG-1, MPEG-2 (any video profiles and levels including 4:2:2 profile and Multi-view profile), or H.264(also referred to as MPEG-4 part 10 or AVC). Up to 16 video elementary streams may be configured in a each program. Eachvideo stream must be specified in a separate Video Subsection.

The Video Subsection Title should be the only string on the first line of the Video Subsection. It appears as follows:

VideoN$

The N in the Video Subsection Title represents a number that identifies the input video elementary stream. There may be nospaces in the Title string, and there should be no other characters on the line. The input video stream number is for MP2TSMEuse only; it is not associated with any MPEG-2 parameter, or with the input filename. The number of the first input video streammust be 1, and the number is incremented for each subsequent input video stream. For example, if there are three videoelementary streams to be multiplexed in the program, then three Subsections would be configured with the titles Video1$,Video2$ and Video3$. The MP2TSME default is to not include any video streams in a Program Section.

Video Parameter Assignments are listed following the Video Subsection Title. All Parameter Assignments appearing betweenthe Video Subsection Title and the next Section or Subsection Title are considered to be part of the Video Subsection. TheParameter Assignments that appear in a given Video Subsection are specific to the video stream that is configured in theSubsection, i.e., they are not related to any other video streams that are configured in other Video Subsections.

The source of the input video stream can be a video elementary stream file, or can be multiplexed in an MPEG-1 system streamfile, an MPEG-2 program stream file, or an MPEG-2 transport stream file. When configuring a video stream, the video sourcemust usually be specified in the Video Subsection. However, if you are configuring one video stream in a single programtransport stream (i.e., the configuration file only has one Program Section with one Video Subsection and one AudioSubsection), then you have the option of using the Command Line File I/O Override feature to specify the name of the input file.If you elect to use this feature and the input file is a video elementary stream, there are no required parameters in the Video

Page 174: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0166

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Subsection.

If you are not using the Command Line File I/O Override feature, then the File Parameter or a set of FileN Parameters isrequired in the Video Subsection to identify the input file or files. The File Parameter is used when only a single input file isused. A set of FileN Parameters is used when the source stream is segmented into multiple input files.

If the input file is a system or program stream file, then the SourceStreamID parameter is also required. The SourceStreamIDidentifies the stream_id of the source video elementary stream in the system or program stream multiplex. If the input file is atransport stream file, then the SourceTSPID parameter is instead required. The SourceTSPID identifies the PID of the sourcevideo elementary stream in the transport stream multiplex.

All other video configuration parameters are assigned default values by MP2TSME if they are not explicitly specified in theVideo Subsection.

The default values used by the Multiplexer are the same as those used by the Standard default configuration available in theMP2TSME graphical UI program.

The following Parameter Assignments (shown categorized by functionality) are defined for the Video Subsection:

Input Remultiplex PMT Transport

File / FileN SourceStreamID StreamType PID

Rate SourceTSPID DescriptorN TransportPriority

Quadbyte DescFromData

AVSync

Adaptation PES Timing Closed Captions

InitDI PESalign FrameRate CreateDTVCC

RAI PEScopyrt FrameRateTolerant SCCFile

PCRGOP PESid NotLowDelay CCField

Splice stream_id_extension IgnorePOC CCTimeOffset

PESnau MaxDecodeDelay

PESpri DBsize

PESorig StreamDelay

PTSnPES IndDelay

MaxPESlen TypeDelay

PESPrivateDataFile Delay

Priority

SBrate

SBsize

StartSeqHdr

StrictVBV

StillPicOffset

RateAdjustment

The rest of this section describes each Video Parameter in detail.

File = string

The File Parameter specifies the name of the input video elementary stream file. The string value that is assigned to theFile Parameter may be the full pathname of the input file. If only a filename is given, then MP2TSME will look for thespecified filename in the current directory.

The two-character string %i can be used in the specified name if the input stream is segmented into multiple files that are

Page 175: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 167

Copyright © 1998 - 2010 Manzanita Systems, Inc.

sequentially named. The %i string represents an integer index that begins with 1. For example, if the input stream iscontiguously segmented into four files named part1.mpv, part2.mpv, part3.mpv, and part4.mpg, the filename used for FileParameter is part%i.mpv. The Multiplexer will look for a sequence of input files in the specified path starting with part1.mpv, and multiplex them as one continuous video stream. It will stop multiplexing when it reaches the last file name in thesequence. The first byte of the first file should be a sequence_header_code, followed by the remainder of the sequenceheader (and any extensions), and then the picture header for the first picture. The remaining files do not have to begin witha video start_code, i.e., the video elementary stream does not have to be segmented on start code or access unitboundaries. However, the multiple input files should make up a continuous video elementary stream when they areconcatenated.

The input file must be in binary format. The first byte of the file should be a sequence_header_code, followed by theremainder of the sequence header (and any extensions), and then the picture header for the first picture. Either the FileParameter or a set of FileN Parameters is required in each Video Subsection, unless the video filename is specified on thecommand line (see Using Command Line File I/O Override).

FileN = string

The FileN Parameter is used if the input video elementary stream is segmented into multiple sequential files. Each FileNParameter specifies the name of one of the input files. The string value that is entered may be the full path, relative path, orfilename only. If only a filename is given, then MP2TSME will look for the specified filename in the current directory. TheParameter Name is FileN where N is a number that identifies a specific input file. There may be no spaces between Fileand the file number. The file number is for MP2TSME use only; it is not associated with any MPEG parameter or with theactual filename. The number of the first input file must be 1, and the number is incremented for each subsequent file. Forexample, if the input stream is segmented into three files, the Parameter Names would be File1, File2 and File3. The inputfile must be in binary format. The first byte of the first file should be a sequence_header_code, followed by the remainder ofthe sequence header (and any extensions), and then the picture header for the first picture. The remaining files do nothave to begin with a video start_code, i.e., the video elementary stream does not have to segmented on start code oraccess unit boundaries. However, the multiple input files should make up a continuous video elementary stream when theyare concatenated. Either a set of FileN Parameters or the File Parameter is required in each Video Subsection, unless thevideo filename is specified on the command line (see Using Command Line File I/O Override).

Rate = double

The Rate Parameter specifies the maximum rate in bits per second that should be used for this video elementary stream.The value should be a non-negative real number and may include fractional Hz. It may range from 100 to 1 000 000 000bps, inclusive. If the value of Rate is zero (0), then the rate that is encoded in the video elementary stream's syntax is used.If the value of Rate is -1, then MP2TSME will inspect the entire input video file and compute the actual minimum video rate.The Multiplexer will use this minimum rate when multiplexing the video stream.

The Rate Parameter is optional. By default, the Multiplexer will use the rate that is encoded in the video elementarystream's syntax.

This parameter should only be used if a different rate is desired to overcome a defectively encoded stream.

The option to use the minimum rate (Rate = -1) may be necessary to multiplex poorly encoded AVC or VBR AVC, andalso for reducing the maximum decode delay (by increasing the bit rate, the delay is reduced).

QuadByte = [Yes | No]

The QuadByte Parameter is set to Yes if the video payload is to be modified to avoid an error found in some GI/MotorolaDCT-2000 set-top boxes. This option forces the start code and all data prior to each picture start code to be quad-bytealigned. This option should only be used if the output stream will be decoded by one of these set-tops.

The QuadByte Parameter is optional. The default value is No, which is not to quad byte align data before the picture startcode.

SourceStreamID = integer

The SourceStreamID Parameter specifies the stream_id of the source video stream when the input file is an MPEG-1system or MPEG-2 program stream. The presence of this parameter indicates to MP2TSME that it should extract theelementary stream associated with the specified stream_id from an input system or program stream file, and remultiplex itin the output transport stream. The stream_id for MPEG video is typically 0xE0. The valid range for the SourceStreamIDvalue is 1 to 255.

Page 176: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0168

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The SourceStreamID Parameter is required if the source video stream is to be remultiplexed from an input system orprogram stream file.

SourceTSPID = integer

The SourceTSPID Parameter specifies the PID that carries the source video stream when the input file is an MPEG-2transport stream. The presence of this parameter indicates to MP2TSME that it should extract the elementary streamassociated with the specified PID from transport stream file, and remultiplex it in the output transport stream. The validrange for the SourceTSPID value is 1 to 8190. The value may be specified in decimal, or if prefaced with a "0x", inhexadecimal.

The SourceTSPID Parameter is required if the source video stream is to be remultiplexed from an input transport streamfile.

DescFromData = [Yes | No]

The DescFromData Parameter is only meaningful if the video elementary stream is being remultiplexed from a transportstream. If DescFromData is set to Yes, the Multiplexer will extract any descriptors that are associated with the videoelementary stream in the input transport stream, and insert them in the appropriate output PMT, maintaining theirassociation with the remultiplexed stream. If DescFromData is set to No, the Multiplexer will ignore any descriptors thatpertain to the video stream in the input transport stream.

The DescFromData Parameter is optional. The default value is No.

If DescFromData is enabled, it will override any descriptor data defined by the DescriptorN Parameter in theconfiguration for the video elementary stream. That is, the descriptors defined by the DescriptorN Parameter will beignored and only descriptors extracted from the input transport stream that pertain to the video stream will be inserted inthe output PMT.

AVSync = [Yes | No]

If AVSync is set to Yes and one or more transport streams are being remultiplexed, the audio-video synchronization ismaintained across the file transitions. This allows existing transport streams to be remultiplexed with the lip syncmaintained in the new file. This feature is useful for creating longer streams from trailers or multiple segments and also forremultiplexing existing transport streams to correct PSI issues or multiplexing problems. All types of audio elementarystreams are supported including SMPTE 302M digital audio elementary stream.

If multiple transport streams are specified using the FileN Parameter, the video is effectively concatenated. In this case,each input video elementary stream should begin with an I frame and end with a complete picture.

To be effective, the AVSync Parameter must be set to Yes in both the Video and Audio configurations that have thesame input transport stream.

StreamType = integer

The StreamType Parameter specifies the value used in the stream_type field that identifies the video elementary stream inthe PMT. The value must be an integer between 0 and 255 (0x00 and 0xFF). The StreamType Parameter is optional. Thedefault value is 1 if the elementary stream is MPEG-1 video, 2 if it is MPEG-2 video, and 0x1B for AVC / H.264. If theStreamType value is set to 0, then the default value will be used.

DescriptorN = byte list

A DescriptorN Parameter specifies a sequence of data bytes that should be included as descriptor data associated withthis video elementary stream in the PMT. Multiple descriptors may be specified in a single DescriptorN Parameter,although it is recommended that the data assigned to each DescriptorN Parameter should consist of only one descriptor.Up to 32 DescriptorN Parameters may be configured in each Video Subsection. The parameter name is DescriptorNwhere N is a number that identifies the parameter. The number of the first DescriptorN Parameter is 1, and the number isincremented with each subsequent DescriptorN Parameter that appears in this Video Subsection. For example, if there arethree DescriptorN Parameters, then they would be named Descriptor1, Descriptor2 and Descriptor3. By default, nodescriptors are defined for this video stream.

MP2TSME does not check the validity of the specified descriptor data bytes.

Page 177: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 169

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Example:

Descriptor1 = 0D 04 4D414E5A

PID = integer

The PID Parameter specifies the PID value used for transport packets that carry this video elementary stream. The valuemust be an integer between 16 and 8190 (0x0010 and 0x1FFE), inclusive. The value may be specified in decimal, or ifprefaced with a "0x", in hexadecimal.

The PID Parameter is optional. If the PID Parameter is not specified, the PID assignment algorithm specified by ATSC isused for the first 3 video streams (Video1, Video2, and Video3) in programs with ProgramNumber values 2 through 401. Inthis case, the default PID value is 16 * ProgramNumber + N, where N is the number that identifies the video elementarystream in the program. For example, the PID for the second video stream (Video2) in a program with a ProgramNumber of3 would be assigned the default value of 16 * 3 + 2 = 50 (0x0032). Any video streams inserted in a program after Video3will be assigned the first available PID value between 6432 and 8190 (0x1920 and 0x1FFE), inclusive. Similarly, all videostreams inserted in programs with a ProgramNumber value greater than 401 will be assigned the first available value in therange 6432 through 8190, inclusive.

TransportPriority = [Yes | No]

The TransportPriority Parameter determines the value of the transport_priority bit that appears in all transport packets forthis video elementary stream. If the TransportPriority value is Yes, then all transport_priority bits are set to one.

The TransportPriority Parameter is optional. The default is No, which indicates that the transport_priority bit should have avalue of zero in all packets for this video stream.

InitDI = [Yes | No]

The InitDI Parameter indicates if the first transport packet carrying the video elementary stream should contain adiscontinuity_indicator with the value of 1. If the InitDI value is Yes, then the discontinuity_indicator is set in the initial videopacket. The InitDI Parameter is optional. The default value is No, which is not to set the discontinuity_indicator in the firstvideo packet.

RAI = [Yes | No]

The RAI Parameter is set to Yes if the random_access_indicator flag should have the value of 1 in every transport packetfor this video stream that contains the first byte of a sequence header. If the video PID is also a PCR PID, then a PCR willalso be inserted in this packet. The RAI Parameter is optional. The default value is No, which is not to set therandom_access_indicator for this video stream.

PCRGOP = [Yes | No]

The PCRGOP Parameter indicates if a PCR should be inserted in each transport packet containing the first byte of agroup_of_pictures (GOP) header. If the PCRGOP value is Yes, then every transport packet that contains the first byte of aGOP header will also carry a PCR. The parameter may only be used if the PID for this video elementary stream is also thePCR PID. The PCR spacing interval will be reset when a PCR is inserted in a packet with a GOP header even if theprevious PCR interval is less than the configured PCRper Parameter value.

The PCRGOP Parameter is optional. The default value is No, which is not to force a PCR in packets containing a GOPheader.

Splice = [None | Before | After]

The Splice Parameter indicates if splice points are to be inserted in packets for this video elementary stream. If the valueis Before, then a splice point is inserted in the packet containing the first byte of each I-frame. If the value is After, then asplice point is inserted after each I-frame.

The Splice Parameter is optional. The default value is None, or not to have splice points inserted in this video stream.

PESalign = [Yes | No]

The PESalign Parameter indicates if every access unit in the video elementary stream should be aligned to a PES header.

Page 178: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0170

Copyright © 1998 - 2010 Manzanita Systems, Inc.

If the value is Yes, then the first byte of each PES packet payload is the first byte of an access unit. Thedata_alignment_indicator bit will also be set in the PES header. This type of alignment corresponds to an alignment_type oftwo in the data_stream_alignment_descriptor. Note that this is the only alignment type supported by the Multiplexer.However, the Multiplexer does not automatically insert the data_stream_alignment_descriptor under these conditions; itmust be explicitly configured with the Video DescriptorN Parameter. The PESalign Parameter is optional. The default valueis No, which is not to align video access units to PES headers.

PEScopyrt = [Yes | No]

The PEScopyrt Parameter indicates the state of the copyright field that appears in all PES headers for the videoelementary stream. If the value is Yes, then the copyright field will be set to a value of 1. The PEScopyrt Parameter isoptional. The default is No, which is to assign the copyright field a value of 0.

PESid = integer

The PESid Parameter specifies the value used in the stream_id field that appears in all PES headers for this videoelementary stream. The value must be an integer between 0 and 255 (0x00 and 0xFF), inclusive. For video streams, theMPEG standard defines the values from 0xE0 through 0xEF for MPEG video streams. The PESid Parameter is optional.The default value is 0xE0. If the PESid value is set to 0, then default value will be used.

stream_id_extension = integer

The stream_id_extension Parameter should only be specified if the PESid Parameter has the value 0xFD. This parameterspecifies the value for the stream_id_extension field, when present, in PES packets that carry this video elementarystream. The stream_id_extension field will only be encoded in the PES header if the stream_id has the value 0xFD. Inother words, if the PESid Parameter is set to 0xFD, then the Multiplexer will use the value specified for thestream_id_extension Parameter as the value of the PES stream_id_extension. If a value other than 0xFD is assigned tothe PESid Parameter, then the Multiplexer ignores the stream_id_extension Parameter. The value must be an integerbetween 0 and 127 (0x00 and 0x7F), inclusive.

PESnau = integer

The PESnau Parameter specifies the frequency of video access units relative to the frequency of PES headers. Forexample, if the PESnau Parameter is set to 3, then the Multiplexer will insert a PES header every third video access unit.The value must be an integer between 1 and 100. The PESnau Parameter is optional. The default value is 1, which is tohave a PES header every video access unit.

PESpri = [Yes | No]

The PESpri Parameter indicates the state of the PES_priority field that appears in all PES headers for this videoelementary stream. If the value is Yes, then the PES_priority field in the PES headers will be set to one.

The PESpri Parameter is optional. The default is No, which assigns the PES_priority a value of 0.

PESorig = [Yes | No]

The PESorig Parameter indicates the state of the original_or_copy field that appears in all PES headers for this videoelementary stream. If the value is Yes, then the original_or_copy field in all PES headers will be set to a value of one.

The PESorig Parameter is optional. The default is No, which assigns the original_or_copy field a value of 0.

PTSnPES = integer

The PTSnPES Parameter specifies the frequency of PES headers relative to the frequency of time stamps for thiselementary stream. For example, if the PTSnPES Parameter is set to 2, then the Multiplexer will insert a PTS (and ifnecessary a DTS) in every second PES header. The value must be an integer between one and 60.

The PTSnPES Parameter is optional. The default value is 1, which is to have a time stamp in every PES header.

Page 179: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 171

Copyright © 1998 - 2010 Manzanita Systems, Inc.

MaxPESlen = integer

The maxPESlen Parameter specifies the maximum PES packet payload for the video stream. If the PES packet size willexceed the stated maximum, a new PES header is inserted. This feature is intended for use by decoders that can nothandle the large PES packets that are frequently created with video streams. A value of zero indicates that there is nomaximum PES packet size and MP2TSME should not insert extra PES headers. The value should be an integer between184 through 2 000 000 000, inclusive.

The maxPESlen Parameter is optional. The default value is 0, which indicates that PES packet sizes should not be limited.

PESPrivateDataFile = string

The PESPrivateDataFile Parameter specifies the name of an input file that contains private data that is to be inserted intothe video PES headers. The string value that is assigned to the PESPrivateDataFile Parameter may be the full pathnameof the input file. If only a filename is given, then MP2TSME will look for the specified filename in the current directory.

The input file must be in a specific format that is defined by Manzanita Systems as described in the section, PES PrivateData File Format. The file is organized as a sequence of data entries. Each entry includes fields that indicate the time oraccess unit index in which the data is to be inserted, and whether the data is to be carried in the 16-byte pes_private_datafield or in the reserved bytes following the PES_extension_flag_2. Note that the two insertion modes may be mixed withinthe input file.

FrameRate = [Auto | 23.97 | 24 | 25 | 29.97 | 30 | 50 | 59.94 | 60]

The FrameRate Parameter sets the frame rate that the Multiplexer uses to multiplex this video elementary stream. If Autois selected, then the Multiplexer will use the frame rate that is encoded in the elementary stream syntax. The Auto settingshould normally be used, however, AVC (H.264) video streams may not be encoded with frame rate information. In thiscase, one of several discrete frame rates may be specified.

The FrameRate Parameter is optional. The default value is Auto.

When the Multiplexer is run, an error will be issued if an AVC stream does not contain frame rate information and theFrameRate is set to Auto.

If the FrameRate Parameter is set to a value that overrides the frame rate in the video elementary stream syntax, theresulting transport stream will be illegal.

FrameRateTolerant = [Yes | No]

The FrameRateTolerant Parameter is only applicable to AVC/H.264 video elementary streams. Unlike MPEG-2, AVCexpresses frame rates as a ratio, allowing any rate to be specified. Some AVC encoders may be configured to use astandard frame rate, but incorrectly represent it in the syntax. This problem can be corrected by setting theFrameRateTolerant Parameter to Yes. In this case, if the encoded frame rate is close to a standard frame rate, then theMultiplexer will use the standard frame rate when multiplexing instead of the "non-standard" rate.

If the FrameRateTolerant Parameter is set to No, then the Multiplexer will use the frame rate that is encoded in the videostream.

The FrameRateTolerant Parameter is optional. The default value is No.

NotLowDelay = [Yes | No]

The NotLowDelay Parameter tells the Multiplexer that the video stream will not be a low_delay stream. Normally theMultiplexer examines the beginning of the stream for the presence of any B-frames or for the low_delay flag. If B-framesare seen, then the stream is not a low_delay stream and the timing must be created differently than for a stream withoutany B-frames. In H.264 video streams, the low_delay flag may not be present, and often B-frames may not be encodeduntil much late in the stream. In this case the Multiplexer may erroneously assume that B-frames are not present and uselow_delay timing. The NotLowDelay Parameter allows the operator to force the Multiplexer to use timing appropriate forstreams with B-frames, even if there are none in the beginning of the stream. This parameter is only required to multiplexsome H.264 video streams. The Multiplexer will issue a warning if NotLowDelay should have been enabled.

The NotLowDelay Parameter is optional. The default value is No.

Page 180: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0172

Copyright © 1998 - 2010 Manzanita Systems, Inc.

IgnorePOC = [Yes | No]

The IgnorePOC Parameter is only applicable to H.264 video elementary streams. H.264 video may contain many differentpieces of information indicating the timing required for multiplexing. One of these is the Picture Order Count (POC). Insome cases a faulty encoder may put bad values in the stream, and the POC is unreliable. If the Multiplexer creates astream that does not play well, the problem may be fixed by rerunning the Multiplexer with the IgnorePOC Parameter setto Yes. The Multiplexer will then use information other than the POC to determine the picture timing.

The IgnorePOC Parameter is optional. The default value is No.

MaxDecodeDelay = integer

The MaxDecodeDelay Parameter sets the maximum difference between the PTS and the PCR in units of 90 kHz clockcycles. The value should be an integer with a valid range of 0 to 900 000 (10 seconds), inclusive.

The MaxDecodeDelay Parameter is optional. By default, the Multiplexer limits the decode delay to 10 seconds (900 000clock cycles) for AVC / H.264 video and one (1) second for all other types of video.

This parameter is primarily intended for use with H.264 video when the maximum 10 second decode delay would resultin unacceptable streams with unacceptable characteristics, e.g., excessive stream latency or acquisition time.

DBsize = integer

The DBsize Parameter specifies the size of the decoder buffer for this video elementary stream. The value should be anon-zero positive integer that represents the buffer size in bytes. The valid range is 0 to 1 000 000 000. A DBsize value ofzero indicates that the video decoder buffer size should be based on the MPEG-2 T-STD model.

The DBsize Parameter is optional. The default value is 0, which is to use the T-STD buffer size.

StreamDelay = integer

The StreamDelay Parameter specifies the length of time that the video elementary stream should be delayed from thebeginning of the program. The units for the value are 90 kHz clock cycles. The value must be an integer between 0 and 1000 000 000. This option may be used to achieve lip sync when the various streams were not encoded at the same time.The StreamDelay Parameter is optional. The default value is 0, which indicates that the video elementary stream shouldnot be delayed.

If PCRs are carried in the video PID, there will not be any PCRs at the beginning of the transport stream if the videostream is delayed by the StreamDelay parameter.

IndDelay = [Yes | No]

The IndDelay Parameter has no effect on the first video stream. When the value is set to Yes, then the initial delay to beused for this video elementary stream should be independent of other elementary streams in this program. Normally thefirst video stream sets when all subsequent elementary streams in the program will be decoded. This insures that allelementary streams in the program are aligned in presentation time. Sometimes this alignment can cause problems if thefirst video stream uses a very short delay, or its delay adversely affects the decoding of other video streams in theprograms. In such a case, the IndDelay Parameter may be set to Yes, and the initial delay of the secondary videostreams are set according to the TypeDelay Parameter plus the value of the Delay Parameter.

The IndDelay Parameter is optional. The default is No, which is not to have an independent initial delay.

TypeDelay = [VBV | Max]

The TypeDelay Parameter is only effective if this is the first video stream in the program, or if the IndDelay Parameter is setto Yes. The value of Max indicates that the video stream's delay should be set to the maximum possible length. Thisdelay would cause the decoder FIFO to fill to a maximum prior to the initial DTS. Use of this parameter may be necessaryfor video streams that do not have valid vbv_delay values, resulting in an underflow of the decoder. In this case, it is bestto fill the decoder and rely on MP2TSME's model of the decoder to keep the decoder full. The value of VBV indicates thatthe delay should be set by the vbv_delay field from the first picture in the video elementary stream.

The TypeDelay Parameter is optional. The default value is VBV, which is to use the stream's vbv_delay value.

Page 181: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 173

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Delay = integer

The Delay Parameter represents an additional delay that is added to the precomputed initial delay for the first picture in thevideo stream. The units for the value are 90 kHz clock cycles. The value must be a positive or negative integer that rangesfrom -90 000 to 90 000. The initial delay is used as the presentation time stamp (PTS) for the first picture. Normally, allelementary streams within a program are configured to have the same initial PTS, that of the video elementary stream.This will insure that there are no lip sync problems, assuming all source material was aligned when encoded. In caseswhere there is a decoder buffer underflow early in the stream, the Delay Parameter can be set to allow more time for datato arrive in the decoder. The Delay Parameter is optional and is normally not used. The default value is 0.

Example:

Delay = -4500

Priority = [Yes | No]

The Priority Parameter is set to Yes to indicate that transport packets for this video elementary stream should be insertedinto the multiplex with minimal jitter. This parameter should not normally be used for a video stream.

The Priority Parameter is optional. The default value is No, which indicates that a higher priority should not be assigned tothis video stream.

SBrate = integer

The SBrate Parameter specifies the drain rate of the smoothing buffer for this video elementary stream. The value mustbe a non-negative integer representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000. If asmoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given.

The SBrate Parameter is optional. The default is 0, which is not to have a smoothing buffer for this video stream.

SBsize = integer

The SBsize Parameter specifies the size of the smoothing buffer for this video elementary stream. The value must be anon-negative integer representing the buffer size in bytes. The valid range for the SBsize value is 0 to 1 000 000 000. If asmoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given.

The SBsize Parameter is optional. The default value is 0, which is not to have a smoothing buffer for this video stream.

StartSeqHdr = [Yes | No]

The StartSeqHdr Parameter indicates if the input video stream should be modified by deleting all data up to the firstsequence header or SPS. MP2TSME expects video data to begin with a sequence header and at the beginning of acomplete picture. This parameter may be used to trim input streams that do not start cleanly.

The use of StartSeqHdr in the Video Subsection and Start in the Transport Section will conflict and only one will havean effect. It is recommended that only one of these two parameters appear in a configuration file.

The StartSeqHdr Parameter is optional. The default value is No, which indicates that the input video stream should not betrimmed to the first sequence header.

StrictVBV = [Yes | No]

The StrictVBV Parameter is set to Yes to indicate that the video elementary stream should be inserted into the transportstream by strictly positioning each picture according to the vbv_delay field at the beginning of the picture header. Thisparameter can only be used if the video elementary stream is constant bit rate.

The StrictVBV Parameter is optional. The default value is No, which indicates that video should not be inserted strictlyaccording to the vbv_delay values.

StillPicOffset = integer

When the input video stream is coded for still pictures, the StillPicOffset Parameter specifies the minimum PTS offset foreach video picture relative to the PCR. The value is a non-negative integer that indicates the offset as a number of video

Page 182: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0174

Copyright © 1998 - 2010 Manzanita Systems, Inc.

frame times. A value of 10, for example, would force all PTS values in the stream to be at least 10 picture times after thecurrent PCR when the picture is begun to be sent. The StillPicOffset should be set to allow the largest picture to arrive inthe decoder prior to the PTS equaling the PCR value. This feature allows streams that consist of only I-picture sequencesto be sent at low rates resulting in a slide show effect. The valid range for the StillPicOffset value is 0 to 65 535, inclusive.

The StillPicOffset Parameter is optional. The default is 0, which is not to force a minimum PTS offset.

RateAdjustment = integer

The RateAdjustment Parameter specifies an adjustment to the bit rate that is encoded in the video elementary streamsyntax. The Multiplexer adds or subtracts this adjustment, and uses the resulting bit rate when multiplexing the videostream. The value for RateAdjustment is specified in bps, and the valid range is -1 000 000 to 1 000 000, inclusive.

The RateAdjustment Parameter is optional. The default value is 0.

The RateAdjustment Parameter can be used to boost the rate of AVC/H.264 video to compensate for a poor ratecontrol algorithm in the encoder. However, the resulting stream may not be legal, although it may well work on alldecoders. Ideally, the encoder should be redesigned with accurate rate control.

CreateDTVCC = [Yes | No]

The CreateDTVCC Parameter is set to Yes to enable the Multiplexer to synthesize and insert DTVCC (specified byCEA-708-C, commonly referred to as 708) data in the video stream. The source for the inserted DTVCC data depends onwhether the SCCFile Parameter is used to specify an input closed caption data file.

If the SCCFile Parameter is not used, the Multiplexer will use any analog-compatible captions that it finds in the input videoas the source for the DTVCC data. In this case, the original A/53 608 or DVS157 (SCTE 20) source data will be left in thestream.

If the SCCFile Parameter specifies the name of an input file, then the Multiplexer will synthesize DTVCC data from thesource data, and insert both DTVCC and A/53 608 caption data in the multiplexed video. In this case, any A/53 608caption data that is in the input video will be replaced by the A/53 608 data that is sourced by the SCCFile.

In both of the preceding cases, any DVS157 (SCTE 20) data that is present in the input video stream is not removed orreplaced, and is still present in the multiplexed video.

The default value for CreateDTVCC is No, which configures the Multiplexer not to insert DTVCC data in the video stream.

SCCFile = string

The SCCFile Parameter specifies the name of an input closed caption data file. The string value that is assigned to theSCCFile Parameter may be the full pathname of the input file. If only a filename is given, then MP2TSME will look for thespecified filename in the current directory.

The file must be a text file that is in one of the following formats:

· Scenarist_SCC V1.0 format

· Computer Prompting and Captioning Company's MCC format

· Simplified SCC format (described in the section Input Closed Caption Data Format)

The closed caption data is inserted in the video stream as specified by ATSC A/53 608 and/or DTVCC (commonly referredto as 708). The CreateDTVCC, CCField, and CCTimeOffset Parameters configure the insertion of the data.

Any DVS157 (SCTE 20) data that is present in the input video stream is not removed or replaced, and is still present inthe multiplexed video.

CCField = [Odd | Even]

The CCField Parameter is only valid if an input closed caption data file is specified using the SCCFile parameter. IfCCField is set to Odd, then the Multiplexer will encode the closed caption data for insertion on the first field (channels CC1,CC2) If it is set to Even, then the data is encoded for the second field (channels CC3, CC4). The default value for CCFieldis Odd.

The valid values for the CCField Parameter are Odd and Even when assigned in a configuration file.

Page 183: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 175

Copyright © 1998 - 2010 Manzanita Systems, Inc.

CCTimeOffset = hh:mm:ss:ff or hh:mm:ss;ff

The CCTimeOffset Parameter is only valid if an input closed caption data file is specified using the SCCFile parameter. Ifthe timecodes in the SCCFile have an offset relative to the timecodes in the video stream, the CCTimeOffset Parametercan be used to align the captions with the video. The CCTimeOffset value is specified in either HH:MM:SS:FF (NDFTC) orHH:MM:SS;FF (DFTC) format. The Multiplexer will subtract the specified CCTimeOffset value from each closed captioninsertion time that it computes, and insert the closed caption data in the video stream at this new insertion time.

4.2.4.6 Audio Subsection

The Audio Subsection is included in a Program Section to configure an audio elementary stream as part of the program. Up to64 audio elementary streams may be configured in a each program. Each audio stream must be specified in a separate AudioSubsection. The audio streams may be any combination of MPEG-1, MPEG-2, Advanced Audio Coding (AAC), Dolby AC-3,DTS, Enhanced AC-3, or MPEG-4 (HE-AAC and HE-AAC version 2) encoded audio elementary streams.

The Audio Subsection Title should be the only string on the first line of the Audio Subsection. It appears as follows:

AudioN$

The N in the Audio Subsection Title represents a number that identifies the input audio elementary stream. There may be nospaces in the Title string, and there should be no other characters on the line. The input audio stream number is for MP2TSMEuse only; it is not associated with any MPEG-2 parameter, or with the input filename. The number of the first input audio streammust be 1, and the number is incremented for each subsequent input audio stream. For example, if there are three audioelementary streams to be multiplexed in the program, then three Subsections would be configured with the titles Audio1$,Audio2$ and Audio3$. The MP2TSME default is to not include any audio streams in a Program Section.

Audio Parameter Assignments are listed following the Audio Subsection Title. All Parameter Assignments appearing betweenthe Audio Subsection Title and the next Section or Subsection Title are considered to be part of the Audio Subsection. TheParameter Assignments that appear in a given Audio Subsection are specific to the audio stream that is configured in theSubsection, i.e., they are not related to any other audio streams that are configured in other Audio Subsections.

The source of the input audio stream can be a audio elementary stream file, or can be multiplexed in an MPEG-1 system streamfile, an MPEG-2 program stream file, or an MPEG-2 transport stream file. When configuring a audio stream, the audio sourcemust usually be specified in the Audio Subsection. However, if you are configuring one audio stream in a single programtransport stream (i.e., the configuration file only has one Program Section with one Video Subsection and one AudioSubsection), then you have the option of using the Command Line File I/O Override feature to specify the name of the input file.If you elect to use this feature and the input file is an audio elementary stream, there are no required parameters in the AudioSubsection.

If you are not using the Command Line File I/O Override feature, then the File Parameter or a set of FileN Parameters isrequired in the Audio Subsection to identify the input file or files. The File Parameter is used when only a single input file isused. A set of FileN Parameters is used when the source stream is segmented into multiple input files.

If the input file is a system or program stream file, then the SourceStreamID parameter is also required. The SourceStreamIDidentifies the stream_id of the source audio elementary stream in the system or program stream multiplex. If the input file is atransport stream file, then the SourceTSPID parameter is required instead. The SourceTSPID identifies the PID of the sourceaudio elementary stream in the transport stream multiplex.

All other audio configuration parameters are assigned default values by MP2TSME if they are not explicitly specified in theAudio Subsection.

The default values used by the Multiplexer are the same as those used by the Standard default configuration available in theMP2TSME graphical UI program.

The following Parameter Assignments (shown categorized by functionality) are defined for the Audio Subsection:

Input Remultiplex PMT Transport

File / FileN SourceStreamID StreamType PID

Rate SourceStreamSubtype DescriptorN TransportPriority

SourceTSPID

Page 184: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0176

Copyright © 1998 - 2010 Manzanita Systems, Inc.

DescFromData

AVSync

TransitionCleanUp

Adaptation PES Timing

InitDI PESalign ATSCbuf

RAI PEScopyrt DVBbuf

PESid DBsize

stream_id_extension StreamDelay

PESnau IndDelay

PESpri Delay

PESorig Priority

PTSnPES SBrate

SBsize

SkipFrames

The rest of this section describes each Audio Parameter in detail.

File = string

The File Parameter specifies the name of the input audio elementary stream file. The string value that is entered may bethe full path, relative path, or filename only. If only a filename is given, then the Multiplexer will look for the specifiedfilename in the current directory.

The two-character string %i can be used in the specified name if the input stream is segmented into multiple files that aresequentially named. The %i string represents an integer index that begins with 1. For example, if the input stream iscontiguously segmented into four files named part1.mpa, part2.mpa, part3.mpa, and part4.mpa, the filename used for FileParameter is part%i.mpa. The Multiplexer will look for a sequence of input files in the specified path starting with part1.mpa, and multiplex them as one continuous audio stream. It will stop multiplexing when it reaches the last file name in thesequence. The first byte of the first file must be the first byte of an audio frame. The remaining files do not have to beginwith the start of an audio frame, i.e., the audio elementary stream does not have to segmented on access unit boundaries.However, the multiple input files should make up a continuous audio elementary stream when they are concatenated.

The input file must be an MPEG (Layer I, II or III), AAC (Advanced Audio Coding), HE-AAC, Dolby AC-3, DTS, orEnhanced AC-3 audio elementary stream in binary format. The first byte of the file should be the first byte of an audioframe, and the file should contain an integral number of frames. The Multiplexer will determine the audio encoding methodand bitrate from the stream’s syntax. Either the File Parameter or a set of FileN Parameters is required in each AudioSubsection, unless the audio filename is specified on the command line (see Using Command Line File I/O Override).

FileN = string

The FileN Parameter is used if the input stream that sources the audio elementary stream is segmented into multiplesequential files. Each FileN Parameter specifies the name of one of the input files. The string value that is entered may bethe full path, relative path, or filename only. If only a filename is given, then MP2TSME will look for the specified filename inthe current directory. The Parameter Name is FileN where N is a number that identifies a specific input file. There may beno spaces between File and the file number. The file number is for MP2TSME use only; it is not associated with anyMPEG-2 parameter or with the actual filename. The number of the first input file must be 1, and the number is incrementedfor each subsequent file. For example, if the input stream is segmented into three files, the Parameter Names are File1,File2 and File3. The input file must be in binary format. The first byte of the first file should be the first byte of an audioframe. The remaining files do not have to begin with the first byte of an audio frame, i.e., the audio elementary stream doesnot have to be segmented on access unit boundaries. However, the multiple input files should make up a continuous audioelementary stream when they are concatenated. Either a set of FileN Parameters or the File Parameter is required in eachAudio Subsection, unless the audio filename is specified on the command line (see Using Command Line File I/O Override).

Rate = double

Page 185: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 177

Copyright © 1998 - 2010 Manzanita Systems, Inc.

A Rate Parameter specifies the maximum rate in bits per second that should be used for this audio elementary stream. The value must be a non-negative number in double format. It may include fractional Hz. The valid range is 1 to 60 000000 bps.

The Rate Parameter is optional. By default, the value is taken from the audio elementary stream's syntax. This parametershould only be used if a higher rate is desired to overcome a defectively encoded stream.

MP2TSME will continue to protect the decoder FIFO in spite of a higher than appropriate rate. However, using a lowerrate will result in decoder buffer underflow. MP2TSME can not prevent this from happening.

SourceStreamID = integer

The SourceStreamID Parameter specifies the stream_id of the source audio stream when the input file is an MPEG-1system or MPEG-2 program stream. The Multiplexer will extract the elementary stream associated with the specifiedstream_id from the input system or program stream file, and remultiplex it in the output transport stream. The stream_id istypically 0xC0 for MPEG audio and 0xBD for AC-3 audio. The valid range for the SourceStreamID value is 0x01 to 0xFF(255), inclusive.

The SourceStreamID Parameter is required if the source audio stream is to be remultiplexed from an input system orprogram stream file.

SourceStreamSubtype = integer

The SourceStreamSubtype Parameter specifies the subtype that is assigned to the source audio stream in the input VOBfile. In this case, the audio stream must be encoded as Dolby AC-3 and the VOB must be unencrypted. Most DVDs usesubtype values starting at 0x80 for AC-3 audio. The SourceStreamSubtype value should be a non-negative integer in therange 0x01 to 0xFF (255), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

The SourceStreamSubtype Parameter should be specified if the source audio stream is to be remultiplexed from an inputVOB file.

SourceTSPID = integer

The SourceTSPID Parameter specifies the PID that carries the source audio stream when the input file is an MPEG-2transport stream. The Multiplexer will extract the elementary stream associated with the specified PID from the inputtransport stream file, and remultiplex it in the output transport stream. The valid range for the SourceTSPID value is 1 to8190 (0x0001 and 0x1FFE), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

The SourceTSPID Parameter is required if the source audio stream is to be remultiplexed from an input transport streamfile.

DescFromData = [Yes | No]

The DescFromData Parameter is only meaningful if the audio elementary stream is being remultiplexed from a transportstream. If DescFromData is set to Yes, the Multiplexer will extract any descriptors that are associated with the audioelementary stream in the input transport stream, and insert them in the appropriate output PMT, maintaining theirassociation with the remultiplexed stream. If DescFromData is set to No, the Multiplexer will ignore any descriptors thatpertain to the audio stream in the input transport stream.

The DescFromData Parameter is optional. The default value is No.

If DescFromData is enabled, it will override any descriptor data defined by the DescriptorN Parameter in theconfiguration for the audio elementary stream. That is, the descriptors defined by the DescriptorN Parameter will beignored and only descriptors extracted from the input transport stream that pertain to the audio stream will be inserted inthe output PMT.

AVSync = [Yes | No]

The AVSync Parameter is only valid if multiple transport streams are being remultiplexed. If the AVSync Parameter is setto Yes, the audio-video synchronization is maintained across the file transitions. This allows existing transport streams tobe remultiplexed with the lip sync maintained in the new file. This feature is useful for creating longer streams from trailersor multiple segments and also for remultiplexing existing transport streams to correct PSI issues or multiplexing problems. All types of audio elementary streams are supported including SMPTE digital audio elementary streams.

Page 186: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0178

Copyright © 1998 - 2010 Manzanita Systems, Inc.

If multiple transport streams are specified by the Files Parameter and the Remux Stream Parameter is enabled, the audiois effectively concatenated. In this case, the input audio elementary streams should begin and end with a complete audioframes, however, the TransitionCleanUp Parameter can be enabled if this is not the case.

To be effective, the AVSync Parameter must be set to Yes in both the Video and Audio configurations that have thesame input transport stream.

TransitionCleanUp = [Yes | No]

The TransitionCleanUp Parameter is only valid if multiple transport streams are being remultiplexed. If the audio does notbegin and end cleanly in each file, then there will be a loss of audio sync at the transitions. The TransitionCleanupParameter should be set to Yes to tell the multiplexer to clean up (delete) any partial audio frames at each file transition.

StreamType = integer

The StreamType Parameter specifies the value used in the stream_type field that identifies the audio elementary stream inthe PMT. The value must be an integer between 0 and 255 (0x00 and 0xFF), inclusive. The StreamType Parameter isoptional. By default, the Multiplexer will determine the type of audio encoding used, and set the stream_type to 0x03 forMPEG-1 audio, 0x04 for MPEG-2 audio, 0x06 for DTS audio, 0x0F for AAC, or to 0x81 for AC-3 audio streams. If theStreamType value is set to 0, then the default value will be used.

DescriptorN = byte list

A DescriptorN Parameter specifies a sequence of data bytes that should be included as descriptor data associated withthis audio elementary stream in the PMT. Multiple descriptors may be specified in a single DescriptorN Parameter,although it is recommended that the data assigned to each DescriptorN Parameter should consist of only one descriptor.Up to 32 DescriptorN Parameters may be configured in each Audio Subsection. The parameter name is DescriptorNwhere N is a number that identifies the parameter. The number of the first DescriptorN Parameter is 1, and the number isincremented with each subsequent DescriptorN Parameter that appears in this Audio Subsection. For example, if there arethree DescriptorN Parameters, then they would be named Descriptor1, Descriptor2 and Descriptor3. By default, nodescriptors are defined for this audio stream.

MP2TSME does not check the validity of the specified descriptor data bytes.

Example:

Descriptor1 = 0A 04 656E67 02

PID = integer

The PID Parameter specifies the PID value used for transport packets that carry this audio elementary stream. The valuemust be an integer between 16 and 8190 (0x0010 and 0x1FFE), inclusive. The value may be specified in decimal, or ifprefaced with a "0x", in hexadecimal.

The PID Parameter is optional. If the PID value is not specified, then the PID assignment algorithm specified by ATSC isused for the first 9 audio streams (Audio1 to Audio9) in programs with ProgramNumber values 2 through 401. In this case,the default PID value is 16 * ProgramNumber + 3 + N, where N is the number that identifies the audio elementary stream inthe program. For example, the PID for the second audio stream (Audio2) in a program with a ProgramNumber of 3 wouldbe assigned the default value of 16 * 3 + 3 + 2 = 53 (0x0035). Any audio streams inserted in a program after Audio9 will beassigned the first available PID value between 6432 and 8190 (0x1920 and 0x1FFE), inclusive. Similarly, all audio streamsinserted in programs with a ProgramNumber value greater than 401 will be assigned the first available value in the range6432 through 8190, inclusive.

TransportPriority = [Yes | No]

The TransportPriority Parameter determines the value of the transport_priority bit that appears in all transport packets forthis audio elementary stream. If the TransportPriority value is Yes, then all transport_priority bits are set to one.

The TransportPriority Parameter is optional. The default is No, which indicates that the transport_priority bit should have avalue of zero in all packets for this audio stream.

InitDI = [Yes | No]

Page 187: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 179

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The InitDI Parameter indicates if the first transport packet carrying the audio elementary stream should contain adiscontinuity_indicator with the value of 1. If the InitDI value is Yes, then the discontinuity_indicator is set in the initial audiopacket. The InitDI Parameter is optional. The default value is No, which is not to set the discontinuity_indicator in the firstaudio packet.

RAI = [Yes | No]

The RAI Parameter is set to Yes to indicate the random_access_indicator flag should be set to one in every transportpacket for this audio stream that contains a PES header with a PTS. If the audio PID is also a PCR PID, then a PCR willalso be inserted in this packet. The RAI Parameter is optional. The default value is No, which is not to set therandom_access_indicator for this audio stream.

PESalign = [Yes | No]

The PESalign Parameter indicates if every access unit in the audio elementary stream should be aligned to a PES header.If the value is Yes, then the first byte of each PES packet payload is the first byte of an access unit. Thedata_alignment_indicator bit will also be set in the PES header. The PESalign Parameter is optional. The default value isNo, which is not to align audio access units to PES headers.

PEScopyrt = [Yes | No]

The PEScopyrt Parameter indicates the state of the copyright field that appears in all PES headers for the audioelementary stream. If the value is Yes, then the copyright field will be set to a value of 1. The PEScopyrt Parameter isoptional. The default is No, which is to assign the copyright field a value of 0.

PESid = integer

The PESid Parameter specifies the value used in the stream_id field that appears in all PES headers for the audioelementary stream. The value must be an integer between 0 and 255 (0x00 and 0xFF), inclusive. For audio streams, theMPEG standard defines the values from 0xC0 through 0xDF for MPEG or AAC audio. The PESid Parameter is optional.The default value is 0xC0 for MPEG audio, and 0xBD (private_stream_1) for AC-3, Enhanced AC-3 and DTS streams.

stream_id_extension = integer

The stream_id_extension Parameter should only be specified if the PESid Parameter has the value 0xFD. This parameterspecifies the value for the stream_id_extension field, when present, in PES packets that carry this audio elementarystream. The stream_id_extension field will only be encoded in the PES header if the stream_id has the value 0xFD. Inother words, if the PESid Parameter is set to 0xFD, the Multiplexer will use the value specified for the stream_id_extensionParameter as the value of the PES stream_id_extension. If a value other than 0xFD is assigned to the PESid Parameter,then the Multiplexer ignores the stream_id_extension Parameter. The value must be an integer between 0 and 127 (0x00and 0x7F), inclusive.

PESnau = integer

The PESnau Parameter specifies the frequency of audio access units relative to the frequency of PES headers. Forexample, if the PESnau Parameter is set to 3, then the Multiplexer will insert a PES header every third audio access unit.The value must be an integer between 1 and 100. The PESnau Parameter is optional. The default value is 2, which is tohave a PES header every other audio access unit.

PESpri = [Yes | No]

The PESpri Parameter indicates the state of the PES_priority field that appears in all PES headers for this audioelementary stream. If the value is Yes, then the PES_priority field in all PES headers will be set to one.

The PESpri Parameter is optional. The default is No, which indicates that the PES_priority is set to zero.

PESorig = [Yes | No]

The PESorig Parameter indicates the state of the original_or_copy field that appears in all PES headers for this audio

Page 188: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0180

Copyright © 1998 - 2010 Manzanita Systems, Inc.

elementary stream. If the value is Yes, then the original_or_copy field in all PES headers will be set to a value of one.

The PESorig Parameter is optional. The default is No, which is to assign the original_or_copy field a value of zero.

PTSnPES = integer

The PTSnPES Parameter specifies the frequency of PES headers relative to the frequency of time stamps in this audioelementary stream. For example, if the PTSnPES Parameter is set to two, then the Multiplexer will insert a PTS in everyother PES header. The value must be an integer between one and 60.

The PTSnPES Parameter is optional. The default value is 1, which is to have a time stamp in every PES header.

PESPrivateDataFile = string

The PESPrivateDataFile Parameter specifies the name of an input file that contains private data that is to be inserted intothe audio PES headers. The string value that is assigned to the PESPrivateDataFile Parameter may be the full pathnameof the input file. If only a filename is given, then MP2TSME will look for the specified filename in the current directory.

The input file must be in a specific format that is defined by Manzanita Systems as described in the section, PES PrivateData File Format. The file is organized as a sequence of data entries. Each entry includes fields that indicate the time oraccess unit index in which the data is to be inserted, and whether the data is to be carried in the 16-byte pes_private_datafield or in the reserved bytes following the PES_extension_flag_2. Note that the two insertion modes may be mixed withinthe input file.

ATSCbuf = [Yes | No]

The ATSCbuf Parameter indicates whether this audio stream is to be multiplexed according to the T-STD buffer modelspecified by the Advanced Television Systems Committee (ATSC). This parameter should only be used if the input is anAC-3 audio elementary stream. If the value is Yes, then the ATSC T-STD buffer model is used. The ATSCbuf Parameter isoptional. The ATSCbuf Parameter should never be set to Yes if the DVBbuf Parameter is set to Yes. The default value isNo. If both the ATSCbuf Parameter and the DVBbuf Parameter are set to No or are absent, then the standard MPEGT-STD buffer model is used to multiplex the stream.

DVBbuf = [Yes | No]

The DVBbuf Parameter indicates whether this audio stream is to be multiplexed according to the buffer model specified bythe Digital Video Broadcasting (DVB) standard. This parameter should only be used if the input is an AC-3 audioelementary stream. If the value is Yes, then the DVB buffer model is used. The DVBbuf Parameter is optional. The DVBbufParameter should never be set to Yes if the ATSCbuf Parameter is set to Yes. The default value is No. If both the DVBbufParameter and the ATSCbuf Parameter are set to No or are absent, then the standard MPEG T-STD buffer model is usedto multiplex the stream.

DBsize = integer

The DBsize Parameter specifies the size of the decoder buffer for this audio stream. The value must be a non-zeropositive integer that represents the buffer size in bytes. The valid range is 0 to 1 000 000 000.

The DBsize Parameter is optional. The default value is 0, which indicates that the audio decoder buffer size should bebased on the audio buffer model that is selected. If the ATSCbuf Parameter is Yes and the input stream is AC-3, then theATSC model is used. If the DVBbuf Parameter is Yes and the input stream is AC-3, then the DVB buffer model is used. Inall other cases, the MPEG-2 T-STD model is used.

StreamDelay = integer

The StreamDelay Parameter specifies the length of time that the audio elementary stream should be delayed from thebeginning of the program. The units for the value are 90 kHz clock cycles. The value must be an integer between 0 and 1000 000 000. This parameter may be used to achieve lip sync when the various streams were not encoded at the sametime. For example, if this audio stream is leading the video stream, then the StreamDelay Parameter may be used to alignaudio and video. The StreamDelay Parameter is optional. The default value is zero, which indicates that the audioelementary stream should not be delayed.

If PCRs are carried in the audio PID, i.e., there is no video stream in the program, there will not be any PCRs at the

Page 189: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 181

Copyright © 1998 - 2010 Manzanita Systems, Inc.

beginning of the transport stream if the audio stream is delayed by the StreamDelay parameter.

IndDelay = [Yes | No]

The IndDelay Parameter is set to Yes to indicate that the initial delay to be used for this audio stream should beindependent of the other elementary streams in the program.

The IndDelay Parameter is optional. The default is No, which is not to have an independent initial delay.

Delay = integer

The Delay Parameter represents an additional delay that is added to the precomputed delay for the initial access unit in theaudio stream. The units for the value are 90 kHz clock cycles. The value must be a positive or negative integer that rangesfrom -90 000 to 90 000. The initial delay is used as the presentation time stamp (PTS) for the first audio frame. The baseinitial delay for the audio stream can be adjusted with this parameter. Normally all streams within a program are configuredto have their initial PTSs the same. This insures there will be no lip sync problems assuming the source material is aligned.In some cases, it may be necessary to increase the initial delay to overcome an audio underflow early in the stream. TheDelay Parameter is optional and is normally not used. The default value is zero.

Priority = [Yes | No]

The Priority Parameter is set to Yes to indicate that transport packets for this audio elementary stream should be insertedinto the multiplex with minimal jitter. This parameter should not normally be used for an audio stream.

The Priority Parameter is optional. The default value is No, which indicates that a higher priority should not be assigned tothis audio stream.

SBrate = integer

The SBrate Parameter specifies the drain rate of the smoothing buffer for this audio elementary stream. The value mustbe a non-negative integer representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000. If asmoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given.

The SBrate Parameter is optional. The default is 0, which is not to have a smoothing buffer for this audio stream.

SBsize = integer

The SBsize Parameter specifies the size of the smoothing buffer for this audio elementary stream. The value must be anon-negative integer representing the buffer size in bytes. The valid range for the SBsize value is 0 to 1 000 000 000. If asmoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given.

The SBsize Parameter is optional. The default value is 0, which is not to have a smoothing buffer for this audio stream.

SkipFrames = integer

The SkipFrames Parameter specifies the number of audio frames that should be skipped in the beginning of the audioelementary stream. The value must be an integer between 0 and 65 535. This parameter is normally used to achieve lipsync when the audio and video streams were not encoded beginning at the same instant in time. For example, if video isleading audio and the video PID carries the PCR, then the SkipFrames Parameter may be used to advance audio to meetvideo. The SkipFrames Parameter is optional. The default value is zero, which indicates that no audio frames should beskipped.

4.2.4.7 Data Subsection

MP2TSME supports multiplexing of prepacketized data files into the output transport stream. There are no restrictions on thecontents of data files, only that it consists of contiguous 188-byte transport packets that begin with a valid sync byte of 0x47. The transport packets can all be a single PID, or multiple PIDs can be present. Because the data is prepacketized, theMultiplexer performs limited manipulation of the packets as they are inserted into the multiplex.

The prepacketized data can be configured with no program association at the Transport level, or as part of a program at the

Page 190: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0182

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Program level. In the first case, the PIDs used in the data stream would not be referenced in the PSI. Prepacketized DVB SI(Service Information) tables, for example, could be configured at the Transport level. On the other hand, if the prepacketizeddata uses a PID that must appear in a program's Program Map Table (PMT), it should be configured at the Program level.

A Data Subsection is included in the Transport Section to multiplex a prepacketized data stream at the Transport level. Up to64 data streams may be configured for insertion in the Transport Section.

Similarly, a Data Subsection is included in a Program Section to multiplex a prepacketized data stream in the program. Up to 64data streams may be inserted in each configured program.

In both cases, each data stream must be specified in a separate Data Subsection. The Data Subsection Title should be theonly string on the first line of the Data Subsection. It appears as follows:

DataN$

The N in the Data Subsection Title represents a number that uniquely identifies the input data stream at the Transport orProgram level. There may be no spaces in the Title string, and there should be no other characters on the line. The input datastream number is for MP2TSME use only; it is not associated with any MPEG-2 parameter, or with the input filename. Thenumber of the first input data stream at a level must be 1, and the number is incremented for each subsequent input datastream at the same level. For example, if three prepacketized data streams are to be inserted in the first program, then threeSubsections would be configured in the Program1* section with the titles, Data1$, Data2$ and Data3$. The MP2TSME defaultis to not include any prepacketized data streams in the Transport Section, or any Program Subsection.

Data Parameter Assignments are listed following the Data Subsection Title. All Parameter Assignments appearing between theData Subsection Title and the next Section or Subsection Title are considered to be part of the Data Subsection. TheParameter Assignments that appear in a given Data Subsection are specific to the prepacketized data stream that is configuredin the Subsection, i.e., they are not related to any other data streams that are configured in other Data Subsections.

The Rate Parameter and either one File Parameter or a set of FileN Parameters are required in the Table Data Subsection atboth the Transport and Program levels.

At the Program level, if the CreatePMTEntry Parameter for the program is set to Yes, then values must be assigned to the PIDand StreamType Parameters. The Multiplexer will create an entry for the data stream in the program's Program Map Table(PMT) using the specified PID and StreamType values.

At the Transport level, the following Parameter Assignments (shown categorized by functionality) are defined for the DataSubsection:

Input Adaptation Timing

File / FileN FixCC StreamDelay

Rate Priority

Repeat SBrate

SBsize

In addition to the three categories listed above, Data Parameters at the Program level include the additional category shownbelow:

PMT

CreatePMTEntry

PID

ChangePID

StreamType

DescriptorN

The CreatePMTEntry, PID, ChangePID, DescriptorN and StreamType Parameters are not defined for use in a DataSubsection that is in the Transport Section.

The rest of this section describes each Data Parameter in detail.

Page 191: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 183

Copyright © 1998 - 2010 Manzanita Systems, Inc.

File = string

The File Parameter specifies the name of the input prepacketized data stream file. The string value that is entered may bethe full path, relative path, or filename only. If only a filename is given, then MP2TSME will look for the specified filenamein the current directory.

The two-character string %i can be used in the specified name if the input stream is segmented into multiple files that aresequentially named. The %i string represents an integer index that begins with 1. For example, if the input stream iscontiguously segmented into four files named part1.mpg, part2.mpg, part3.mpg, and part4.mpg, the filename used for FileParameter is part%i.mpg. The Multiplexer will look for a sequence of input files in the specified path starting withpart1.mpg, and multiplex them as one continuous audio stream. It will stop multiplexing when it reaches the last file namein the sequence. The first byte of the first file must be the sync byte for the first packet. The remaining files do not have tobegin with a sync byte, however, the multiple input files should make up a continuous transport stream of 188-byte packetswhen they are concatenated.

The input file must be in binary format, and the first byte in the file must be the sync byte for the first packet. The data mustbe contiguous 188-byte transport packets, each one starting with a valid sync byte. The file does not have to contain anintegral number of packets if the data stream is not to be repeated in the output. In this case, MP2TSME will discard anypartial packet appearing at the end of the stream. However, if the Repeat Parameter is set to Yes, then the input file mustcontain an integral number of complete transport packets.

The File Parameter is required in a Data Subsection if the prepacketized data stream is in a single input file.

FileN = string

The FileN Parameter is used if the input prepacketized data stream is segmented into multiple sequential files. Each FileNParameter specifies the name of one of the input files. The string value that is entered may be the full path, relative path,or filename only. If only a filename is given, then MP2TSME will look for the specified filename in the current directory.The Parameter Name is FileN where N is a number that identifies a specific input file. There may be no spaces betweenFile and the file number. The file number is for MP2TSME use only; it is not associated with any MPEG-2 parameter orwith the actual filename. The number of the first input file must be 1, and the number is incremented for each subsequentfile. For example, if the input stream were segmented into three files, the Parameter Names would be File1, File2 andFile3. Each input file must be in binary format. The first byte in the first file must be the sync byte for the first packet. Theremaining files do not have to begin with a sync byte, i.e., the data stream does not have to be segmented on packetboundaries. However, any partial packet at the end of one file must be completed at the beginning of the next file. Thus, ifall of the input files are concatenated together, the resulting data stream is made up of continuous transport streampackets. The last byte of the last input file does not have to be the last byte of a packet if the data stream is not to berepeated in the output. In this case, MP2TSME will discard any partial packet appearing at the end of the last file. However, if the Repeat Parameter is set to Yes, then the last input file must end with a complete transport packet.

A set of FileN Parameters is required in a Data Subsection if the prepacketized data stream is segmented into multipleinput files.

Rate = double

The Rate Parameter is the desired output transport rate in bits per second for this prepacketized data stream. The valuemust be a non-negative number in double format. It may include fractional Hz. The valid range is 100 to 1 000 000 000bps.

MP2TSME will give you an error and will not proceed if you try to run the multiplexer without specifying a valid Ratevalue.

If multiple PIDs are present in the data stream, the value specified for the Rate Parameter is the aggregate rate.

Repeat = [Yes | No]

The Repeat Parameter indicates that the sequence of packets in the input file(s) should be repeated for the entire length ofthe transport multiplex so that the specified rate is maintained. This option is useful when only a small number of packetshave been generated for the input file, and it is desired for the packets to be repeated throughout the transport stream'sduration. For example, three transport packets have been created, each containing one DVB SI table. The RepeatParameter is set to Yes to repeat insertion of these three packets in the output transport stream at the rate specified by theRate Parameter. If the value was instead No, then the three packets would be inserted once each at the specified rate. After all of the packets have been inserted, no data will be multiplexed from the input file for the remainder of the transportmultiplex.

Page 192: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0184

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The Repeat Parameter is optional. The default value is Yes, which indicates that the input data stream should berepeated.

CreatePMTEntry = [Yes | No] (Program Section only)

The CreatePMTEntry Parameter indicates if the Multiplexer should create an entry for this data stream in the program'sProgram Map Table (PMT). If the value is Yes, then the Multiplexer will include an entry in the PMT for this data streamusing the value specified by the PID and StreamType Parameters. If the value is No, then PMT will not include a referenceto this data stream.

The default value is No.

PID = integer (Program Section only)

The PID Parameter specifies the PID value that is should be used to identify this data stream in the program’s PMT. Thevalue must be an integer between 0 and 8190, inclusive (0x0000 and 0x1FFE). The value may be specified in decimal, orif prefaced with a "0x", in hexadecimal. The specified PID value should be the same as the one used in the inputprepacketized data. By default, no entry is made for this data stream in the PMT.

The specified PID value should be the same as the one used in the input prepacketized data. However, if it is not thesame, the ChangePID Parameter may be enabled. In this case, the Multiplexer will substitute the specified PID value forevery PID appearing in the input data stream.

MP2TSME will not verify that the specified PID value is the one that is actually in the prepacketized data stream.

An entry will be made in the PMT for this data stream only if both the PID Parameter and StreamType Parameters arespecified.

ChangePID = [Yes | No] (Program Section only)

The ChangePID Parameter indicates whether the Multiplexer should modify the PID fields in the input prepacketized datastream. If ChangePID is set to Yes, then the Multiplexer will substitute the value specified by the PID Parameter for everyPID appearing in the input data stream. If ChangePID is set to No, then the PIDs in the input stream will not be modified.

The default value is No.

StreamType = integer (Program Section only)

The StreamType Parameter specifies the value that should be used in the stream_type field that identifies this data streamin the PMT. The value should be an integer between zero and 255 (0x00 and 0xFF), inclusive. The value may bespecified in decimal, or if prefaced with a "0x", in hexadecimal. By default, no entry is made for this data stream in thePMT.

An entry will be made in the PMT for this data stream only if both the PID Parameter and StreamType Parameters arespecified.

DescriptorN = byte list (Program Section only)

A DescriptorN Parameter specifies a sequence of data bytes that should be included as descriptor data associated withthis data stream in the PMT. Multiple descriptors may be specified in a single DescriptorN Parameter, although it isrecommended that the data assigned to each DescriptorN Parameter should consist of only one descriptor. Up to 32DescriptorN Parameters may be configured in each Data Subsection. The parameter name is DescriptorN where N is anumber that identifies the parameter. The number of the first DescriptorN Parameter is 1, and the number is incrementedwith each subsequent DescriptorN Parameter that appears in this Data Subsection. For example, if there are threeDescriptorN Parameters, then they would be named Descriptor1, Descriptor2 and Descriptor3. By default, no descriptorsare defined for this data stream.

MP2TSME does not check the validity of the specified descriptor data bytes.

Example:

Descriptor1 = 0D 04 4D414E5A

Page 193: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 185

Copyright © 1998 - 2010 Manzanita Systems, Inc.

FixCC = [Yes | No]

The FixCC Parameter whether that the continuity counter values in the input prepacketized data stream should becorrected when the packets are multiplexed. This option should be used when the Repeat Parameter is set to Yes toinsure that the continuity counter is correct when the packets from the input file are repeated. If multiple PIDs are presentin the input data stream, each associated continuity counter is tracked and corrected individually.

The FixCC Parameter is optional. The default value is Yes, which is to correct continuity counter values in this stream.

The FixCC Parameter will only insure that the continuity counter is correct if the PID is being inserted from a singleinput data stream. If the same PID is also inserted from a prepacketized data stream file that is configured in another DataSubsection, there will be continuity counter errors.

StreamDelay = integer

The StreamDelay Parameter specifies the length of time that the prepacketized data stream should be delayed from thebeginning of the program. The units for the value are 90 kHz clock cycles. The value must be an integer between 0 and 1000 000 000. This delay may be used when the data stream contains time sensitive information that requires alignmentwith other streams.

The StreamDelay Parameter is optional. The default value is 0, which indicates that the data stream should not bedelayed.

Priority = [Yes | No]

The Priority Parameter indicates if this prepacketized data stream should be inserted into the multiplex with minimal jitter. This option should be used if there is time sensitive content in the data stream.

The Priority Parameter is optional. The default value is No, which indicates that a higher priority should not be assigned tothe prepacketized data stream.

SBrate = integer

The SBrate Parameter specifies the drain rate of the smoothing buffer for this prepacketized data stream. The value mustbe a non-negative integer representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000. If asmoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given.

The SBrate Parameter is optional. The default is 0, which is not to have a smoothing buffer for this data stream.

SBsize = integer

The SBsize Parameter specifies the size of the smoothing buffer for this prepacketized data stream. The value must be anon-negative integer representing the buffer size in bytes. The valid range for the SBsize value is 0 to 1 000 000 000. If asmoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given.

The SBsize Parameter is optional. The default value is 0, which is not to have a smoothing buffer for this data stream.

4.2.4.8 Table Data Subsection

MP2TSME can be configured to convey one or more single section tables in a Table Data stream. Such a stream must beassigned a unique PID value in the output transport stream and may not contain any other type of data, e.g., audio or videoelementary streams. There is no limit to the number of tables that can be included in a Table Data stream. The data for eachtable must be encoded as a string of hexadecimal characters.

A Table Data stream can be configured with no program association at the Transport level, or as part of a program at theProgram level. In the first case, the PID assigned to the Table Data stream would not be referenced in the MPEG PSI. TheDVB SDT, BAT and ST, for example, should be configured at the Transport level and assigned to PID 0x0011. On the otherhand, if the tables will be in a PID that must appear in a program's Program Map Table (PMT), it should be configured at theProgram level.

A Table Data Subsection is included in the Transport Section to multiplex a Table Data stream at the Transport level. Up to 64

Page 194: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0186

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Table Data streams may be configured for insertion in the Transport Section.

Similarly, a Table Data Subsection is included in a Program Section to multiplex a Table Data data stream in the program. Upto 64 Table Data streams may be inserted in each configured program.

In both cases, each Table Data stream must be specified in a separate Table Data Subsection. The Table Data SubsectionTitle should be the only string on the first line of the Table Data Subsection. It appears as follows:

TableDataN$

The N in the Table Data Subsection Title is a number that creates a unique identifier for the Table Data stream at the Transportor Program level. There may be no spaces in the Title string, and there should be no other characters on the line. The numberis for MP2TSME use only; it is not associated with any MPEG-2 parameter. The number of the first Table Data stream at a levelmust be 1, and the number is incremented for each subsequent Table Data stream at the same level. For example, if threeTable Data streams to be inserted in the first program, then three Subsections would be configured in the Program1* sectionwith the titles, TableData1$, TableData2$ and TableData3$. The MP2TSME default is to not include any Table Data streams inthe Transport Section, or any Program Subsection.

Table Data Parameter Assignments are listed following the Table Data Subsection Title. All Parameter Assignments appearingbetween the Table Data Subsection Title and the next Section or Subsection Title are considered to be part of the Table DataSubsection. The Parameter Assignments that appear in a given Table Data Subsection are specific to the Table Data streamthat is configured in the Subsection, i.e., they are not related to any other streams that are configured in other Table DataSubsections.

The PID Parameter and at least one TableN Parameter are required in the Table Data Subsection at both the Transport andProgram levels.

At the Program level, if the CreatePMTEntry Parameter for the program is set to Yes, then values must be assigned to the PIDand StreamType Parameters. The Multiplexer will create an entry for the Table Data stream in the program's Program MapTable (PMT) using the specified PID and StreamType values.

At the Transport level, the following Parameter Assignments (shown categorized by functionality) are defined for the Table DataSubsection:

Table Data Transport Adaptation Timing

TableN PID InitDI StreamDelay

TablesPerSecond Pack Priority

Repeat TransportPriority SBrate

SBsize

In addition to the three categories listed above, Table Data Parameters at the Program level include the additional categoryshown below:

PMT

CreatePMTEntry

StreamType

DescriptorN

The CreatePMTEntry, DescriptorN and StreamType Parameters are not defined for use in a Table Data Subsection that is inthe Transport Section.

The rest of this section describes each Table Data Parameter in detail.

TableN = multiline bytelist

A TableN Parameter specifies a sequence of data bytes that encodes a single section table that should be conveyed in thisTable Data stream. The value should be given as a string of hexadecimal characters. Each two-character word isinterpreted as a byte of data. An unlimited number of TableN Parameters may be configured in each Table Data

Page 195: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 187

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Subsection. The parameter name is TableN where N is a number that identifies the parameter. The number of the firstTableN Parameter is 1, and the number is incremented with each subsequent TableN Parameter that appears in this TableData Subsection. For example, if there are three TableN Parameters, then they would be named Table1, Table2 andTable3.

The tables will be sent in the Table Data stream in the order given by the N number, with the first table beingTable1. If the Repeat Parameter is disabled, each table will only be sent one time. If the Repeat Parameter isenabled, the Multiplexer will continue to repeat the tables in the same order over the duration of the transportstream. The rate at which each table is sent is defined by the TablesPerSecond Parameter. Note thatalthough each table is sent at the same rate, by replicating specific tables as multiple TableN Parameters, therelative rates of the tables can be made different. For example, if the two tables, Table A and Table B, are tobe sent in the Table Data stream and it is desired to send Table A twice as frequently as Table B, the TableData Subsection should include the following parameter assignments: Table1 = Table A, Table2 = Table A,Table3 = Table B.

Example:

Table3 = CD F0 11 00 00 C1 00 00 00 00 00 00 00 00 00 00 19 93 13 B9

TablesPerSecond = double

The TablesPerSecond Parameter specifies the total rate at which all tables that are defined in this Table Data streamshould be sent in the transport stream. Note that this rate is the aggregate rate for all tables defined in the Table List. TheTablesPerSecond value should be a non-negative number in double format that represents the repetition rate in tables persecond. The valid range is 0.1 to 1000. The default value is 10.0.

If you set the TablesPerSecond Parameter, then later add more tables, the existing tables will be multiplexed at arelatively lower rate to make room for the additional tables. Therefore, if you wish to have the same insertion rate, you willneed to increase this parameter if you add more tables to this table data stream.

Repeat = [Yes | No]

If the value of the Repeat Parameter is Yes, then the Multiplexer will repeat the sequence of tables defined by the TableNParameters for the entire length of the transport multiplex. Each of the tables will be repeated at the rate specified by theTablesPerSecond Parameter. For example, two DVB SI tables have been specified and the TablesPerSecond Parameteris set to 10.0. If the Repeat Parameter is set to Yes, then the sequence of two tables will be repeated 5 times a second inthe output transport stream at the specified rate. If the value was instead No, then each of the two tables would be insertedone time near the beginning of the stream. The interval between the packets containing the tables will be based on therate specified by the TablesPerSecond Parameter.

The default value is Yes, which indicates that the specified tables should be repeated.

CreatePMTEntry = [Yes | No] (Program Section only)

The CreatePMTEntry Parameter indicates if the Multiplexer should create an entry for this Table Data stream in theprogram's Program Map Table (PMT). If the value is Yes, then the Multiplexer will include an entry in the PMT for thisstream using the value specified by the PID and StreamType Parameters. If the value is No, then the PMT will not includea reference to this stream.

The default value is No.

StreamType = integer (Program Section only)

The StreamType Parameter specifies the value that should be used in the stream_type field that identifies this Table Datastream in the PMT. The value should be an integer between zero and 255 (0x00 and 0xFF), inclusive. The value may bespecified in decimal, or if prefaced with a "0x", in hexadecimal. By default, no entry is made for this stream in the PMT.

An entry will be made in the PMT for this data stream only if both the PID Parameter and StreamType Parameters arespecified.

DescriptorN = byte list (Program Section only)

Page 196: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0188

Copyright © 1998 - 2010 Manzanita Systems, Inc.

A DescriptorN Parameter specifies a sequence of data bytes that should be included as descriptor data associated withthis Table Data stream in the PMT. Multiple descriptors may be specified in a single DescriptorN Parameter, although it isrecommended that the data assigned to each DescriptorN Parameter should consist of only one descriptor. Up to 32DescriptorN Parameters may be configured in each Table Data Subsection. The parameter name is DescriptorN where Nis a number that identifies the parameter. The number of the first DescriptorN Parameter is 1, and the number isincremented with each subsequent DescriptorN Parameter that appears in this Table Data Subsection. For example, ifthere are three DescriptorN Parameters, then they would be named Descriptor1, Descriptor2 and Descriptor3. By default,no descriptors are defined for this Table Data stream.

MP2TSME does not check the validity of the specified descriptor data bytes.

Example:

Descriptor1 = 0D 04 4D414E5A

PID = integer

The PID Parameter specifies the PID value used for transport packets that carry this table data stream. If the table datastream is at the program level, then the PID is also identified in the PMT as the stream's elementary_PID. If theCreatePMTEntry Parameter is set to Yes, the PID value can be set to any integer between 0 and 8190 (0x1FFE),inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

The first three table data streams (TableData1 to TableData3) in programs with ProgramNumber values 2 through 401 areassigned default PID values using the algorithm of 16 * ProgramNumber + 12 + N, where N is the number that identifiesthe table data stream in the program. For example, the PID for the second table data stream (TableData2) in a programwith a ProgramNumber of 3 would be assigned the default value of 16 * 3 + 12 + 2 = 61 (0x003E). Any table data streamsinserted in a program after TableData3 will be assigned the first available PID value between 6432 and 8190 (0x1920 and0x1FFE), inclusive. Similarly, all table data streams inserted in programs with a ProgramNumber value greater than 401will be assigned the first available value in this upper range.

If the Table Data is inserted at the transport level, then it will be assigned the first available PID value in the range 6432through 8190 (0x1920 and 0x1FFE), inclusive.

Pack = [Yes | No]

The Pack Parameter defines the method that the Multiplexer uses to convey the tables that are defined for this Table Datastream. When there are multiple TableN Parameters specified, the Multiplexer can begin each table in a new transportpacket, or it can pack the sequence of tables in contiguous packet payload bytes. In the first case, the remaining payloadafter each table will be filled with stuffing bytes to complete the packet payload. In the second case, stuffing bytes will beused to fill the payload of the last packet after the data for all tables in the list have been packed contiguously in packets. Ifthe Repeat Parameter is set to Yes, the sequence of tables will always begin at the start of a packet payload when it isrepeated.

If the Pack value is set to No, then the Multiplexer will use the first method and will start each table at the beginning of apacket payload.

If the value is Yes, then the specified tables will be conveyed as contiguous packet payload bytes in the order that they arelisted. The first table that is listed will always start at the beginning of a packet payload.

The default value is No.

TransportPriority = [Yes | No]

The TransportPriority Parameter determines the value of the transport_priority bit that appears in all transport packets forthis Table Data stream. If the TransportPriority value is Yes, then all transport_priority bits are set to one.

The TransportPriority Parameter is optional. The default is No, which indicates that the transport_priority bit should have avalue of zero in all packets for this Table Data stream.

InitDI = [Yes | No]

The InitDI Parameter indicates if the first transport packet carrying this Table Data stream should contain adiscontinuity_indicator with the value of 1. If the InitDI value is Yes, then the discontinuity_indicator is set in the initialpacket. The InitDI Parameter is optional. The default value is No, which is not to set the discontinuity_indicator in the firstTable Data packet.

Page 197: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 189

Copyright © 1998 - 2010 Manzanita Systems, Inc.

StreamDelay = integer

The StreamDelay Parameter specifies the length of time that this Table Data stream should be delayed from the beginningof the program. The units for the value are 90 kHz clock cycles. The value must be an integer between 0 and 2 000 000000. This parameter may be used to accurately position the tables within the output stream. The default value for theStreamDelay parameter is 0, which is not to delay insertion of this stream. Example:

StreamDelay = 300

Priority = [Yes | No]

The Priority Parameter indicates if this Table Data stream should be inserted into the multiplex with minimal jitter. Thisoption should be used if there is time sensitive content in the stream.

The Priority Parameter is optional. The default value is No, which indicates that a higher priority should not be assigned tothe Table Data stream.

SBrate = integer

The SBrate Parameter specifies the drain rate of the smoothing buffer for this Table Data stream. The value must be anon-negative integer representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000. If a smoothingbuffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given.

The SBrate Parameter is optional. The default is 0, which is not to have a smoothing buffer for this Table Data stream.

SBsize = integer

The SBsize Parameter specifies the size of the smoothing buffer for this Table Data stream. The value must be anon-negative integer representing the buffer size in bytes. The valid range for the SBsize value is 0 to 1 000 000 000. If asmoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given.

The SBsize Parameter is optional. The default value is 0, which is not to have a smoothing buffer for this Table Datastream.

4.2.4.9 SMPTE 302M Subsection

The SMPTE 302M standard specifies the transport of linear PCM digital audio in MPEG-2 transport streams. MP2TSME allowsyou to configure up to 16 SMPTE 302M elementary streams in each program. By definition, each SMPTE 302M elementarystream may convey 2, 4, 6, or 8 channels, each pair of which are derived from a two-channel data source like an AES3 stream,PCM data, or other digital audio data like Dolby-E.

The SMPTE 302M Subsection is included in a Program Section to configure a SMPTE 302M elementary stream carrying up to 8channels as part of the program. Each SMPTE 302M stream must be specified in a separate SMPTE 302M Subsection, andmust be assigned a unique PID in the transport stream.

If more than 8 channels are required, a second SMPTE 302M elementary stream must be configured in the same program tocarry the additional channels. A channel_identification field in the SMPTE 302M header is used to indicate the channel numberof the first channel in the SMPTE 302M elementary stream. This field is specified in the SMPTE 302M Subsection with theChannelID Parameter.

The first line of the SMPTE 302M Subsection must be the SMPTE 302M Subsection Title. It appears as follows:

SMPTE302N$

The N in the SMPTE 302M Subsection Title represents a number that identifies the input SMPTE 302M elementary stream.There may be no spaces in the Title string, and there should be no other characters on the line. The input SMPTE 302Mstream number is for MP2TSME use only; it is not associated with any MPEG-2 parameter, or with the input filename. Thenumber of the first input SMPTE 302M stream must be 1, and the number is incremented for each subsequent input SMPTE302M stream. For example, if there are three SMPTE 302M streams to be multiplexed in the program, then three Subsectionswould be configured with the titles SMPTE302M1$, SMPTE302M2$ and SMPTE302M3$. The MP2TSME default is to notinclude any SMPTE302M streams in a Program Section.

Page 198: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0190

Copyright © 1998 - 2010 Manzanita Systems, Inc.

SMPTE 302M Parameter Assignments are listed following the SMPTE 302M Subsection Title. All Parameter Assignmentsappearing between the SMPTE 302M Subsection Title and the next Section or Subsection Title are considered to be part of theSMPTE 302M Subsection. The Parameter Assignments that appear in a given SMPTE 302M Subsection are specific to theSMPTE 302M stream that is configured in the Subsection, i.e., they are not related to any other SMPTE 302M streams that areconfigured in other SMPTE 302M Subsections.

The following Parameter Assignments (shown categorized by functionality) are defined for the SMPTE 302M Subsection:

Input Remultiplex PMT Transport

StreamN SourceTSPID StreamType PID

StreamMFileN DescFromData DescriptorN TransportPriority

ChannelStatusN AVSync

CSdataN

Rate

RefVideoPID

Adaptation PES Timing Source

InitDI PEScopyrt DBsize ChannelID

RAI PESid StreamDelay Validity

stream_id_extension Delay BitReversed

PESpri Priority ByteReversed

PESorig SBrate BytesPerWord

SBsize MSjustified

WordSize

The rest of this section describes each SMPTE 302M Parameter in detail.

StreamM = string

The StreamM Parameter specifies the name of one input two-channel data stream file. The M in the parameter namerepresents a number that uniquely identifies the input file, and is assigned sequentially starting with 1. The M numbercorresponds to the AES3 stream number in the SMPTE 302M specification.

The string value that is assigned to the StreamM Parameter may be the full path, relative path, or filename only. If only afilename is given, then MP2TSME will look for the specified filename in the current directory. The input file must betwo-channel digital audio data. It can be an AES3 stream, PCM data, or other digital audio data like Dolby-E. Thesampling resolution may be 16, 20, or 24 bits per sample. All channels in a SMPTE 302M elementary stream must havethe same sampling resolution. The sampling frequency for all channels must be 48 kHz. The file should begin with thefirst valid data word. Any header should be removed prior to multiplexing. An example of a PCM file with a header is aWindows WAV file. The WAV header must be removed prior to multiplexing the PCM data in the file.

There may be up to four input streams, or a total of eight channels in each SMPTE 302M stream. Stream1 will containchannels 1 and 2, Stream2 will contain channels 3 and 4, etc.

The input file may also be a transport stream that contains a SMPTE302M stream to be remultiplexed. The SMPTE302Mstream may only consist of one two-channel AES3 or PCM data stream. Remultiplexing of SMPTE302M streams carryingmultiple two-channel data streams is not supported. If a SMPTE302M stream is to be remultiplexed from an input transportstream, the appropriate Remultiplex Parameters must also be specified.

The two-character string %i can be used in the specified name if the input stream is segmented into multiple files that aresequentially named. The %i string represents an integer index that begins with 1. For example, if the input stream iscontiguously segmented into four files named part1.pcm, part2.pcm, part3.pcm, and part4.pcm, the filename used for FilesParameter is part%i.pcm. The Multiplexer will look for a sequence of input files in the specified path starting withpart1.pcm, and multiplex them as one continuous stream. It will stop multiplexing when it reaches the last file name in thesequence. The first byte of the first file must be the first byte of the first word of payload. The remaining files do not have tobegin with the first byte of a word, i.e., the input stream does not have to segmented on access unit boundaries. However,the multiple input files should make up a continuous stream when they are concatenated.

The file should begin with the first valid data word. Any header should be removed prior to multiplexing. An example of a

Page 199: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 191

Copyright © 1998 - 2010 Manzanita Systems, Inc.

PCM file with a header is a Windows WAV file. The WAV header must be removed prior to multiplexing the PCM data inthe file.

Either the StreamM Parameter or multiple StreamMFileN Parameters are required in a SMPTE302M Subsection.

StreamMFileN = string

The StreamMFileN Parameter is used if the input two-channel data stream is segmented into multiple sequential files.Each StreamMFileN Parameter specifies the name of one of the files. The string value that is assigned to the StreamMFileN Parameter may be the full path, relative path, or filename only. If only a filename is given, then MP2TSME will lookfor the specified filename in the current directory. The Parameter Name is StreamMFileN where M is a number thatidentifies the input stream and N is a number that identifies a specific input file. The input stream number, M, correspondsto the AES3 stream number in the SMPTE 302M specification. The file number is for MP2TSME use only; it is notassociated with any MPEG-2 parameter or with the actual filename. The number of the first input file must be 1, and thenumber is incremented for each subsequent file. For example, if the first AES3 stream is segmented into three files, theParameter Names are Stream1File1, Stream1File2 and Stream1File3.

The input must be two-channel digital audio data. It can be an AES3 stream, PCM data, or other digital audio data likeDolby-E. The sampling resolution may be 16, 20, or 24 bits per sample. All channels in a SMPTE 302M elementarystream must have the same sampling resolution. The sampling frequency for all channels must be 48 kHz. The file shouldbegin with the first valid data word. Any header should be removed prior to multiplexing. An example of a PCM file with aheader is a Windows WAV file. The WAV header must be removed prior to multiplexing the PCM data in the file.

The first byte of the first input file should be the first byte of the first word of payload. The remaining files do not have tobegin with the first byte of a payload word, i.e., the data stream does not have to be segmented on word or frameboundaries. However, the multiple input files should make up a continuous data stream when they are concatenated.

A set of StreamMFileN Parameters is required in an SMPTE302M Subsection if the input data stream is segmented intomultiple input files.

ChannelStatusN = [PCM | DATA | USER]

The ChannelStatusN Parameter specifies the type of channel status information to use for the Nth channel. There shouldbe two ChannelStatusN Parameters for each two-channel input stream. The first input stream will have ChannelStatusNParameters with N equal to 1 and 2, the second will use 3 and 4, etc.

A ChannelStatusN Parameter may be set to PCM, DATA or USER. If PCM is selected, then MP2TSME will use thepre-defined value of 0x810000…0000D9 for the 24 byte channel status sequence. If DATA is selected, the channel statussequence will be set to 0xC10000…000077. This value should be used for non-PCM data, for example, Dolby-E audio. If USER is selected, user defined channel status must be provided with the CSdataN Parameter.

The ChannelStatusN Parameter is optional. The default value is PCM, which indicates the channel status data should beset to 0x810000…0000D9.

CSdataN = bytelist

The CSdataN Parameter specifies the 24 byte channel status sequence to for the Nth channel of this SMPTE 302Mstream. The data should be entered as a string of 48 hexadecimal characters with no "0x" prefix.

The CSdataN parameter is required only if the ChannelStatusN parameter is set to User.

Example:

CSdata2 = 8100000000000000000000000000000000000000000000D9

Rate = double

The Rate Parameter specifies the maximum rate in bits per second that should be used for this SMPTE 302M stream. Thevalue must be a non-negative number in double format. It may include fractional Hz. The valid range is 1 to 60 000 000bps.

The Rate Parameter is optional. By default, the value is computed based on the 48 Ksps rate, the number of AES3streams in this elementary stream and the word size. This parameter should not normally be used.

MP2TSM will continue to protect the decoder FIFO in spite of a higher than appropriate rate. However, using a lowerrate will result in decoder buffer underflow. MP2TSM can not prevent this from happening.

Page 200: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0192

Copyright © 1998 - 2010 Manzanita Systems, Inc.

RefVideoPID = integer

The RefVideoPID Parameter specifies the reference video PID for this SMPTE 302M stream. The value must be aninteger between 16 and 8190 (0x0010 and 0x1FFE), inclusive. The reference video stream will be used for time stamps forthis SMPTE 302M stream.

The RefVideoPID Parameter is required in the SMPTE 302M Subsection.

SourceTSPID = integer

The SourceTSPID Parameter specifies the PID that carries the source SMPTE302M stream when the input file is anMPEG-2 transport stream. The Multiplexer will extract the SMPTE302M stream associated with the specified PID from theinput transport stream file, and remultiplex it in the output transport stream. The valid range for the SourceTSPID value is1 to 8190 (0x0001 and 0x1FFE), inclusive. The value may be specified in decimal, or if prefaced with a "0x", inhexadecimal.

The SourceTSPID Parameter is required if the source SMPTE302M stream is to be remultiplexed from an input transportstream file.

The SMPTE302M stream to be remultiplexed may only consist of one two-channel AES3 or PCM data stream.Remultiplexing of SMPTE302M streams carrying multiple two-channel data streams is not supported.

DescFromData = [Yes | No]

The DescFromData Parameter is only meaningful if the SMPTE 302M stream is being remultiplexed from a transportstream. If DescFromData is set to Yes, the Multiplexer will extract any descriptors that are associated with the SMPTE302M stream in the input transport stream, and insert them in the appropriate output PMT, maintaining their associationwith the remultiplexed stream. If DescFromData is set to No, the Multiplexer will ignore any descriptors that pertain to the SMPTE 302M stream in the input transport stream.

The DescFromData Parameter is optional. The default value is No.

If DescFromData is enabled, it will override any descriptor data defined by the DescriptorN Parameter in theconfiguration for the SMPTE 302M stream. That is, the descriptors defined by the DescriptorN Parameter will be ignoredand only descriptors extracted from the input transport stream that pertain to the SMPTE 302M stream will be inserted inthe output PMT.

AVSync = [Yes | No]

The AVSync Parameter is only valid if multiple transport streams are being remultiplexed. If the AVSync Parameter is setto Yes, the audio-video synchronization is maintained across the file transitions. This allows existing transport streams tobe remultiplexed with the lip synch maintained in the new file. This feature is useful for creating longer streams fromtrailers or multiple segments and also for remultiplexing existing transport streams to correct PSI issues or multiplexingproblems.

To be effective, the AVSync Parameter must be set to Yes in both the Video and SMPTE302M configurations that havethe same input transport stream.

StreamType = integer

The StreamType Parameter specifies the value used in the stream_type field that identifies the SMPTE 302M stream in thePMT. The value must be an integer between 0 and 255 (0x00 and 0xFF), inclusive. The StreamType Parameter isoptional. By default, the Multiplexer will assign a default value of 0x06 to stream_type, indicating private data. If theStreamType value is set to 0, then the default value will be used.

DescriptorN = byte list

A DescriptorN Parameter specifies a sequence of data bytes that should be included as descriptor data associated withthis SMPTE 302M stream in the PMT. Multiple descriptors may be specified in a single DescriptorN Parameter, although itis recommended that the data assigned to each DescriptorN Parameter should consist of only one descriptor. Up to 32DescriptorN Parameters may be configured in each SMPTE 302M Subsection. The parameter name is DescriptorN where

Page 201: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 193

Copyright © 1998 - 2010 Manzanita Systems, Inc.

N is a number that identifies the parameter. The number of the first DescriptorN Parameter is 1, and the number isincremented with each subsequent DescriptorN Parameter that appears in this SMPTE 302MSubsection. For example, ifthere are three DescriptorN Parameters, then they would be named Descriptor1, Descriptor2 and Descriptor3. By default,no descriptors are defined for this SMPTE 302M stream.

MP2TSME does not check the validity of the specified descriptor data bytes.

Example:

Descriptor1 = 0A 04 656E67 02

PID = integer

The PID Parameter specifies the PID value used for transport packets that carry this SMPTE 302M stream. This PID isalso identified in the PMT as the stream's elementary_PID. The PID value can be set to any integer between 16 and 8190(0x0010 and 0x1FFE), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal. Bydefault, the stream will be assigned the next available audio PID in the program.

TransportPriority = [Yes | No]

The TransportPriority Parameter determines the value of the transport_priority bit that appears in all transport packets forthis SMPTE 302M stream. If the TransportPriority value is Yes, then all transport_priority bits are set to one.

The TransportPriority Parameter is optional. The default is No, which indicates that the transport_priority bit should have avalue of zero in all packets for this SMPTE 302M stream.

InitDI = [Yes | No]

The InitDI Parameter indicates if the first transport packet carrying this SMPTE 302M stream should contain adiscontinuity_indicator with the value of 1. If it is set to Yes, then the discontinuity_indicator will be set in the initial SMPTE302M packet. If it is set to No, no discontinuity will be indicated in the first packet. The default value is No.

RAI = [Yes | No]

The RAI Parameter is set to Yes if the random_access_indicator flag should have the value of one in every transportpacket for this SMPTE 302M stream that contains a PES header with a PTS. If the SMPTE 302M PID is also thePCR PID, then a PCR will also be inserted in this packet. The default value is No.

PEScopyrt = [Yes | No]

The PEScopyrt Parameter indicates the state of the copyright field that appears in all PES headers for the SMPTE 302Mstream. If the value is Yes, then the copyright field will be set to a value of 1. The PEScopyrt Parameter is optional. Thedefault is No, which is to assign the copyright field a value of 0.

PESid = integer

The PESid Parameter specifies the value for the stream_id field in PES packets that carry this SMPTE 302M stream. If the Auto box is checked, then the Multiplexer will automatically assign a value of 0xBD (private_stream_1) as specified by the

SMPTE standard. If the Auto box is unchecked, then the accompanying textbox will be enabled to allow entry of a value.The value should be a non-negative integer that ranges from 0 through 255 (0xFF), inclusive. The value may be specifiedin decimal, or if prefaced with a "0x", in hexadecimal. Setting the StreamType value to 0 is equivalent to checking the Autobox. By default, the Auto box is checked.

stream_id_extension = integer

The stream_id_extension Parameter should only be specified if the PESid Parameter has the value 0xFD. This parameterspecifies the value for the stream_id_extension field, when present, in PES packets that carry this SMPTE 302M stream. The stream_id_extension field will only be encoded in the PES header if the stream_id has the value 0xFD. In other words,if the PESid Parameter is set to 0xFD, the Multiplexer will use the value specified for the stream_id_extension Parameteras the value of the PES stream_id_extension. If a value other than 0xFD is assigned to the PESid Parameter, then the

Page 202: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0194

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Multiplexer ignores the stream_id_extension Parameter. The value must be an integer between 0 and 127 (0x00 and0x7F), inclusive.

PESpri = [Yes | No]

The PESpri Parameter indicates the state of the PES_priority field that appears in all PES headers for this SMPTE 302Mstream. If the value is Yes, then the PES_priority field in all PES headers will be set to one.

The PESpri Parameter is optional. The default is No, which indicates that the PES_priority is set to zero.

PESorig = [Yes | No]

The PESorig Parameter indicates the state of the original_or_copy field that appears in all PES headers for this SMPTE302M stream. If the value is Yes, then the original_or_copy field in all PES headers will be set to a value of one.

The PESorig Parameter is optional. The default is No, which is to assign the original_or_copy field a value of zero.

DBsize = integer

The DBsize Parameter specifies the size of the decoder buffer for this stream. The value must be a non-zero positiveinteger that represents the buffer size in bytes. The valid range is 0 to 1 000 000 000.

The DBsize Parameter is optional. The default value is zero, which indicates that the decoder buffer size should be basedon the SMPTE 302M specification. This size is 65 024 bytes.

StreamDelay = integer

The StreamDelay Parameter specifies the length of time that this SMPTE 302M stream should be delayed from thebeginning of the program. The units for the value are 90 kHz clock cycles. The value must be an integer between 0 and 2000 000 000. This parameter may be used to achieve lip sync when the various streams were not encoded at the sametime. The default value for the StreamDelay parameter is 0, which is not to delay insertion of this stream.

Delay = integer

The Delay Parameter represents an additional delay that is added to the precomputed initial delay for the first access unitin this SMPTE 302 M stream. The units for the value are 90 kHz clock cycles. The value must be a positive or negativeinteger that ranges from -90 000 to 90 000. The initial delay is used as the presentation time stamp (PTS) for the first PESpacket. SMPTE 302M streams have their base initial delay set to match the reference video stream. The base initial delaycan be adjusted with this parameter. The SMPTE specification requires that the SMPTE data have the same PTS valuesas the corresponding video access units. Therefore this parameter should not be used unless an illegal stream is desired. The default value for the Delay Parameter is zero.

Priority = [Yes | No]

The Priority Parameter indicates if this SMPTE 302M stream should be inserted into the multiplex with minimal jitter. Thisoption should be used if there is time sensitive content in the data stream.

The Priority Parameter is optional. The default value is No, which indicates that a higher priority should not be assigned tothe SMPTE 302M stream.

SBrate = integer

The SBrate Parameter specifies the drain rate of the smoothing buffer for this SMPTE 302M stream. The value must be anon-negative integer representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000. If a smoothingbuffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given.

The SBrate Parameter is optional. The default is 0, which is not to have a smoothing buffer for this SMPTE 302M stream.

SBsize = integer

The SBsize Parameter specifies the size of the smoothing buffer for this SMPTE 302M stream. The value must be a

Page 203: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 195

Copyright © 1998 - 2010 Manzanita Systems, Inc.

non-negative integer representing the buffer size in bytes. The valid range for the SBsize value is 0 to 1 000 000 000. If asmoothing buffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given.

The SBsize Parameter is optional. The default value is 0, which is not to have a smoothing buffer for this SMPTE 302Mstream.

ChannelID = integer

The ChannelID Parameter specifies the channel_identification field in the SMPTE 302M header. The value should be adecimal non-negative integer in the range 0x00 to 0xFF (0 to 255), inclusive. This parameter is normally used when morethan four AES3 streams, or eight channels, are desired, in which case the additional channels must be carried in aseparately configured SMPTE 302M stream. The channel_identification is the channel number of the first channel in thisSMPTE 302M stream.

The default value is zero, which indicates this is either the first or only set of AES3 streams.

Validity = [Yes | No]

The Validity Parameter determines the value of the Validity bit in each subframe of this SMPTE 302M stream. If theValidity Parameter is set to Yes, then the Validity bit will have a value of one.

The default value is No, or set the Validity bit to zero.

BitReversed = [Yes | No]

The BitReversed Parameter indicates if the AES3 data is in bit reversed order. Bit reversed data will have the leastsignificant bit in the highest position of the word. If the data is bit reversed, the entire sample word is reversed. If only thebits in each byte of the sample word are reversed, then both BitReversed and ByteReversed should be active.

The default value is No, which indicates that the input data is not in bit reversed order.

ByteReversed = [Yes | No]

The ByteReversed Parameter indicates if the AES3 data words are in byte reversed order. Byte reversed data will havethe least significant byte in the highest or first position.

The default value is No, which indicates that the input data is not in byte reversed order.

BytesPerWord = integer

The BytesPerWord Parameter indicates how many bytes are in the source file for each AES3 word. There may be from 1to 4 bytes per source word. Note that if the source word is smaller than the WordSize Parameter value, then the additionalrequired bits will be set to zero.

The default value is 3, which indicates that there are three bytes per input data word.

MSjustified = [Yes | No]

The MSjustified Parameter indicates how the input data is positioned within the input data bytes. The data sample may befrom 16 to 24 bits, while the input data word may be from 1 to 4 bytes. The data may be either positioned in the upper bitsof the data (MSjustified = Yes), or in the least significant bits (MSjustified = No). Note that if the WordSize is larger thanthe BytesPerWord in bits, then MSjustified is ignored.

The default is No, which indicates that the data bits are in the least significant bit positions of the input word.

WordSize = [16 | 20 | 24]

The WordSize Parameter specifies the number of bits in each AES3 data word. The allowable values are 16, 20 or 24 bitsper word.

The default value is 24 bits per word.

Page 204: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0196

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.2.4.10 Private Stream Subsection

The Private Stream Subsection is included in a Program Section to configure a Private Stream, e.g., DVB subtitles or teletext,as part of the program. Up to 16 Private Streams may be configured in a each program. Each data stream must be specified ina separate Private Stream Subsection.

The Private Stream Subsection Title should be the only string on the first line of the Private Stream Subsection. It appears asfollows:

PrivateStream1DataN$

The N in the Private Stream Subsection Title represents a number that identifies the input data stream. There may be nospaces in the Title string, and there should be no other characters on the line. The input data stream number is for MP2TSMEuse only; it is not associated with any MPEG-2 parameter, or with the input filename. The number of the first input PrivateStream must be 1, and the number is incremented for each subsequent input data stream. For example, if there are threePrivate Stream data streams to be multiplexed in the program, then three Subsections would be configured with the titlesPrivateStream1Data1$, PrivateStream1Data2$ and PrivateStream1Data3$. The MP2TSME default is to not include any PrivateStreams in a Program Section.

Private Stream Parameter Assignments are listed following the Private Stream Subsection Title. All Parameter Assignmentsappearing between the Private Stream Subsection Title and the next Section or Subsection Title are considered to be part ofthe Private Stream Subsection. The Parameter Assignments that appear in a given Private Stream Subsection are specific tothe Private Stream that is configured in the Subsection, i.e., they are not related to any other Private Stream data streams thatare configured in other Private Stream Subsections.

The File Parameter or a set of FileN Parameters is required in the Private Stream Subsection to identify the input file or files.The File Parameter is used when only a single input file is used. A set of FileN Parameters is used when the source stream issegmented into multiple input files.

MP2TSME supports two types of Private Streams:

· private_stream_1 - Streams that carry data that must be synchronized to the video stream in the program, like DVBsubtitles and ITU-R System B Teletext, are generally assigned a PES stream_ID of 0xBD, or "private_stream_1". ThePES headers for private_stream_1 may contain time stamps (PTS/DTS) and extra information such as the copyrightfield.

· private_stream_2 - Asynchronous data streams, like KLV (Key Length Value) data, may also be associated with aprogram and multiplexed in PES packets. These streams are typically identified with a PES stream_ID of 0xBF, or"private_stream_2". The PES headers for private_stream_2 only contain the stream_ID and a length field, and can carryno time stamps.

All other Private Stream configuration parameters are assigned default values by MP2TSME if they are not explicitly specified inthe Private Stream Subsection.

The Private Stream parameters are divided into seven functional categories as listed below:

Input Remultiplex PMT Transport

File / FileN SourceTSPID StreamType PID

Rate DescFromData DescFromFile TransportPriority

DataOnly DescriptorN

FrameSize

Adaptation PES Timing

InitDI PEScopyrt DBsize

RAI PESid StreamDelay

PESpri Priority

Page 205: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 197

Copyright © 1998 - 2010 Manzanita Systems, Inc.

PESorig SBrate

SBsize

TimeOffset

TimestampRatio

AdvanceTime

SyncVideoTC

AdjustStart

NoVideoBase

The rest of this section describes each Private Stream Parameter in detail.

File = string

The File Parameter specifies the name of the input file. The string value that is entered may be the full path, relative path,or filename only. If only a filename is given, then MP2TSME will look for the specified filename in the current directory.

The input data for a Private Stream can be provided to the Multiplexer in four different ways:

· Data only - The input file is the binary data that will be the payload of the Private Stream PES packets. In this case,the DataOnly Parameter must be set to Yes, the FrameSize Parameter must be specified, and the Rate Parametermust be assigned a value, i.e., the Auto setting cannot be used.

· Index and data in one file - The input file is a Private Stream Data file that uses a specific format defined byManzanita Systems. The file includes PES packet information, lengths, and timing in an XML "index", followed by thebinary payload data. In this case, the DataOnly Parameter must be set to No.

· Index and data in separate files - Instead of a combined index-data file, the text-readable index and the binarypayload data can be provided as two separate files. Both files must be located in the same directory. The index filemust be specified as the input file, i.e., assigned to the Files Parameter. In this case, the DataOnly Parameter mustbe set to No.

· Multiplexed data stream - The input stream, e.g., DVB subtitle data, is multiplexed in an existing transport stream. In this case, the appropriate Remultiplex Parameters must also be specified, and the transport stream file must be specified as the input file using the Files Parameter. Only private_stream_1 can be remultiplexed.

The two-character string %i can be used in the specified name if the input data is segmented into multiple files that aresequentially named. The %i string represents an integer index that begins with 1. For example, if the input stream iscontiguously segmented into four files named part1.mpg, part2.mpg, part3.mpg, and part4.mpg, the filename used for FileParameter is part%i.mpg. The Multiplexer will look for a sequence of input files in the specified path starting withpart1.mpg, and multiplex them as one continuous Private Stream. It will stop multiplexing when it reaches the last filename in the sequence.

The File Parameter is required in a Private Stream Subsection if the data is in a single input file.

FileN = string

The FileN Parameter is used if the input Private Stream data is segmented into multiple sequential files. Each FileNParameter specifies the name of one of the input files. The string value that is entered may be the full path, relative path,or filename only. If only a filename is given, then MP2TSME will look for the specified filename in the current directory.The Parameter Name is FileN where N is a number that identifies a specific input file. There may be no spaces betweenFile and the file number. The file number is for MP2TSME use only; it is not associated with any MPEG-2 parameter orwith the actual filename. The number of the first input file must be 1, and the number is incremented for each subsequentfile. For example, if the input stream were segmented into three files, the Parameter Names would be File1, File2 andFile3.

The input files for a Private Stream must be in a specific format that is defined by Manzanita Systems, or may be atransport stream that contains the DVB subtitle or teletext stream to be remultiplexed. In the second case, the appropriatevalue for the SourceTSPID Parameter must also be specified.

A set of FileN Parameters is required in a Private Stream Subsection if the input data is segmented into multiple input files.

Page 206: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0198

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Rate = double

The Rate Parameter determines the maximum rate in bits per second that should be used for the Private Stream datawhen it is multiplexed. The value must be a non-negative number in double format. It may include fractional Hz. Thevalid range is 100 to 60 000 000 bps.

If the value is set to 0, then the Multiplexer will use a maximum rate of 192 kbps for Standard Definition (SD) DVB subtitlesand 400 kbps for High Definition (HD) DVB subtitles. For other types of data, e.g., teletext, the Multiplexer will examine thefirst 100 packets of data and use the highest rate that was computed.

If the DataOnly Parameter is set to Yes, then the Rate parameter must be assigned a non-zero value. This rate willdetermine the spacing of the PES packets in time. A higher rate results in packets that are spaced further apart.

The Rate Parameter is optional. The default value is 0.

Private Streams that are identified as private_stream_1 are packaged in access units that are each time-stamped witha presentation time to synchronize with the video and audio elementary streams. The Multiplexer will multiplex eachPrivate Stream access unit at the rate indicated by the Rate parameter as necessary to maintain timing with video andaudio. However, because of the nature of subtitles and teletext, there may be a period when there is no data. In thiscase, the Private Stream PID will be absent from the output transport stream until it is time to transport the next accessunit.

DataOnly = [Yes | No]

The DataOnly Parameter indicates the format of the input file specified by the Files Parameter. If DataOnly is No, then thefile is in a specific format defined by Manzanita Systems referred to in this document as a Private Stream Data file. Thisfile consists of the binary data preceded by an XML document that defines the PES packet sizes and presentation times tobe used when the stream is packetized. If DataOnly is set to Yes, then the input file is only the binary data. In this case,the FrameSize Parameter must be specified, and the Rate Parameter must be assigned a non-zero value.

If DataOnly is Yes, the Multiplexer will use the PESid Parameter to determine if the data should be multiplexed asprivate_stream_1 or private_stream_2.

If DataOnly is Yes, then all Private Stream PES packets will be the same length as specified by the FrameSizeParameter.

FrameSize = integer

The FrameSize Parameter should only be used if the DataOnly Parameter is set to Yes. FrameSize specifies the size inbytes of the PES packet payload for the stream. The valid range for the FrameSize value is 0 to 100 000. FrameSize hasno effect if DataOnly is No.

If DataOnly is Yes, then all Private Stream PES packets will be the same length as specified by the FrameSizeParameter.

SourceTSPID = integer

The SourceTSPID Parameter specifies the PID that carries the source DVB subtitle or teletext data when the input file is anMPEG-2 transport stream. The Multiplexer will extract the data associated with the specified PID from the input transportstream file, and remultiplex it in the output transport stream. The valid range for the SourceTSPID value is 1 to 8190(0x0001 and 0x1FFE), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

The SourceTSPID Parameter is required if the source of the Private Stream is to be remultiplexed from an input transportstream file.

Only private_stream_1 can be remultiplexed.

DescFromData = [Yes | No]

The DescFromData Parameter is only meaningful if the Private Stream is being remultiplexed from a transport stream. IfDescFromData is set to Yes, the Multiplexer will extract any descriptors that are associated with the Private Stream in theinput transport stream, and insert them in the appropriate output PMT, maintaining their association with the remultiplexed

Page 207: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 199

Copyright © 1998 - 2010 Manzanita Systems, Inc.

stream. If DescFromData is set to No, the Multiplexer will ignore any descriptors that pertain to the Private Stream in theinput transport stream.

The DescFromData Parameter is optional. The default value is No.

If DescFromData is enabled, it will override any descriptor data defined by the DescriptorN Parameter in theconfiguration for the Private Stream. That is, the descriptors defined by the DescriptorN Parameter will be ignored and onlydescriptors extracted from the input transport stream that pertain to the Private Stream will be inserted in the output PMT.

StreamType = integer

The StreamType Parameter specifies the value that should be used in the stream_type field that identifies this PrivateStream in the PMT. The value should be an integer between zero and 255 (0x00 and 0xFF), inclusive. The value may bespecified in decimal, or if prefaced with a "0x", in hexadecimal. By default, the Multiplexer will use a value of 0x06, or "PESpackets containing private data".

DescFromFile = [Yes | No]

The DescFromFile Parameter indicates the source for the descriptor data that should be associated with this PrivateStream. If DescFromFile is set to Yes, the Multiplexer will use the descriptors, if any, that are defined in the input PrivateStream Data file, and any descriptors specified using the DescriptorN Parameter will be ignored. If DescFromFile is set toNo, the Multiplexer will ignore any descriptors that are in the input data file, and only use those configured with theDescriptorN Parameter.

The DescFromFile Parameter is optional. The default value is No.

DescriptorN = byte list

A DescriptorN Parameter specifies a sequence of data bytes that should be included as descriptor data associated withthis Private Stream data stream in the PMT. Multiple descriptors may be specified in a single DescriptorN Parameter,although it is recommended that the data assigned to each DescriptorN Parameter should consist of only one descriptor.Up to 32 DescriptorN Parameters may be configured in each Private Stream Subsection. The parameter name isDescriptorN where N is a number that identifies the parameter. The number of the first DescriptorN Parameter is 1, and thenumber is incremented with each subsequent DescriptorN Parameter that appears in this Data Subsection. For example, ifthere are three DescriptorN Parameters, then they would be named Descriptor1, Descriptor2 and Descriptor3. By default,no descriptors are defined for this Private Stream.

MP2TSME does not check the validity of the specified descriptor data bytes.

Example:

Descriptor1 = 0D 04 4D414E5A

PID = integer

The PID Parameter specifies the PID value used for transport packets that carry this Private Stream. This PID is alsoidentified in the PMT as the stream's elementary_PID. The PID value can be set to any integer between 16 and 8190(0x0010 and 0x1FFE), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

The first three data streams (non-video and non-audio) in programs with ProgramNumber values 2 through 401 areassigned default PID values using the algorithm of 16 * ProgramNumber + 12 + N, where N equals 1 for the first datastream, 2 for the second data stream, and 3 for the third data stream. Program-related data streams that are assignedPIDs with this method include Table Data, Private Stream data, and SCTE 35 data. For example, if the first data streamthat is inserted in a program with ProgramNumber 3 is TableData1, it is assigned a default PID value of 16 * 3 + 11 + 2 =61 (0x003D). If PrivateStream1Data1 is next inserted, it will be given a default PID value of 0x003E. When a third datastream, whether it is Table Data, Private Stream, or SCTE 35, is added, it will be assigned a PID value of 0x003F.

The fourth and higher data streams (Table Data, Private Stream, or SCTE 35) that are inserted in a program will beassigned the first available PID value between 6432 and 8190 (0x1920 and 0x1FFE), inclusive. Similarly, all data streamsinserted in programs with a ProgramNumber value greater than 401 will be assigned the first available value in this upperrange.

TransportPriority = [Yes | No]

The TransportPriority Parameter determines the value of the transport_priority bit that appears in all transport packets for

Page 208: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0200

Copyright © 1998 - 2010 Manzanita Systems, Inc.

this Private Stream. If the TransportPriority value is Yes, then all transport_priority bits are set to one.

The TransportPriority Parameter is optional. The default is No, which indicates that the transport_priority bit should have avalue of zero in all packets for this Private Stream.

InitDI = [Yes | No]

The InitDI Parameter indicates if the first transport packet carrying this Private Stream should contain adiscontinuity_indicator with the value of 1. If the InitDI value is Yes, then the discontinuity_indicator is set in the initialpacket.

The InitDI Parameter is optional. The default value is No, which is not to set the discontinuity_indicator in the first PrivateStream data packet.

RAI = [Yes | No]

The RAI Parameter is set to Yes to indicate the random_access_indicator flag should be set to one in every transportpacket for this Private Stream data that contains a PES header with a PTS.

The default value is No, which is not to set the random_access_indicator for this Private Stream.

PEScopyrt = [Yes | No]

The PEScopyrt Parameter indicates the state of the copyright field that appears in all PES headers for the Private Stream.If the value is Yes, then the copyright field will be set to a value of 1. The PEScopyrt Parameter is optional. The default isNo, which is to assign the copyright field a value of 0.

PESid = integer

The PESid Parameter can be used to override the stream_id value that is specified in the input Private Stream Data file. Itcan also be used to set the stream_id value if the Private Stream Data file does not, or if the input file payload data only,i.e., the DataOnly Parameter is Yes.

If no stream_id value is assigned in the input file and the PESid Parameter is not specified, then a default stream_id valueof value of 0xBD (private_stream_1) is used.

If a PESid value is specified, it should be a non-negative integer that ranges from 0 through 255 (0xFF), inclusive. Thevalue may be specified in decimal, or if prefaced with a "0x", in hexadecimal. The value that is assigned to the PESidParameter will override the stream_id that is specified in the input Private Stream Data file (if present).

The stream_id that is ultimately used will determine whether the Private Stream is multiplexed as private_stream_1 orprivate_stream_2. A value of 0xBD indicates that the stream is private_stream_1, while a value of 0xBD indicatesprivate_stream_2.

To multiplex a Private Stream as private_stream_2, the input file should be payload data only, the DataOnly Parametershould be Yes, and the PESid value must be 0xBF.

PESpri = [Yes | No]

The PESpri Parameter indicates the state of the PES_priority field that appears in all PES headers for this Private Stream. If the value is Yes, then the PES_priority field in all PES headers will be set to one.

The PESpri Parameter is optional. The default is No, which indicates that the PES_priority is set to zero.

PESorig = [Yes | No]

The PESorig Parameter indicates the state of the original_or_copy field that appears in all PES headers for this PrivateStream. If the value is Yes, then the original_or_copy field in all PES headers will be set to a value of one.

The PESorig Parameter is optional. The default is No, which is to assign the original_or_copy field a value of zero.

DBsize = integer

The DBsize Parameter specifies the size of the decoder buffer for this Private Stream. The value must be a non-zero

Page 209: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 201

Copyright © 1998 - 2010 Manzanita Systems, Inc.

positive integer that represents the buffer size in bytes. The valid range is 0 to 1 000 000 000, inclusive.

The DBsize Parameter is optional. The default value is 0, which indicates that the standard decoder buffer size should beused.

StreamDelay = integer

The StreamDelay Parameter specifies the length of time that the Private Stream should be delayed from the beginning ofthe program. The units for the value are 90 kHz clock cycles. The units for the value are 90 kHz clock cycles. The valuemust be an integer between 0 and 2 000 000 000. This parameter may be used to achieve sync when the various streamswere not encoded at the same time. For example, if this Private Stream data is leading the video stream, then theStreamDelay Parameter may be used for alignment.

The StreamDelay Parameter is optional. The default value is zero, which indicates that the Private Stream should not bedelayed.

Priority = [Yes | No]

The Priority Parameter is set to Yes to indicate that transport packets for this Private Stream should be inserted into themultiplex with minimal jitter. This parameter should normally not be used.

The Priority Parameter is optional. The default value is No, which indicates that a higher priority should not be assigned tothis Private Stream.

SBrate = integer

The SBrate Parameter specifies the drain rate of the smoothing buffer for this Private Stream. The value must be anon-negative integer representing the drain rate in bits per second. The valid range is 0 to 1 000 000 000. If a smoothingbuffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given.

The SBrate Parameter is optional. The default is 0, which is not to have a smoothing buffer for this Private Stream.

SBsize = integer

The SBsize Parameter specifies the size of the smoothing buffer for this Private Stream. The value must be a non-negativeinteger representing the buffer size in bytes. The valid range for the SBsize value is 0 to 1 000 000 000. If a smoothingbuffer is to be used, non-zero values for both the SBsize and SBrate Parameters must be given.

The SBsize Parameter is optional. The default value is 0, which is not to have a smoothing buffer for this Private Stream.

TimeOffset = hh:mm:ss:ff

The TimeOffset Parameter enables adjustment of the start time of the Private Stream. The specified value should be induration format (HH:MM:SS:FF), where HH is a number of hours (00 to 24), MM is a number of minutes (00 to 59), SS is anumber of seconds (00 to 59), and FF is a number of frames. The duration may be negative, which will adjust the datastream backward in time. The most significant places in the timecode default to zero, and may be omitted. For example, atimecode of "1:20:5" would be interpreted as one minute, twenty seconds and five frames.

The TimeOffset Parameter is optional. The default value is 0. The valid range is -24:00:00:00 to 24:00:00:00.

Note that if the original PTS is T, and both the TimeOffset and the TimestampRatio have non-zero values, then theadjusted PTS will be: TimestampRatio * T + TimeOffset.

Examples:

TimeOffset = 2:10

TimestampRatio = double

The TimestampRatio Parameter specifies a value by which all presentation time stamps (PTS) in the Private Stream Datafile should be multiplied. The TimestampRatio value should be a non-zero, non-negative number in double format. Thevalid range is 0.1 to 4.0.

The TimestampRatio Parameter is optional. The default value is 0, which indicates that the PTS should not be modified.

Note that if the original PTS is T, and both the TimeOffset and the TimestampRatio have non-zero values, then the

Page 210: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0202

Copyright © 1998 - 2010 Manzanita Systems, Inc.

adjusted PTS will be: TimestampRatio * T + TimeOffset.

AdvanceTime = integer

The AdvanceTime Parameter specifies the number of milliseconds that a Private Stream access unit should be delivered inadvance of its designated presentation time. The value should be an integer from 0 through 30 000, inclusive. Setting theAdvanceTime value to 0 indicates that the Multiplexer should use a default values of 333 ms if the stream is DVB subtitledata, and 40 ms if it is teletext.

The AdvanceTime Parameter is optional. The default value is 0.

SyncVideoTC = [Yes | No]

The SyncVideoTC Parameter indicates if the Private Stream should be synchronized to the timecodes in the videoelementary stream. If the SyncVideoTC Parameter is set to No, then the Private Stream presentation times are expectedto be 0-based. If it is set to Yes, then the Private Stream presentation times are expected to be synchronized to thetimecodes found in the associated video's GOP headers.

The SyncVideoTC Parameter is optional. The default value is No.

AdjustStart = [Yes | No]

The Start Parameter can be used to multiplex the input video stream starting at a specified timecode, discarding the initialduration of the video before that point. If the Start Parameter is specified in the configuration, the AdjustStart Parametercan be set to Yes to direct the Multiplexer to discard the same duration from the start of the Private Stream data. IfAdjustStart is set to No, the Multiplexer will always multiplex Private Stream from the start of the file. By default,AdjustStart is set to Yes.

NoVideoBase = [Yes | No]

The NoVideoBase Parameter should be set to Yes if the Private Stream data is not time-aligned with the video elementarystream. In this case, the Multiplexer will set the timestamps using only the timing information in the input Private Streamfile. If NoVideoBase is set to No and a video elementary stream is present in the program, the Private Stream timestampswill be synchronized with the video timestamps.

Page 211: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 203

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4.2.4.11 SCTE 35 Data Subsection

The SCTE 35 Data Subsection is included in a Program Section to configure a SCTE 35 Data stream carrying SpliceInformation Table messages as part of the program. Up to four SCTE 35 Data streams may be configured in a each program. Each data stream must be specified in a separate SCTE 35 Data Subsection.

The SCTE 35 Data Subsection Title should be the only string on the first line of the SCTE 35 Data Subsection. It appears asfollows:

Scte35DataN$

The N in the SCTE 35 Data Subsection Title represents a number that identifies the input data stream. There may be nospaces in the Title string, and there should be no other characters on the line. The input data stream number is for MP2TSMEuse only; it is not associated with any MPEG-2 parameter, or with the input filename. The number of the first input SCTE 35Data stream must be 1, and the number is incremented for each subsequent input data stream. For example, if there are threeSCTE 35 Data streams to be multiplexed in the program, then three Subsections would be configured with the titlesScte35Data1$, Scte35Data2$ and Scte35Data3$. The MP2TSME default is to not include any SCTE 35 Data streams in aProgram Section.

SCTE 35 Data Parameter Assignments are listed following the SCTE 35 Data Subsection Title. All Parameter Assignmentsappearing between the SCTE 35 Data Subsection Title and the next Section or Subsection Title are considered to be part of theSCTE 35 Data Subsection. The Parameter Assignments that appear in a given SCTE 35 Data Subsection are specific to theSCTE 35 Data stream that is configured in the Subsection, i.e., they are not related to any other SCTE 35 Data streams that areconfigured in other SCTE 35 Data Subsections.

The File Parameter or a set of FileN Parameters is required in the SCTE 35 DataSubsection to identify the input file or files.The File Parameter is used when only a single input file is used. A set of FileN Parameters is used when the source stream issegmented into multiple input files. The input file for an SCTE 35 Data stream must be in a specific format that is defined byManzanita Systems as discussed in the section, SCTE 35 Data File.

All other SCTE 35 Data configuration parameters are assigned default values by MP2TSME if they are not explicitly specified inthe SCTE 35 Data Subsection.

The SCTE 35 Data parameters are divided into five functional categories as listed below:

Input PMT Transport Transport Timing

File / FileN DescriptorN PID InitDI TimeOffset

Rate TransportPriority Heartbeat

AdvanceTime

SyncVideoTC

AdjustStart

The rest of this section describes each SCTE 35 Parameter in detail.

File = string

The File Parameter specifies the name of the input SCTE 35 Data file. The string value that is entered may be the fullpath, relative path, or filename only. If only a filename is given, then MP2TSME will look for the specified filename in thecurrent directory.

The two-character string %i can be used in the specified name if the input data is segmented into multiple files that aresequentially named. The %i string represents an integer index that begins with 1. For example, if the input stream iscontiguously segmented into four files named part1.mpg, part2.mpg, part3.mpg, and part4.mpg, the filename used for FileParameter is part%i.mpg. The Multiplexer will look for a sequence of input files in the specified path starting with

part1.mpg, and multiplex them as one continuous SCTE 35 Data stream. It will stop multiplexing when it reaches the lastfile name in the sequence.

The input file for a SCTE 35 Data stream must be in a specific format that is defined by Manzanita Systems as discussedin the section, SCTE 35 Data File.

The File Parameter is required in a SCTE 35 Data Subsection if the data is in a single input file.

Page 212: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0204

Copyright © 1998 - 2010 Manzanita Systems, Inc.

FileN = string

The FileN Parameter is used if the input SCTE 35 Data is segmented into multiple sequential files. Each FileNParameter specifies the name of one of the input files. The string value that is entered may be the full path, relative path,or filename only. If only a filename is given, then MP2TSME will look for the specified filename in the current directory.The Parameter Name is FileN where N is a number that identifies a specific input file. There may be no spaces betweenFile and the file number. The file number is for MP2TSME use only; it is not associated with any MPEG-2 parameter orwith the actual filename. The number of the first input file must be 1, and the number is incremented for each subsequentfile. For example, if the input stream were segmented into three files, the Parameter Names would be File1, File2 andFile3.

The input files for a SCTE 35 Data stream must be in a specific format that is defined by Manzanita Systems asdiscussed in the section, SCTE 35 Data File.

A set of FileN Parameters is required in a SCTE 35 Data Subsection if the input data is segmented into multiple inputfiles.

Rate = double

The Rate Parameter determines the maximum rate in bits per second that should be used for the SCTE 35 Data when itis multiplexed. The value must be a non-negative number in double format that specifies the desired bit rate in bits persecond (bps). The valid range is 1 to 60 000 000 bps, inclusive. It may include fractional bps. If the value is set to 0, thenthe Multiplexer will use a maximum rate of 192 kbps.

The Rate Parameter is optional. The default value is 0.

The messages in an SCTE 35 Data stream have time-stamps to define specific splice and segmentation points. TheMultiplexer will multiplex packets carrying the messages at a set interval in advance of the time-stamps. However,because splice information is only sent when necessary, there may be a period when there are no messages to deliver. Inthis case, the SCTE 35 Data PID stream will be absent from the output transport stream until it is time to transport the nextmessage.

DescriptorN = byte list

A DescriptorN Parameter specifies a sequence of data bytes that should be included as descriptor data associated withthis SCTE 35 Data stream in the PMT. Multiple descriptors may be specified in a single DescriptorN Parameter, although itis recommended that the data assigned to each DescriptorN Parameter should consist of only one descriptor. Up to 32DescriptorN Parameters may be configured in each SCTE 35 Data Subsection. The parameter name is DescriptorNwhere N is a number that identifies the parameter. The number of the first DescriptorN Parameter is 1, and the number isincremented with each subsequent DescriptorN Parameter that appears in this Data Subsection. For example, if there arethree DescriptorN Parameters, then they would be named Descriptor1, Descriptor2 and Descriptor3. By default, nodescriptors are defined for this SCTE 35 Data stream.

MP2TSME does not check the validity of the specified descriptor data bytes.

Example:

Descriptor1 = 0D 04 4D414E5A

PID = integer

The PID Parameter specifies the PID value used for transport packets that carry this SCTE 35 Data stream. This PID isalso identified in the PMT as the stream's elementary_PID. Tthe PID value can be set to any integer between 16 and 8190(0x0010 and 0x1FFE), inclusive. The value may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

The first three data streams (non-video and non-audio) in programs with ProgramNumber values 2 through 401 areassigned default PID values using the algorithm of 16 * ProgramNumber + 12 + N, where N equals 1 for the first datastream, 2 for the second data stream, and 3 for the third data stream. Program-related data streams that are assignedPIDs with this method include Table Data, Private Stream data, and SCTE 35 data. For example, if the first data streamthat is inserted in a program with ProgramNumber 3 is TableData1, it is assigned a default PID value of 16 * 3 + 11 + 2 =61 (0x003D). If ScteData1 is next inserted, it will be given a default PID value of 0x003E. When a third data stream,whether it is Table Data, Private Stream, or SCTE 35, is added, it will be assigned a PID value of 0x003F.

The fourth and higher data streams (Table Data, Private Stream, or SCTE 35) that are inserted in a program will beassigned the first available PID value between 6432 and 8190 (0x1920 and 0x1FFE), inclusive. Similarly, all data streams

Page 213: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Configuring a Transport Stream 205

Copyright © 1998 - 2010 Manzanita Systems, Inc.

inserted in programs with a ProgramNumber value greater than 401 will be assigned the first available value in this upperrange.

TransportPriority = [Yes | No]

The TransportPriority Parameter determines the value of the transport_priority bit that appears in all transport packets forthis SCTE 35 Data stream. If the TransportPriority value is Yes, then all transport_priority bits are set to one.

The TransportPriority Parameter is optional. The default is No, which indicates that the transport_priority bit should have avalue of zero in all packets for this SCTE 35 Data stream.

InitDI = [Yes | No]

The InitDI Parameter indicates if the first transport packet carrying this SCTE 35 Data stream should contain adiscontinuity_indicator with the value of 1. If the InitDI value is Yes, then the discontinuity_indicator is set in the initialpacket.

The InitDI Parameter is optional. The default value is No, which is not to set the discontinuity_indicator in the first SCTE 35Data packet.

TimeOffset = hh:mm:ss:ff

The TimeOffset Parameter enables adjustment of the start time of the SCTE 35 Data stream. The specified value shouldbe in duration format (HH:MM:SS:FF), where HH is a number of hours (00 to 24), MM is a number of minutes (00 to 59),SS is a number of seconds (00 to 59), and FF is a number of frames. The duration may be negative, which will adjust thedata stream backward in time. The most significant places in the timecode default to zero, and may be omitted. Forexample, a timecode of "1:20:5" would be interpreted as one minute, twenty seconds and five frames.

The TimeOffset Parameter is optional. The default value is 0. The valid range is -24:00:00:00 to 24:00:00:00.

Heartbeat = integer

The Heartbeat Parameter specifies the interval in milliseconds at which a splice_null command should be sent in the SCTE35 Data stream if no splice events are being transmitted. The valid range is 0 to 3 600 000 (one hour).

The Heartbeat Parameter is optional. The default value is 0, which indicates that no splice_null commands are sent.

AdvanceTime = integer

The AdvanceTime Parameter specifies the number of times that the Multiplexer should send a given splice_insertmessage, and how far in advance of the message time code each message copy should be transmitted. It is specified witha sequence of one or more integers that are separated by commas. Each value gives the number of seconds in advanceof the message time-code that a copy of the message should be sent. For example, if the AdvanceTime Parameter is setto "4,2,1", then the Multiplexer will repeat a splice_insert message at four seconds, two seconds, and one second beforethe message time-code for a total of three times.

The AdvanceTime Parameter is optional. The default value is 4, which will send each splice_insert message only once atfour seconds in advance.

SyncVideoTC = [Yes | No]

The SyncVideoTC Parameter indicates if the SCTE 35 Data stream should be synchronized to the timecodes in the videoelementary stream. If the SyncVideoTC Parameter is set to No, then the SCTE 35 Data presentation times are expectedto be 0-based. If it is set to Yes, then the presentation times are expected to be synchronized to the timecodes found inthe associated video's GOP headers.

The SyncVideoTC Parameter is optional. The default value is No.

AdjustStart = [Yes | No]

The Start Parameter can be used to multiplex the input video stream starting at a specified timecode, discarding the initialduration of the video before that point. If the Start Parameter is specified in the configuration, the AdjustStart Parameter

Page 214: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0206

Copyright © 1998 - 2010 Manzanita Systems, Inc.

can be set to Yes to direct the Multiplexer to discard the same duration from the start of the SCTE 35 data. If AdjustStart isset to No, the Multiplexer will always multiplex the SCTE 35 data from the start of the file. By default, AdjustStart is set toYes.

Page 215: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Chapter V

Multiplexing a Transport Stream

Page 216: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0208

Copyright © 1998 - 2010 Manzanita Systems, Inc.

5 Multiplexing a Transport Stream

After the desired configuration has been defined, the MP2TSME Multiplexer can be run to create an output transport stream.This chapter tells you how to run the Multiplexer and interpret its output. It contains the following sections:

· Multiplexing from the UI explains how to use the MP2TSME graphical user interface to multiplex the output stream.

· Multiplexing from the Command Line describes how to invoke the Multiplexer using the command line version ofMP2TSME.

5.1 Multiplexing from the UI

After the desired configuration has been set up, it is a simple one-click operation to generate a transport stream in theMP2TSME user interface. This section explains how to start the Multiplexer, and describes the status that is displayed once themultiplexing operation begins. It includes the following subsections:

· Starting the Multiplexer

· Reviewing the Multiplexer Status

· Canceling the Multiplexing Operation

5.1.1 Starting the Multiplexer

After you have set up the MP2TSME UI with the desired configuration, you can start the Multiplexer.

To start the MP2TSME Multiplexer:

1. Choose Tools > Run Mux from the Menu Bar.

or

1. Click (Run Mux) on the Tool Bar.

The Multiplexer will start creating the output transport stream only if all configuration parameter values are valid. AMultiplexing dialog box will be displayed that indicates the progress of the multiplexing process.

If you have changed any parameter settings without saving or applying them and try to run the Multiplexer, a dialog box willbe displayed that gives you the option of applying or discarding all your changes before multiplexing. If you elect to discard thechanges, all Parameters Dialog Boxes will revert to the last settings that were applied.

5.1.2 Reviewing the Multiplexer Status

Once you start the Multiplexer, a small progress window will appear that indicates how much of the output stream is complete.

If a non-fatal problem is encountered during the multiplexing operation, MP2TSME will display a red warning message in theStatus Pane. These messages are described in detail in the section, Warning Messages. The StopOnWarning Parameterdetermines how the Multiplexer behaves when a warning condition is encountered. If the Yes option is selected, then theMultiplexer will halt execution when the first warning condition is detected. If the No option is selected, then the Multiplexer willcontinue processing while warnings are issued. By default, the StopOnWarning Parameter is set to No.

Page 217: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Multiplexing a Transport Stream 209

Copyright © 1998 - 2010 Manzanita Systems, Inc.

If a fatal condition occurs during the multiplexing operation, a red error message will be displayed in the Status Pane. Fatalerror conditions are described in detail in the section, Error Messages. The StopOnError Parameter determines how theMultiplexer behaves when an error condition is encountered. If the Yes option is selected, then the Multiplexer will halt executionwhen the first error condition is detected. The final entry in the Status Pane will indicate the size of the output file when theMultiplexer was stopped. If the No option is selected, then the Multiplexer will continue processing while errors are issued,however, in most cases the output will not be usable. By default, the StopOnError Parameter is set to Yes.

If the multiplexing process has completed and the output file has been successfully created and written, the Status Pane willdisplay the following:

Name Description

Run Time Processing time in seconds to create the output transport streamfile

Output file size Size of the output file in bytes

Duration Time in hours, minutes, and seconds (HH:MM:SS) to play thetransport stream as calculated from the output bit rate and theoutput file size

Output bitrate Rate in bits per second (bps) at which the output transport streamis designed to be played.

5.1.3 Canceling the Multiplexing Operation

While the Multiplexer is running, you always have the option of stopping it. If you do so, the output stream will still be created,but will be truncated. The current configuration that is displayed in the interface, however, will be unchanged.

To stop the MP2TSME Multiplexer:

1. Click the Cancel button on the Multiplexing progress dialog.

The Multiplexer will immediately stop and the message, "Mux canceled", will be displayed in the Status Pane.

Even if you cancel the Multiplexer, an output file will still be created. It will contain the transport stream that wasgenerated by the Multiplexer up to the point when you canceled.

5.2 Multiplexing from the Command Line

The MP2TSME installation includes a command line version that enables execution of the MP2TSME Multiplexer in a commandprompt or shell window. The command line MP2TSME can be run in batch files or scripts for high-volume or automatedapplications.

The operation of the command line version of MP2TSME is controlled with a configuration file. The MP2TSME configuration fileis a simple text file in which the user specifies the operational parameters that should be used by MP2TSME to generate theoutput stream. In most cases, only the input and output filename parameters are required. If specific values for otheroperational parameters are not given in the configuration file, MP2TSME will assign default values. Operation in this defaultmode allows users to generate streams by only specifying a minimal number of parameters.

The default configuration that is used by the command line version of MP2TSME is the same as the Standard configurationavailable in the MP2TSME graphical UI program. In order to create a transport stream using the command line MP2TSME thatis compliant with the CableLabs SD or HD VOD Specification, you will need to use a configuration file in which the requiredparameter settings are included. The easiest way to create a CableLabs compliant configuration file is to set up a multiplex inthe MP2TSME UI with CableLabs SD or HD defaults and then save the configuration to a file.

Page 218: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0210

Copyright © 1998 - 2010 Manzanita Systems, Inc.

If you want to create many output streams with a configuration that differs only in the output stream filename and the input videoand audio elementary stream filenames, then you can execute MP2TSME using the file I/O override feature. This feature allowsyou to create different output streams using a single configuration file.

The command line version of MP2TSME is discussed in the following subsections:

· Running the Multiplexer from the Command Line

· Using Command Line File I/O Override

· Examples

5.2.1 Running the Multiplexer from the Command Line

Because all operating parameters are contained in the configuration file, it is simple to execute MP2TSME from the commandline.

To run the command line version of MP2TSME:

1. Create a configuration file for your desired output transport stream. You only need to include optional parameters if thedesired values differ from the standard defaults. You can save a configuration file from the MP2TSME UI, or you can use anytext editor to create one.

2. (Windows only) Open an "MS-DOS" Command Prompt window.

3. At the command prompt or in a script, enter the line:

mp2tsme config_file

For config_file, give the name of the configuration file. The name may be specified by full path, relative path, or byfilename only. If only the filename is given, then MP2TSME will look for the configuration file in the current directory.

After reading the configuration file, MP2TSME will display a summary of all of the parameters that have been configured. Youshould examine this summary information carefully to make sure that the output stream is created as desired.

If no errors are encountered, MP2TSME will display the message "Stream Complete" when it has finished creating the outputstream. It will also display statistics about the multiplexing process and the output stream.

MP2TSME may output warning messages during the multiplexing process if it encounters conditions that should be brought toyour attention. Warning messages do not necessarily mean that the output stream will be invalid, and MP2TSME will normallycontinue to create the stream if only warning conditions are detected. If MP2TSME detects a fatal condition while multiplexingthe stream, it will display an error message and will usually terminate. See Status Messages for more information.

If the StopOnError Parameter is set to "Yes" and an error condition is encountered, the Multiplexer will halt execution and returna status value that is greater than 0. Similarly if the StopOnWarning Parameter is set to "Yes" and a warning condition isdetected, the Multiplexer will stop and return a value that is greater than 0. In all other cases, the Multiplexer will return 0.

If you get a message that the name that you entered is not recognized as a command, then the MP2TSME command lineexecutable is not in a location that is recognized by the PATH environment variable. On a UNIX system (Linux, Solaris, or MacOS X) you should either create a symbolic link from the MP2TSME program to a directory that is in your PATH variable orinclude the location of the MP2TSME program in the PATH variable. On a Windows system, you need to add the path of theMP2TSME installation folder to the PATH variable.

If you enter mp2tsme on the command line without a configuration file argument, version and usage information will bedisplayed. You should verify that the version of MP2TSME that is executed is V6.0. If the location of a previous version ofMP2TSME is still referenced in your PATH variable, it may run instead of MP2TSME V6.0.

Page 219: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Multiplexing a Transport Stream 211

Copyright © 1998 - 2010 Manzanita Systems, Inc.

5.2.2 Using Command Line File I/O Override

In some cases, MP2TSME users may want to create many output streams that differ only in the output filename and the inputvideo and audio elementary stream filenames. The MP2TSME File I/O Override feature allows you to create these outputstreams using a single configuration file.

Using the File I/O Override, you can specify filenames for the output transport stream, one input video elementary stream,and/or one audio elementary stream on the command line in addition to the configuration file. Practical use of the File I/OOverride feature is limited to applications in which many transport streams are being created that have one program consistingof a single video elementary stream and a single audio elementary stream.

To use the File I/O Override on the output transport stream file, one or more filenames are specified as arguments after a "-o"option to the command line version of MP2TSME after the configuration filename. If only one output filename is specified,MP2TSME uses it in place of the File Parameter in the Transport Section of the configuration file. If multiple filenames arespecified, they are used to replace the File1, File2, etc. Parameters in the Transport Section for a multiple file output stream. Inthis case, a FileSize Parameter must be also specified in the configuration file. It is not necessary that the number of FileNParameters in the configuration file is the same as the number of output filenames following the "-o" option. MP2TSME willalways "use up" the command line filenames before it looks at the filenames in the configuration file. If there are fewer filenameson the command line than FileN Parameters in the configuration file, once MP2TSME has written to the command line specifiedfiles it will continue writing the output stream to the file defined by the next FileN Parameter that has not been overridden.

To override the File Parameter in the Video1 Subsection of Program1 in the configuration file, one or more filenames arespecified after a "-v" option to MP2TSME. If multiple filenames are given, MP2TSME will read them in sequentially as itmultiplexes the video elementary stream. The files should therefore make up a continuous video elementary stream when theyare concatenated.

Similarly, one or more filenames for the input audio elementary stream can be given after an "-a" option to override the FileParameter in the Audio1 Subsection of Program1.

The numbers of output filename arguments, video filename arguments, and audio filename arguments do not have to be thesame. For example, you can use only one output filename, three input video filenames, and two input audio filenames. Youalso do not have to use all three arguments, only the ones that you need to modify the configuration file as required. Forexample, if the input filenames are different from those in the configuration file, but the output filename is as specified by the FileParameter, you would only need to use the "-v" and "-a" options.

If you are going to use a configuration file exclusively with the Command Line File I/O Override feature, you do not have toinclude the File Parameters that will be overridden. Normally, MP2TSME will issue a fatal error if the output file and input filesare not specified in a configuration file, but if the filenames are given on the command line there will be no error.

To use the File I/O Override feature to specify a single output file, a single video input file, and a single audio input file(example):

1. At the command prompt (in an "MS-DOS" Command Prompt window if this is a Windows system), type:

mp2tsme config_file -o output_file -v video_file -a audio_file

where config_file is the name of the configuration file, output_file is the name of the output stream file,video_file is the name of the video input file, audio_file is the name of the audio input file. The names of the filesmay be specified by full path, relative path, or by filename only. If only the filename is given, then MP2TSME will look forthe file in the current directory.

To use the File I/O Override feature to specify two output files, three video input files, and three audio input files(example):

1. At the command prompt (in an "MS-DOS" Command Prompt window if this is a Windows system), type:

mp2tsme config_file -o out1 out2 -v vpart1 vpart2 vpart3 -a apart1 apart2 apart3

where config_file is the name of the configuration file, out1 and out2 are the names of the output file in the order thatthey are to be written, vpart1, vpart2, and vpart3 are the names of the files that are concatenated to make up the

Page 220: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0212

Copyright © 1998 - 2010 Manzanita Systems, Inc.

input video elementary stream, and apart1, apart2, and apart3 are the names of the files that are concatenated tomake up the input audio elementary stream. The names of the files may be specified by full path, relative path, or byfilename only.

If you want the Multiplexer to write to the specified multiple output files, you must also set the FileSize Parameter in theconfiguration file to the maximum size of each of the output files. If the FileSize Parameter is not assigned a non-zerovalue, the entire output stream will be written to the first file that is named.

5.2.3 Examples

This section includes the following practical examples of using the command line version of MP2TSME to generate transportstreams.

· Multiplexing a Single Program Transport Stream

· Multiplexing a Multiple Program Transport Stream with Variable Bitrate Video

· Remultiplexing a Program Stream

· Multiplexing for CableLabs VoD

· Multiplexing with SMPTE 302M Data

5.2.3.1 Multiplexing a Single Program Transport Stream

In this example, a transport stream with the following characteristics is required:

§ Compliant MPEG-2 transport stream.

§ Minimal transport rate.

§ Single program consisting of one MPEG-2 video elementary stream, one MPEG audio stream, and one AC-3 audiostream.

The following configuration file, test1.cfg, is created. This example takes advantage of the MP2TSME default operation tocreate a full transport stream with a minimal configuration file.

Transport*# Single program transport streamFile = c:\mpeg2\streams\test1.tsProgram1*Video1$File = c:\mpeg\video\video1.mpvAudio1$File = c:\mpeg\audio\audio1.mpaAudio2$File = c:\mpeg\audio\audio2.ac3

MP2TSME is executed by entering the following line at the command prompt:

mp2tsme test1.cfg

MP2TSME will parse the configuration file and display a summary of the configured operating parameters. This feedback isimportant because typographical mistakes in the configuration file could result in the transport stream not being created in themanner that the user desired. Therefore, it is recommended that the user always review the configuration summary. For thisexample, the following summary is displayed:

Configuration:Create PSI: Yes PAT repetition rate = 10.000000, PMT repetition rate = 10.000000

Page 221: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Multiplexing a Transport Stream 213

Copyright © 1998 - 2010 Manzanita Systems, Inc.

PAT transport stream ID = 0x0001, version number = 0Data: NonePrograms: Program 1: PCR PID = 0x0021, PCR period = 90 ms

Program Number = 1, PMT PID = 0x0020, PMT version = 0 Descriptors from configuration: None Video: Video 1: PID = 0x0021, PES every 1th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0xE0 (PMT stream_type to be determined from ES) PES: priority=No, align=No, copyright=No, original=No Descriptors from configuration: None Use vbv_delay field as base initial delay File = c:\mpeg\video\video1.mpv Audio: Audio 1: PID = 0x0024, PES every 5th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0x00 (PMT stream_type and PES stream_id to be determined from ES) PES: priority=No, align=No, copyright=No, original=No Descriptors from configuration: None File = c:\mpeg\audio\audio1.mpa Audio 2: PID = 0x0025, PES every 5th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0x00 (PMT stream_type and PES stream_id to be determined from ES) PES: priority=No, align=No, copyright=No, original=No Descriptors from configuration: None File = c:\mpeg\audio\audio2.ac3 Data: None Table: None SMPTE 302M: None Private Stream 1 Data: None SCTE35 Splice/Segmentation Data: None

The output transport stream in this example is created with a minimum transport rate. The PAT and PMT are generated andinserted automatically by MP2TSME. After the output file is written, MP2TSME displays the total processing time and someother statistics about the new transport stream.

Stream CompleteRun Time = 2 secondsOutput file size = 4980684 bytesDuration (hh:mm:ss) = 00:00:09Output bitrate = 4392976 bps0 errors, 0 warnings

5.2.3.2 Multiplexing a Multiple Program Transport Stream with Variable Bitrate Video

In this example, MP2TSME is used to create a transport stream with two programs that each contain one VBR video stream. The transport stream is required to have the following characteristics:

§ Compliant MPEG-2 transport stream.

§ Transport rate of 8.0 Mbps.

§ Duration of 14 seconds.

§ Two programs each consisting of one MPEG-2 video elementary stream and one MPEG audio stream.

§ Both video elementary streams are variable bitrate (VBR) with a maximum bitrate of 5.0 Mbps. The streams wereencoded so that their combined bitrate never exceeds 7.2 Mbps.

Although each video stream has a maximum rate of 5.0 Mbps, their combined bandwidth never exceeds 7.2 Mbps at any pointin time. Because of this guarantee, the absolute maximum of 10.0 Mbps does not have to be allocated.

Page 222: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0214

Copyright © 1998 - 2010 Manzanita Systems, Inc.

When configuring for VBR streams, non-VBR streams must be given a higher priority so that they always get their requiredbandwidth. In this example, the audio elementary streams and PSI (PID 0 and PMT PID) streams must be assigned higherpriority. The VBR streams are multiplexed with a lower priority, so that they use the remaining bandwidth. The followingconfiguration file, test2.cfg, is created:

Transport*# Multiple program transport stream, variable bitrate Rate = 8000000Duration = 14:0File = vbr.tsPriority = YesProgram1*Priority = YesVideo1$File = vbr1.mpvRate = 5000000Audio1$Priority = YesFile = aud1.mcProgram2*Priority = YesVideo1$File = vbr2.mpvRate = 5000000Audio1$Priority = YesFile = aud2.mc

MP2TSME is executed by entering the following line at the command prompt:

mp2tsme test2.cfg

MP2TSME displays the following configuration summary:

Configuration:Transport Rate = 8000000.000000Transport Stream Duration = 00:00:14:00Create PSI: Yes PAT repetition rate = 10.000000, PMT repetition rate = 10.000000 PAT transport stream ID = 0x0001, version number = 0 PID 0 packets given priority.Data: NonePrograms: Program 1: PCR PID = 0x0021, PCR period = 90 ms

Program Number = 1, PMT PID = 0x0020, PMT version = 0 PMT packets given priority. Descriptors from configuration: None Video: Video 1: PID = 0x0021, PES every 1th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0xE0 (PMT stream_type to be determined from ES) PES: priority=No, align=No, copyright=No, original=No Descriptors from configuration: None Use vbv_delay field as base initial delay File = vbr1.mpv Rate = 5000000.000000 Audio: Audio 1: PID = 0x0024, PES every 5th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0x00 (PMT stream_type and PES stream_id to be determined from ES) PES: priority=No, align=No, copyright=No, original=No Audio packets given priority. Descriptors from configuration: None File = aud1.mc Data: None

Page 223: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Multiplexing a Transport Stream 215

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Table: None SMPTE 302M: None Private Stream 1 Data: None SCTE35 Splice/Segmentation Data: None

Program 2: PCR PID = 0x0031, PCR period = 90 ms Program Number = 2, PMT PID = 0x0030, PMT version = 0 PMT packets given priority. Descriptors from configuration: None Video: Video 1: PID = 0x0031, PES every 1th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0xE0 (PMT stream_type to be determined from ES) PES: priority=No, align=No, copyright=No, original=No Descriptors from configuration: None Use vbv_delay field as base initial delay File = vbr2.mpv Rate = 5000000.000000 Audio: Audio 1: PID = 0x0034, PES every 5th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0x00 (PMT stream_type and PES stream_id to be determined from ES) PES: priority=No, align=No, copyright=No, original=No Audio packets given priority. Descriptors from configuration: None File = aud2.mc Data: None Table: None SMPTE 302M: None Private Stream 1 Data: None SCTE35 Splice/Segmentation Data: None

Because MP2TSME determines the total maximum bitrate required based on the configured maximum video bitrates of 5.0Mbps, it issues a warning that the configured rate (8 Mbps) is less than the aggregate rate by 2.68 Mbps. However, since thevideo streams are VBR and their aggregate bitrate is only 7.2 Mbps, the output transport stream is still valid. However, if theinput streams were not VBR and sufficient aggregate bandwidth was not provided, then a warning similar to the following onewould be issued during the multiplexing process to indicate possible decoder buffer underflows.

Warning: packet = 0, time = 0.00sComponents exceed configured transport rate by 2680850 bps.

MP2TSME displays the following status information when the transport stream has been created:

Stream CompleteRun Time = 7 secondsOutput file size = 13999984 bytesDuration (hh:mm:ss) = 00:00:13Output bitrate = 8000000 bps0 errors, 0 warnings

5.2.3.3 Remultiplexing a Program Stream

In this example, the user has an existing MPEG-2 program stream file. The program stream contains one MPEG-2 videoelementary stream and one MPEG audio elementary stream. The user wants to remultiplex the video stream and the audiostream along with a separate AC-3 audio elementary stream into a single program transport stream.

The video elementary stream is identified by a stream_id value of 0xE0 in the program stream. The MPEG audio elementarystream has a stream_id value of 0xC0. The user would like the video stream to have a PID of 0xA1, the MPEG audio to have aPID of 0xA3, the AC-3 audio stream to have a PID of 0xA4, and the PMT PID to be 0xA0.

The following configuration file, test3.cfg, is created:

Transport*# Remultiplex program stream and add AC-3 audio

Page 224: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0216

Copyright © 1998 - 2010 Manzanita Systems, Inc.

File = ts1.mpgProgram1*PMTPID = 0xA0PCRPID = 0xA1Video1$File = kbday.mpgSourceStreamID = 0xE0PID = 0xA1Audio1$File = kbday.mpgSourceStreamID = 0xC0PID = 0xA3Audio2$File = kbday.ac3PID = 0xA4

MP2TSME is executed by entering the following line at the command prompt:

mp2tsme test3.cfg

MP2TSME displays the following configuration summary:

Configuration:Create PSI: Yes PAT repetition rate = 10.000000, PMT repetition rate = 10.000000 PAT transport stream ID = 0x0001, version number = 0Data: NonePrograms: Program 1: PCR PID = 0x00A1, PCR period = 90 ms

Program Number = 2, PMT PID = 0x00A0, PMT version = 0 Descriptors from configuration: None Video: Video 1: PID = 0x00A1, PES every 1th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0xE0 (PMT stream_type to be determined from ES) PES: priority=No, align=No, copyright=No, original=No Descriptors from configuration: None Use vbv_delay field as base initial delay File = kbday.mpg Source File is System/Program Stream, use stream_id = 0xE0 Audio: Audio 1: PID = 0x00A3, PES every 5th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0x00 (PMT stream_type and PES stream_id to be determined from ES) PES: priority=No, align=No, copyright=No, original=No Descriptors from configuration: None File = kbday.mpg Source File is System/Program Stream, use stream_id = 0xC0 Audio 2: PID = 0x00A4, PES every 5th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0x00 (PMT stream_type and PES stream_id to be determined from ES) PES: priority=No, align=No, copyright=No, original=No Descriptors from configuration: None File = kbday.ac3 Data: None Table: None SMPTE 302M: None Private Stream 1 Data: None SCTE35 Splice/Segmentation Data: None

The output transport stream in this example is created with a minimum transport rate. The PAT and PMT are generated andinserted automatically by MP2TSME. MP2TSME extracts and remultiplexes the video and audio streams from the inputprogram stream in a single step.

Page 225: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Multiplexing a Transport Stream 217

Copyright © 1998 - 2010 Manzanita Systems, Inc.

MP2TSME displays the following status information when the transport stream has been created:

Stream CompleteRun Time = 8 secondsOutput file size = 12339004 bytesDuration (hh:mm:ss) = 00:00:22Output bitrate = 4387583 bps0 errors, 0 warnings

5.2.3.4 Multiplexing for CableLabs VoD

CableLabs has published a Video on Demand (VoD) specification that places requirements on how a transport stream iscreated for Standard Definition (SD) and High Definition (HD) video servers. This example shows how to configure MP2TSMEto meet the CableLabs SD specification (MD-SP-VOD-CEP2.0-I02-070105). In the example, the audio is in English, and thelanguage descriptor for English is the third audio descriptor (Descriptor3) in the configuration file. This should be replaced bythe appropriate language descriptor if another language is in the audio stream.

The NoEmptyAF and QuadByte Parameters are present to avoid problems with some GI/Motorola set-top boxes. TheseParameters are required for V1.1 and V2 of the CableLabs specification.

The following configuration file, test4.cfg, is created:

Transport*## Config file for Cablelabs VOD spec#Rate = 3750000NoEmptyAF = YesFile = vod1.mpgPSIPATrep = 8PSIPMTrep = 8

Program1*ProgramNumber = 0x2PMTPID = 0x1e0PCRPID = 0x1e1PCRPES = Yes

Video1$File = vod1.vPID = 0x1e1RAI = YesPESalign = YesQuadByte = Yes

Audio1$File = aud.ac3PID = 0x01e2PESnau = 2Descriptor1 = 05 04 41 43 2D 33Descriptor2 = 81 0a 00 28 04 00 07 00 bf 65 6e 67Descriptor3 = 0A 04 65 6E 67 00

MP2TSME is executed by entering the following line at the command prompt:

mp2tsme test4.cfg or mp2tsme test4.cfg

MP2TSME displays the following configuration summary:

Configuration:Transport Rate = 3750000.000000

Page 226: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0218

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Prevent Adaptation Fields with zero length in videoCreate PSI: Yes PAT repetition rate = 8.000000, PMT repetition rate = 8.000000 PAT transport stream ID = 0x0001, version number = 0Data: NonePrograms: Program 1: PCR PID = 0x01E1, PCR period = 90 ms

PCRs on every PES header Program Number = 2, PMT PID = 0x01E0, PMT version = 0 Descriptors from configuration: None Video: Video 1: PID = 0x01E1, PES every 1th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0xE0 (PMT stream_type to be determined from ES) PES: priority=No, align=Yes, copyright=No, original=No Set RAI, Force Quad Byte alignment Descriptors from configuration: None Use vbv_delay field as base initial delay File = vod1.v Audio: Audio 1: PID = 0x01E2, PES every 2th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0x00 (PMT stream_type and PES stream_id to be determined from ES) PES: priority=No, align=No, copyright=No, original=No Descriptors: 1) 05 04 41 43 2D 33 2) 81 0A 00 28 04 00 07 00 BF 65 6E 67 3) 0A 04 65 6E 67 00 File = vod1.ac3 Data: None

MP2TSME displays the following status information when the transport stream has been created:

Stream CompleteRun Time = 7 secondsOutput file size = 14294392 bytesDuration (hh:mm:ss) = 00:00:30Output bitrate = 3750000 bps0 errors, 0 warnings

5.2.3.5 Multiplexing with SMPTE 302M Data

The SMPTE 302M specification provides a means of inserting many different types of data into an MPEG-2transport stream. This data is usually synchronous and associated with a video stream and typically is PCM audioor metadata. In this example, a transport stream is created with two SMPTE 302M streams. The first is a Dolby Eaudio stream and the second is a PCM audio stream. Both the Dolby E data and the PCM audio are stored asAES3 streams with two channels. The data is 20 bits per word, in three byte words with the byte order reversedand the data in the upper bit positions of the word. This format is typically how Dolby’s encoders output the dataas AES3. The least significant 4 bits are for the VUCF bits of the AES3 word. MP2TSME will discard these bitsand generate the VUCF bits internally. The two channel words are adjacent and occupy 5 bytes in the followingformat:

LSB 16 bit data word MSB VUCF LSB 16 bit data word MSB VUCF

Page 227: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Multiplexing a Transport Stream 219

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The following configuration file, test5.cfg, is created:

Transport*## MP2TSME Config file for PCM and Dolby E Audio#File = test5.mpgRate=10000000Program1*video1$file=t5.vbsPID = 0x21smpte302m1$Descriptor1 = 050442535344pid = 0x2dRefVideoPID = 0x21Stream1 = dolbyE.rawchannelstatus1 = userchannelstatus2=usercsdata1 =c10000000000000000000000000000000000000000000077csdata2 =c10000000000000000000000000000000000000000000077wordsize=20bytesperword=3bitreversed=noMSjustified = yesbytereversed=yessmpte302m2$Descriptor1 = 050442535344pid = 0x2eRefVideoPID = 0x21Stream1 = pcm.rawchannelstatus1 = userchannelstatus2 = usercsdata1 =8100000000000000000000000000000000000000000000d9csdata2 =8100000000000000000000000000000000000000000000d9wordsize=20bytesperword=3bitreversed=noMSjustified = yesbytereversed=yes

MP2TSME is executed by entering the following line at the command prompt:

mp2tsme test5.cfg

MP2TSME displays the following configuration summary:

Configuration:Transport Rate = 10000000.000000Create PSI: Yes PAT repetition rate = 10.000000, PMT repetition rate = 10.000000 PAT transport stream ID = 0x0001, version number = 0Data: NonePrograms: Program 1: PCR PID = 0x0021, PCR period = 90 ms

Program Number = 2, PMT PID = 0x0020, PMT version = 0 Descriptors from configuration: None Video: Video 1: PID = 0x0021, PES every 1th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0xE0 (PMT stream_type to be determined from ES) PES: priority=No, align=No, copyright=No, original=No Descriptors from configuration: None

Page 228: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0220

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Use vbv_delay field as base initial delay File = t5.vbs Audio: None Data: None SMPTE 302M: SMPTE302M 1: PID = 0x002D stream_type = 0x06, stream_id = 0xBD PES: priority=No, align=Yes, copyright=No, original=No Descriptors: 1) 05 04 42 53 53 44 Reference Video PID 0x0021 Channel Status 1 is User Data = C10000000000000000000000000000000000000000000077 Channel Status 2 is User Data = C10000000000000000000000000000000000000000000077 Bytes/Word = 3, WordSize = 20, Byte Reversed, MS justified Channel identification = 0 AES Stream #1 = 'dolbyE.raw' SMPTE302M 2: PID = 0x002E stream_type = 0x06, stream_id = 0xBD PES: priority=No, align=Yes, copyright=No, original=No Descriptors: 1) 05 04 42 53 53 44 Reference Video PID 0x0021 Channel Status 1 is User Data = 8100000000000000000000000000000000000000000000D9 Channel Status 2 is User Data = 8100000000000000000000000000000000000000000000D9 Bytes/Word = 3, WordSize = 20, Byte Reversed, MS justified Channel identification = 0 AES Stream #1 = 'pcm.raw'

MP2TSME displays the following status information when the transport stream has been created:

Stream CompleteRun Time = 96 secondsOutput file size = 900119748 bytesDuration (hh:mm:ss) = 00:12:00Output bitrate = 10000000 bps0 errors, 0 warnings

Page 229: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Chapter VI

Status Messages

Page 230: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0222

Copyright © 1998 - 2010 Manzanita Systems, Inc.

6 Status Messages

The MP2TSME Multiplexer has two levels of problem reporting, errors and warnings. The error and warning messages and theconditions that generate them are identical whether you are running the Multiplexer from within the MP2TSME UI or from thecommand line.

All errors are considered to be fatal conditions. The StopOnError Parameter determines how the Multiplexer behaves when anerror condition is encountered. If the "Yes" option is selected, then the Multiplexer will halt execution when the first errorcondition is detected. If the "No" option is selected, then the Multiplexer will continue processing while errors are issued.

A warning is issued when an event is encountered while generating the output transport stream that might be a problem andshould be looked at more closely. Warnings will be reported if the Multiplexer detects significant changes in the characteristicsof an input elementary stream. For example, if a bit rate change is detected in the middle of an audio elementary stream, theMultiplexer will display a warning message. In this case, the user may or may not be aware of the bit rate change, but thewarning message is an alert that there is an anomaly in the stream. The StopOnWarning Parameter determines how theMultiplexer behaves when a warning condition is encountered. If the "Yes" option is selected, then the Multiplexer will haltexecution when the first warning condition is detected. If the "No" option is selected, then the Multiplexer will continueprocessing while warnings are issued.

The following sections in this chapter give detailed descriptions of all MP2TSME status messages:

· Error Messages

· Warning Messages

6.1 Error Messages

In the list below, the error message that is displayed by MP2TSME is given in boldface Courier font. Italicized font in themessage represents variable text that will be replaced with specific information at the time that the message is generated. Abrief explanation and possible solutions to the problem are also given.

The following error messages may be reported by the Multiplexer:

Additional output files required. When using multiple output files, the Multiplexer required more files than werespecified to accommodate the size of the generated output transport stream. The rest of the output was lost. Specify moreoutput filenames using the Files Parameter and run the Multiplexer again.

Audio decoder delay too long at N frames. The Multiplexer detected a condition where there are too many framesaccumulating in the decoder. This is most likely caused by a delay that is too long. The MPEG specification requires that datadoes not sit in the decoder buffer for longer than one second. Shorten the delay using the Delay Parameter and run theMultiplexer again.

Audio encoder frame limit reached at N frames. The Multiplexer's internal frame buffer has reached its limit.This is typically the result of a chronic underflow situation when the output stream has not been configured properly. Re-examine the stream configuration and run the Multiplexer again.

Audio file did not start with sync frame. First byte = 0xXX. The first byte of an audio input file was notthe first byte of an audio sync frame. The audio file may be corrupted.

Audio frame size is larger than standard decoder buffer. High bit rate AC-3 streams will not fit in the MPEGaudio decoder buffer. Either specify a larger audio buffer size or use the ATSC or DVB buffer model.

Audio lost sync in input file. Saw 0xXX, should be 0x0B. The 0x0B sync frame header byte was notfound as expected at the beginning of a sync frame that was read from an AC-3 audio input file. The input file may becorrupted.

Audio lost sync in input file. Saw 0xXX, should be 0x77. The 0x77 sync frame header byte was not foundas expected at the beginning of a sync frame that was read from an AC-3 audio input file. The input file may be corrupted.

Page 231: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Status Messages 223

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Audio lost sync in input file. Saw 0xXX, should be 0xF0. The 0xF0 sync frame header byte was not foundas expected at the beginning of a sync frame that was read from an MPEG audio input file. The input file may be corrupted.

Audio lost sync in input file. Saw 0xXX, should be 0xFF. The 0xFF sync frame header byte was not foundas expected at the beginning of a sync frame that was read from an MPEG audio input file. The input file may be corrupted.

Audio lost sync in input file. Saw 0xXX, should be 0xE0. The 0xE0 sync frame header byte was not foundas expected at the beginning of a sync frame that was read from an HE-AAC audio input file. The input file may be corrupted.

Audio lost sync in input file. Saw 0xXX, should be 0x56. The 0x56 sync frame header byte was not foundas expected at the beginning of a sync frame that was read from an HE-AAC audio input file. The input file may be corrupted.

Audio never acquired. An audio sync frame was not seen in the first 60 kB of data. The input stream does not look likebinary audio data. The data must be either an MPEG, AC-3, or DTS audio elementary stream. The audio file may becorrupted.

Audio stream input file open error. Filename = [path and name]. MP2TSME could not open the specifiedinput audio file. Check the filename and path.

Automatic PCRPID assignment failed for ProgramNumber N. The PCR PID is automatically assigned to the firstvideo PID in the program. If there isn't any video, then the first Audio PID is used. If there isn't any audio, then the user mustexplicitly specify the PCR PID.

AUX packet V overrun. The AUXV data for the HDV mode HD2 overflowed the internal multiplexing buffer. This is usuallycaused by a difference in the duration of the audio and video elementary streams. Make sure the input streams have the sameduration and try again.

AVsync: Excessive skew between A/V timing. The AVsync option has been enabled and MP2TSME is trying tomaintain lip sync across the file transitions, but it is seeing too much of a difference between the audio and video duration at thefile transition. This could be caused by one or more segments with different duration audio and video components. The AVsyncoption can only make minor adjustments to the audio or video duration to maintain lip sync. If the durations are excessive, thelip sync can not be maintained. The streams need to be corrected, possibly re-encoded, and try again.

Bad duration format. Should be hh:mm:ss:ff. The multiplex duration must be specified in the form of hours :minutes : seconds : frames or hours : minutes : seconds . frames. The most significant values are optional, and may be omitted.White space is ignored.

Both Source Stream ID and PID were specified; only one allowed. Both the SourceStreamID andSourceTSPID Parameters were specified. The presence of the SourceStreamID Parameter indicates that the input file is anMPEG-1 system stream or an MPEG-2 program stream. The presence of the SourceTSPID Parameter indicates that the inputfile is an MPEG-2 transport stream. Both parameters cannot be used to describe an input file. Remove the incorrect parameterand try again.

Closed caption file open error. Filename = string. The specified closed caption file could not be opened.

Closed caption file write error. The closed caption file could not be written. Check output location, permissions, orspace available.

Closed caption insertion failed, too many reordered frames. The product does not support reordering of thenumber of pictures found in the provided video elementary stream, and captions could not be inserted.

Closed caption video input buffer overflowed. The product's video reordering buffer is too small to supportclosed caption insertion or extraction with the provided video elementary stream.

Configuration File did not contain a Transport Section. A Transport Section is required in the configurationfile. Fix the file and run the Multiplexer again.

Could not open SCTE35 file [path and name]. The specified SCTE35 definition file could not be located or opened.The file might not be present, or its access controls could be preventing it from being opened.

Data stream file read error. An error occurred when attempting to read from the input binary file for a prepacketizeddata stream. This may occur if the file size is less than 188 bytes, or the file is not a binary file. Check the file and try again.

Data stream input file open error. Filename = [path and name]. The Multiplexer could not open thespecified input file. Check the filename and path.

Page 232: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0224

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Data stream invalid packet, sync byte not found. A packet was read from the input binary file for aprepacketized data stream and the first byte of the packet was not an MPEG-2 sync byte (0x47). Prepacketized data streamfiles must be in binary format, must begin with the first byte of a transport packet, and must contain contiguous transportpackets.

Descriptors limited to 256 bytes, DescriptorN too large. The Nth descriptor listed in a section exceeded the256 byte limit. If multiple descriptors have been included in this single DescriptorN Parameter, they should instead be broken upinto separate DescriptorN Parameters.

DTS audio lost sync at N byte of header. The audio data is corrupted and was unable to find the next frame. Theinput audio file may have to be re-encoded.

DVS157 captions cannot be inserted into AVC video. The product does not support insertion of DVS157captions into AVC video.

E-AC3 substream underflow. An Enhanced AC-3 stream with an insufficient number of substreams was seen. This ismost likely caused by a defective elementary stream. Fix the stream and try again.

Error parsing AC-3 Audio with timecodes. Try removing the timecodes or re-encoding the elementary streamwithout timecodes and run the Multiplexer again.

Error parsing audio descriptor. Descriptors must be in hexadecimal format with no "0x" prefix. See the audioDescriptors parameter description.

Error parsing data descriptor. Descriptors must be in hexadecimal format with no "0x" prefix. See the dataDescriptors parameter description.

Error parsing MPEG-4 Audio frame. An illegal MPEG-4 audio frame was encountered. The elementary stream is mostlikely bad. Re-encode the stream and try again.

Error parsing parameter value in line: N. There was an error while parsing the specified line in the configurationfile. This can be caused by improper characters (letters for a number field, etc.) or an unrecognized word ("y" for a field thataccepts "Yes" or "No", etc). Examine the line, correct and try again.

Error parsing private_stream_1 descriptor. Descriptors must be in hexadecimal format with no "0x" prefix. See thedata Descriptors parameter description.

Error parsing program descriptor. Descriptors must be in hexadecimal format with no "0x" prefix. See the ProgramDescriptors parameter description.

Error parsing SIT service descriptor. Descriptors must be in hexadecimal format with no "0x" prefix. See theSITSvcDescr parameter description.

Error parsing SIT transmission info descriptor. Descriptors must be in hexadecimal format with no "0x" prefix.See the SITTransDescr parameter description.

Error parsing SCTE35 descriptor. Descriptors must be in hexadecimal format with no "0x" prefix. See the dataDescriptors parameter description.

Error parsing SMPTE302M descriptor. Descriptors must be in hexadecimal format with no "0x" prefix. See theSMPTE302M Descriptors parameter description.

Error parsing table PMT descriptor. Descriptors should be specified as hexadecimal data bytes with either a spaceor no delimiter. Examples: 00 01 02 03 or 00010203. Correct and try again

Error parsing video descriptor. Descriptors must be in hexadecimal format with no "0x" prefix. See the VideoDescriptors parameter description.

Error writing null packet to output file. This error will be reported if the output device is full. Check theavailable space on the destination hard drive and try again.

Error writing to output file. This error will be reported if the output device is full. Check the available space on thedestination hard drive and try again.

Page 233: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Status Messages 225

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Failed parse of SCTE35 file [path and name]. The SCTE35 definition file does not follow the prescribed format.Some explanatory text will be included.

Illegal time Format. Should be hh:mm:ss:ff. The time must be specified in the form of hours : minutes :seconds : frames (NDFTC) or hours : minutes : seconds . frames (DFTC). DFTC format is only valid for the DurationParameter. The most significant values are optional, and may be omitted.

Illegal Video frame type seen; aborting. The elementary stream is illegal. Fix the stream and run again.

Illegal Video frame rate code seen; aborting. The elementary stream is illegal. Fix the stream and run again.

Input file read error. The input file could not be opened for reading. This could be caused if the permissions for theinput file do not permit reading, or if it has a non-existent path. Verify the input file path and name.

Initial delay > 1 second. Invalid stream. The initial decode delay for this stream was greater than one second.The MPEG specification requires that the decode delay always be less than one second. Shorten the delay using the DelayParameter and run again.

License Expired. The program was licensed under a limited time license and the license has expired.

License not found, key A = [key value]. No license was found for this program. If you have a dongle, make surethe dongle drivers are installed. This was an option during the installation of the program. If you do not have a dongle, then youwill need a software key. Please report this key A to Manzanita with your serial number, company name and contact information.Manzanita will respond with a key B to activate the program.

License not found, expired or invalid. The program was licensed under a time-limited evaluation license and thelicense has expired, the license file can not be found, or the license key is invalid. The evaluation license was provided byManzanita Systems and the file should be placed in the same directory as the program. If the license has expired, pleasecontact Manzanita to purchase the full product.

MaxPESlen and PESalign can not both be set. If the PESalign feature is required, then the maxPESlen feature cannot be used. Disable one of the two features.

Minimum maxPESlen value is 184. The lower limit of the maximum PES length is 184, effectively forcing a PES headeron every packet.

MPEG-4/h.264/AVC frame rate not found. MP2TSME requires timing information to be present in the stream in orderto create a valid transport stream. The input AVC stream does not have all the timing information needed. If the stream can notbe corrected you can specify the frame_rate using the FrameRate Parameter in the timing section of the video parameter GUI.

MPEG-4/h.264/AVC level_idc = N, not found. The AVC stream looks invalid, or the Multiplexer does not recognizethe level. Verify the validity of the stream.

MPEG-4 part 2 video frame rate not specified. The video stream does not indicate the frame rate of the video.The frame rate is needed by the Multiplexer to generate the decoder timing. Either re-encode the video and make sure theencoder includes the frame rate, or specify the frame rate in the video timing parameters and run the Multiplexer again.

Multiple output files specified without a size. The option to support multiple output files requires that the sizeof the output files be specified. Include the FileSize Parameter and run the Multiplexer again.

No Audio input file given for program N. An Audio Section was listed for this program, but no input audio streamfile was specified. There must be either a File or a set of multiple FileN Parameters to specify the input file(s) in each AudioSubsection that is present, unless the audio filename is specified on the command line with the File I/O Override.

No data files specified. There were wasn't a File Parameter in a Data Section of the configuration file. The FileParameter is required to specify the input data. Add a File Parameter and run the Multiplexer again.

No Data stream input file given for data stream N. A Data Section was listed for this program, but no inputdata stream file was specified. There must be either a File or a set of multiple FileN Parameters to specify the input file(s) forthis data stream.

No input file given for SMPTE302M stream. A SMPTE302M Section is listed for this program, but no input file wasspecified. There must be either a StreamM or a set of multiple StreamMFileN Parameters to specify the input file(s) in eachSMPTE302M Subsection that is present.

Page 234: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0226

Copyright © 1998 - 2010 Manzanita Systems, Inc.

No output file specified. An output file was not specified. The Multiplexer requires that a file be specified to store theoutput multiplex. Add either the File Parameter for a single output file or multiple FileN Parameters for multiple output files, orspecify the output filename on the command line with the File I/O Override.

No Transport section seen. A Transport Section is required in the input configuration file. Fix the file and run again.

No Video input file given for program N. A Video Section is listed for this program, but no input video stream filewas specified. There must be either a File or a set of multiple FileN Parameters to specify the input file(s) in each VideoSubsection that is present, unless the video filename is specified on the command line with the File I/O Override.

One-time table insertion error. A problem in PSI generation may have occurred.

Only one of ATSCbuf and DVBbuf allowed. The config file may only have either the ATSCbuf Parameter or theDVBbuf Parameter, not both. Disable one or both of the parameters and run the Multiplexer again.

Out of memory. Insufficient memory is available for the program. Add memory or reduce the number of other programsrunning and run the Multiplexer again.

Output file not specified. An output file was not specified. The Multiplexer requires that a file be specified to store theoutput multiplex. Add either the File Parameter for a single output file or multiple FileN Parameters for multiple output files, orspecify the output filename on the command line with the File I/O Override.

Output file open error. Filename = [path and name]. The output file could not be opened for writing. Thiscould be caused if the output file has read-only attributes, or a non-existent path. Verify the output file path and name.

Output File size must be at least 1K bytes. The specified size for each of multiple files was less than 1024bytes. Increase the value specified for the FileSize Parameter and run the Multiplexer again.

Packet time stamps requested but PktTSBytes = N. The PktTSBytes sets the length of the inserted timestamp. Itmust be between 1 and 8. Correct the value and run the Multiplexer again.

PAT size = N, exceeds single section limit. The size of the PAT for this multiplex exceeds 1024 bytes, which isthe maximum size of a single section PAT. The current version of the Multiplexer supports only single section PATs.

Pes Private Data file open error. The specified file could not be opened, check the path and permissions.

PESPrivateData File read parsing error: count. The count parameter was not parsed correctly. The countshould be an integer value.

PESPrivateData File read parsing error: data. The hex data was not parsed correctly. The data should besufficient hex data bytes for the type of private data being inserted.

PESPrivateData File read parsing error: ext2. The mode value was not parsed correctly. The mode should bean integer, either 0 or 1.

PESPrivateData File read parsing error: time. The time parameter was not parsed correctly. The time shouldbe a floating point number specifying the time in seconds or access unit count.

PESPrivateData File read parsing error: type. The type parameter was not read correctly. The type should beeither 'time' or 'index', no other types are supported. The type should be the first word on the line.

PMT size = N, exceeds single section limit. The size of a PMT in this multiplex exceeds 1024 bytes, which is themaximum size of a single section PMT. The MPEG specification limits the PMT to a single section. The number of streams orsize of the descriptors must be decreased for this program to reduce the size of the PMT.

Private_stream_1 buffer size is not defined. The DBsize parameter has not been defined, and could not bedetermined from the private_stream_1 data type or a metadata_STD descriptor.

Private_stream_1 includes too long file name: [string]. A data file referenced by an index file has a filename that is too long. Try moving the index and data files to a directory that is closer to the root directory, or whose name isshorter.

Private_stream_1 index parse failure: [string]. The private stream 1 data file could not be parsed. Perhaps itis not a private_stream_1 data file. The line number of the error and a diagnostic message is printed.

Private_stream_1 index references unopenable file: [string]. Can occur when private_stream_1 index and

Page 235: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Status Messages 227

Copyright © 1998 - 2010 Manzanita Systems, Inc.

data are in separate files, and the index refers to the data file(s). Data files must be in the same directory as the index file.

Private_stream_1 index requires more data than available. The end of an index or data file was reached, butmore data is expected. The file has probably been truncated.

Private_stream_1 rate not set, could not be determined. The appropriate rate for the private stream 1 data

could not be determined. Set the rate.

Private_stream_1 requests SyncVideoTC; video timecode not found. The SyncVideoTC option was selected,but the video elementary stream could not be found or does not contain video timecodes.

Private_stream_1 seek failed in file: [string]. A consolidated index and data file does not include enoughdata to satisfy an index, or a filesystem error has occurred.

Private_stream_1 SyncVideoTC and video frame rate mismatch. The SyncVideoTC option was selected, butthe frame rate of the video and the frame rate of the source material from which the private stream 1 data was generated do notmatch. This can occur if the subtitle data was obtained from a PAL source, but is now being multiplexed with NTSC video, orvice versa.

Private_stream_1 type is unknown, could not be remultiplexed. For a remux, the private_stream_1 couldnot be identified as one of the supported types (currently DVB subtitle or DVB teletext).

Private_stream_1 with frameDataFunction requires DBsize set. If a frameDataFunction is provided forprivate_stream_1 multiplexing, then the DBsize parameter must be set in the configuration.

PSIPATrep = N, must be greater than zero. The value given to the PSIPATrep Parameter that was listed in theconfiguration file was less than or equal to zero. PSIPATrep must be specified with a non-negative value.

PSIPMTrep = N, must be greater than zero. The value given to the PSIPMTrep Parameter that was listed in theconfiguration file was less than or equal to zero. PSIPMTrep must be specified with a non-negative value.

Rate Parameter must be specified for a Data Stream. The Rate Parameter was not specified for aprepacketized data stream that was listed in the configuration file. Specify the rate and run the Multiplexer again.

Remultiplexing SMPTE302M only supported with one stream. When remultiplexing a transport stream containingSMPTE302M streams, the SMPTE302M stream must contain only one two-channel AES3 or PCM data stream. RemultiplexingSMPTE302M streams with multiple two-channel streams is not supported.

Repeated Data Stream input filename not found. The first input filename listed in the configuration file for thisprepacketized data stream was not found during the repeated file open. This can happen if the configuration file is altered whilethe Multiplexer is running.

SCTE35 segmentation events starting seg_upid N too long. There are too many segmentation events beingincluded in a single segmentation_point, beginning at the seg_upid indicated.

SkipFrames = N, must be greater than or equal to zero. The value given to a SkipFrames Parameter that waslisted in the configuration file was less than zero. SkipFrames must be specified with a non-negative integer value.

SMPTE302M BytesPerWord must be 1, 2, 3 or 4. The input word size is limited to one to four bytes. Correct and tryagain.

SMPTE302M Channel Status must be 24 bytes long. The channel status data is 24 bytes. Correct and try again.

SMPTE302M reference video is invalid. The video stream referenced by this SMPTE stream is not valid and can notbe used.

SMPTE302M reference video PID not found. The PID specified for the reference video stream was not found.Correct and try again.

SMPTE302M stream input file open error. Filename = [path and filename]. The input file specified forthis stream could not be opened for reading. Check the path, file name, and file permissions, and try again.

SMPTE302M stream must have PCR in program. The program containing this SMPTE 302M stream does not have aPCR. Specify a PCR PID and try again.

Page 236: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0228

Copyright © 1998 - 2010 Manzanita Systems, Inc.

SMPTE302M stream must have PID specified. The PID was not specified for this SMPTE 302M stream. Specify aPID and try again.

SMPTE302M stream must have reference video. Timing for the SMPTE 302M stream is derived from a referencevideo stream. Specify the reference video with the RefVidPID Parameter and try again.

SMPTE302M streams can not carry the PCR. This version of MP2TSME does not support having the PCR on thesame PID as the SMPTE 302M data. Specify a different PCR PID and try again.

StreamDelay = N, must be greater than or equal to zero. The value given to a StreamDelay Parameter thatwas listed in the configuration file was less than zero. StreamDelay must be specified with a non-negative integer value.

Stream input file open error. Filename = [path and filename]. There were multiple input files specifiedfor this stream and the specified file could not be found.

Table Data Streams can not carry the PCR. The PCR can not be inserted into a table data stream.

TablesPerSecond parameter must be specified for a Table stream. Table Data streams require theTablePerSecond Parameter to specify a rate to insert the tables into the transport stream in tables per second.

Table stream packetization error # N. An internal error occurred while converting the table data to a packet stream.Verify the table data is valid and try again.

Table stream without table data. A table stream was in the configuration, but the stream did not have any tabledata. Please define one or more tables for the table stream and run the Multiplexer again.

Table stream without table data array. Table Data streams require at least one table be defined for insertion.None was specified in the Table Data configuration.

Terminated stream requires video or audio in 1st program. The first program in the transport stream did notcontain any video or audio elementary streams. When a stream is terminated, the process is performed on the first program. This program must contain at least one video or one audio elementary stream in order to be terminated.

Terminated stream requires duration to be specified. The Duration Parameter is required if the TerminateParameter is enabled. MP2TSME must be given the desired duration of the stream to be terminated. The Duration Parametermust be specified, or the termination feature must be disabled for this stream.

Too many audio subsections. More than 64 Audio Subsections were included in a Program Section of a configurationfile. MP2TSME supports a maximum of 64 audio elementary streams per program.

Too many data subsections. More than 64 Data Subsections were included in a Program Section of a configuration file.MP2TSME supports a maximum of 64 data streams per program.

Too many descriptors. More than 32 Descriptor parameters were included in a Section or Subsection of a configurationfile. MP2TSME supports a maximum of 32 descriptors of a given type.

Too many private_stream_1 subsections. More than 16 PrivateStream1Data Subsections were included in aProgram Section of a configuration file. MP2TSME supports a maximum of 16 Private Streams per program.

Too many program sections. More than 65,535 Program Sections were included in a configuration file. MP2TSMEsupports a maximum of 65,535 programs in a transport stream configuration.

Too many SCTE35 subsections. More than four SCTE35Data Subsections were included in a Program Section of aconfiguration file. MP2TSME supports a maximum of four SCTE 35 Data streams per program.

Too many SMPTE302M subsections. More than 16 SMPTE302M Subsections were included in a Program Section of aconfiguration file. MP2TSME supports a maximum of 16 SMPTE302M data streams per program.

Too many table sections. Up to 64 table data streams may be multiplexed in a program or at the transport level.Reduce the number and run the Multiplexer again.

Too many video subsections. More than 16 Video Subsections were included in a Program Section of a configurationfile. MP2TSME supports a maximum of 16 video elementary streams per program.

Transport stream duration limited to 24 hours. The Duration Parameter is limited to a 24 hour transport stream

Page 237: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Status Messages 229

Copyright © 1998 - 2010 Manzanita Systems, Inc.

duration. If a longer stream is required, the stream should be broken up into multiple streams and concatenated. Optionally, alonger stream can be generated if the Duration Parameter is not specified.

Unrecognized parameter seen in line: N. MP2TSME does not recognize a parameter that is specified in a line ofthe input configuration file.

VBR transport streams are limited to one program. MPEG only supports creation of transport streams whichare VBR carrying a single time base. MP2TSM does not support multiple program VBR streams.

VBR transport streams must have a PCR PID. VBR Transport streams must have a PCR to indicate the rate andsystem time.

Video access unit size exceeded adjusted vbv size. An access unit was seen that was too large to safely fit inthe standard MPEG decoder. Either re-encode the video stream or override the decoder buffer size with using the DBsizeParameter.

Video AUX array full; data lost. The AUXV data for the HDV mode HD2 overflowed the internal multiplexing buffer.This is usually caused by a difference in the duration of the audio and video elementary streams. Make sure the input streamshave the same duration and try again.

Video decoder delay too long at N pictures. The Multiplexer detected a condition where there are too manyframes accumulating in the decoder. This is most likely caused by a delay that is too long. The MPEG specification requiresthat data does not sit in the decoder buffer for longer than one second. Shorten the delay using the Delay Parameter or use alower bitrate for this video stream and run the Multiplexer again.

Video encoder frame limit reached at N frames. The Multiplexer's internal frame buffer has reached its limit.This is typically the result of a chronic underflow situation when the output stream has not been configured properly. Re-examine the transport stream configuration and try again.

Video internal decoder underflow (22). A buffer overrun may have occurred in the Multiplexer. This is typically theresult of a chronic underflow situation when the output stream has not been configured properly. Re-examine the transportstream configuration and try again.

Video internal encoder underflow (21). A buffer overrun may have occurred in the Multiplexer. This is typically theresult of a chronic underflow situation when the output stream has not been configured properly. Re-examine the transportstream configuration and try again.

Video never acquired. A sequence header, sequence extension, picture header and picture extension were not seen atthe beginning of the video input file. The video input file must be in binary format, and the first byte of the file must the first byteof an access unit. This first access unit should begin with a sequence header and should be encoded as an I frame. This errorwill also be reported when a start time is specified that does not occur.

Video profile or level is reserved. The value assigned as profile or level in the MPEG-2 video elementary streamsyntax is a reserved value. The video stream may need to be re-encoded.

Video started with MPEG-1 and changed to MPEG-2. The elementary stream is not legal. Fix the stream and runthe Multiplexer again.

Video stream input file open error. Filename = [path and name]. The Multiplexer could not open thespecified input file. Check the filename and path.

Page 238: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0230

Copyright © 1998 - 2010 Manzanita Systems, Inc.

6.2 Warning Messages

In the list below, the warning message that is displayed by MP2TSME is given in boldface Courier font. Italicized font in themessage represents variable text that will be replaced with specific information at the time that the message is generated. Abrief explanation and possible solutions to the problem are also given.

The following warning messages may be reported by MP2TSME:

Advance delivery of SCTE35 segmentation id N not possible, possibly late. An SCTE35 segmentationpoint's activation time was not far enough in the future for it to be delivered in advance by the configured AdvanceTime. It wasinserted in the stream as early as possible, but downstream equipment may not have sufficient time to react.

Advance delivery of SCTE35 splice id N not possible, possibly late. An SCTE35 splice point's activationtime was not far enough in the future for it to be delivered in advance by the configured AdvanceTime. It was inserted in thestream as early as possible, but downstream equipment may not have sufficient time to react.

Audio decoder underflow by N bytes. While creating the transport stream, the Multiplexer verifies the decoder bufferlevels. In doing so an underflow was detected. The transport stream should be created again with corrections. Some possiblefixes to this problem are increasing the initial delay via the Delay Parameter, or changing the audio stream bitrate with the RateParameter. The audio stream is usually tied to the video to have the first audio access unit presented at the same time as thefirst video access unit. If this has been disabled with the IndDelay Parameter, then the delay may have been set too short. Ifthe audio is tied to the video, then the video delay should be increased. By increasing the video delay, the audio delay willincrease also.

Audio frame size code changed to N. This is to inform the user that the audio frame size code changed during thestream. If this is not expected, then the input stream may be corrupted. If the audio bitrate has increased, and the output ratewas not set to allow for this, then buffer problems may occur shortly after this point in the stream. If the audio rate increases,the operator must insure that there is adequate bandwidth in the multiplex for the increase.

Audio PES length incorrect by N bytes. There may have been a problem when the Multiplexer created a PESheader.

Audio PES length too large by N bytes. There may have been a problem when the Multiplexer created a PESheader.

Audio sample rate code changed to N. This is to inform the operator that the audio sample rate code changed duringthe stream. If this is not expected, then the input stream may be corrupted.

Audio transition cleanup failed. TransitionCleanUp was enabled and an error occurred while the Multiplexer wasdeleting some partial access units. The resulting stream is most likely invalid.

AUX packet PES already sent or no more video. While creating an HDV stream in mode HD2, AUX data wascreated but the A/V association could not be completed. This is typically caused by either the video or audio stream endingearly. Make sure the input streams are of the same duration and try again.

AUX packet A TS earlier than AUX V TS. While creating an HDV stream in mode HD2, AUX data was created but theA/V association could not be completed. This is typically caused by either the video or audio stream ending early. Make sure theinput streams are of the same duration and try again.

Audio PES length incorrect by N bytes. There may have been a problem when the Multiplexer created a PESheader.

AVC dpb output delay = N; ignoring all SEI CPB DPB timing info. The decoder picture buffer output delayis specified in units of number of fields. While multiplexing this stream, a dpb delay was seen which was too large, which wouldresult in timing violations. This is not a valid stream. The Multiplexer is ignoring all SEI CPB DPB timing information because itis not reliable. The stream should be corrected and remultiplexed.

AVC fixed_frame_rate_flag = 0 or not present. (frame rate N fps). MP2TSME only supports constantframe rate video. The video was multiplexed assuming it was constant frame rate. If this is not true, then the output stream willbe invalid. The video should be re-encoded at a constant frame rate and remultiplexed.

AVC POC incorrect: bad video, try again with IgnorePOC=Yes. While generating the timing for this stream, itwas determined that the picture order count (POC) values in the AVC stream were not valid. The stream can not be multiplexedusing the POC values for timing. Either fix the stream or run again with IgnorePOC = Yes to prevent the Multiplexer from using

Page 239: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Status Messages 231

Copyright © 1998 - 2010 Manzanita Systems, Inc.

the POC values.

AVC reorder depth changed, gap in output pictures, try IgnorePOC=Yes. While multiplexing the stream, achange in the depth of the reorder delay was detected. This can happen if a stream begins with a shallow reorder delay, thenlater a longer delay is used. The Multiplexer can not know by looking at the beginning of the file that the stream characteristicswill change later in the file. The timing of this stream is invalid. Try muxing again with IgnorePOC = YES to prevent theMultiplexer from using the POC timing information, in which case other methods to derive the stream timing will be used.

AVC SEI alignment error; probably invalid stream. Marker bits were not seen where they were expected in anSEI message. This could be the indication of an invalid stream. If the stream does not play, re-encode and try again.

AVC stream didn't indicate bit rate; used maximum rate N bps. If the AVC elementary stream does notinclude the bit rate then the Multiplexerwill use the maximum rate for the profile and level of the stream. This may result in anexcessively large file. The bit rate, if known, should be specified in the video parameters.

AVC stream has B pictures: set NotLowDelay to prevent timing errors. B pictures were encountered laterin the stream after the Multiplexer started outputting data assuming that no reorder delay was required. The output stream isnot valid. Set NotLowDelay = Yes to force the Multiplexer to insert a reorder delay for the B frames and remux.

AVsync initial adjustment of audio failed: check lip sync. The first segment being remultiplexed had anexcessive difference between the commencing of audio and video. Fix the segment and try again.

AVsync initial audio adjustment = N seconds. The first segment being remultiplexed had an excessive differencebetween the commencing of audio and video. Fix the segment and try again.

B frame seen in Low Delay video sequence. The elementary stream is illegal.

Bad data after audio transition. While remultiplexing an audio stream, audio sync was lost after the transition. Fixthe stream and try again.

Burst Nulls enabled, but both count and spacing not specified. When BurstNulls is enabled, bothBurstNullsCount and BurstNullsSpacing must be specified (non-zero)

Burst Nulls not allowed with VBR output. The output TS is VBR, which does not include any null packets. Theburst nulls feature does not work in VBR streams and is disabled.

Components exceed configured transport rate by N bps. The aggregate bitrate of all of the component streamsis greater than the specified output rate. The resulting stream may not be MPEG-2 compliant.

Compute minimum video rate only works with file input. The option to compute the minimum required rate fora video stream only works when the video is read from a file. This is a two pass process and the mux needs to rewind the fileand read it a second time after determining the video stream rate. The input is not a file, so the minimum rate was notcomputed.

Compute minimum rate failed with code N, using stream rate. The mux could not compute the minimum rate.The error codes are:

-1 VR_ERR_FILE Input file open error-2 VR_ERR_MEMORY Cannot allocate memory-3 VR_ERR_TS Input is a transport stream-4 VR_ERR_NON_VIDEO_SC Input had non-video start codes (PS, SS or PES)-5 VR_ERR_NO_FRAMERATE Input does not indicate frame rate (H.264)-6 VR_ERR_FRAMEDUR Input H.264 video has frame duration > 1 second-7 VR_ERR_CALC Rate calculation failed

Could find no data for private_stream_1, not multiplexed. No private stream 1 data was found in or referredto by the input file.

Demo version uses a fixed duration of 10 seconds. Because the Demo version of MP2TSME has a fixedoutput duration of 10 seconds, this warning will be used if the user sets the Duration to a value longer than 10 seconds.

Demultiplexer issued warning #N. A warning was issued by the demultiplexer when an input file is a system, program,or transport stream. The possible warning numbers and their meanings are: 8 = Transport Packets never seen; 9 = Transportsync byte not seen. Indicates a corrupted transport stream; 10 = PES header size exceeded one packet. The stream cannotbe demultiplexed by MP2TSME; 18 = Illegal packet header. The syntax of a packet header did not meet the MPEG spec, the

Page 240: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0232

Copyright © 1998 - 2010 Manzanita Systems, Inc.

stream is illegal; 19 = demultiplexer buffer error. Data was most likely lost in the demultiplexing process.

DescFromData applies only for a remux; it will be ignored. DescFromData causes descriptors related to theprivate_stream_1 data in the original transport stream to be placed in the remuxed output. It cannot apply when the source forthe mux is not a transport stream.

DescFromData is set; any other defined descriptors are ignored. The DescFromData parameter was setto yes so descriptors defined by the Descriptor Parameter will be ignored and only descriptors extracted from the input transportstream that pertain to the elementary stream will be inserted in the output PMT.

DescFromData is valid only for remultiplex (SrcTSPID != 0). The SrcTSPID was set to 0, which indicatesthat the source of the input stream is not in a transport stream multiplex, but the DescFromData Parameter is set to Yes. TheDescFromData should only be used when remultiplexing. DescFromData will cause any of the original transport stream'sPMT descriptors associated with the given elementary stream to be transferred to the PMT that describes that stream in theremultiplexed transport stream. A standalone elementary stream does not contain PMTs. Thus, DescFromData cannot beused for a standalone stream. It can only be used when remultiplexing--the source of the elementary stream is a transportstream.

DescFromFile cannot apply to a remux; it will be ignored. DescFromFile causes descriptors from theprivate_stream_1 input file to be placed in the multiplexed output; such a file is not used during a remux.

DescFromFile is set; any other defined descriptors are ignored. The DescFromFile parameter was set toYes so descriptors defined by the Descriptor Parameter will be ignored and only descriptors specified in the input Private StreamData file will be inserted in the output PMT.

DescFromFile cannot apply to a remux; it will be ignored. The DescFromFile parameter was set to Yesindicating that descriptors specified in an input Private Stream Data file are to be inserted in the output PMT. However, becausethe Multiplexer is configured to remultiplex the private stream data from an input multiplex file, use of a Private Stream data filedoes not apply. The DescFromData option can be used to accomplish something similar.

Descriptor length(s) incorrect: program_number=N. The user provided descriptors for this program haveincorrect length fields. This may cause decoding problems and should be corrected.

DTS nblks changed to N. This can be caused by corrupted DTS audio or a change in the DTS coding. If this is followed bya loss of sync, then the input stream is corrupted. If there is no loss of sync, then this is informational and may be ignored if it isexpected.

DTS Fsize changed to N. This can be caused by corrupted DTS audio or a change in the DTS coding. If this is followed bya loss of sync, then the input stream is corrupted. If there is no loss of sync, then this is informational and may be ignored if it isexpected.

DTVCC inline synthesis was requested, but no captions were found. No existing analog-compatiblecaptions were found in the video, so no digital captions were generated.

Elementary data looks like transport. The input file for this PID looks like a transport stream. Please verify that theinput is an elementary stream and if not, either demux the payload prior to multiplexing, or configure the multiplexer to remux thetransport stream.

Elementary stream PID = 0xN, illegal value. An elementary stream PID was given an illegal value. The streamwill still be generated, however it will not be compliant with the MPEG-2 specification. The elementary stream PID should be inthe range 0x0010 - 0x1FFE.

Elementary Stream in PID 0xN may be too short. The elementary stream in the specified PID ended at or prior tothe termination point. In general the length of the elementary stream should be longer, requiring MP2TSME to cut theelementary stream at the termination point. If the elementary stream is the exact length required, then this warning can beignored. It is safer to provide a longer than necessary elementary stream and allow MP2TSM to remove the excess data at theend.

End timecode not seen before end of video. The End parameter was set specifying an end timecode for stoppingthe Multiplexer. The end of video was reached without seeing this time code. The video was multiplexed through the end of theinput data.

Enhanced AC-3 data changed to regular AC-3. The audio changed from enhanced AC-3 (Dolby Digital plus, DD+) toregular AC-3 (Dolby Digital, DD). If this was not expected, then the audio is likely corrupted. The stream should be fixed andmultiplexed again.

Page 241: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Status Messages 233

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Error parsing PES Private Data File: bad syntax; ignored. The PES Private Data file should be a text file,the format is defined in a loadPesPvtFile .

Frame size changes, assuming VBR stream and suppressing warnings. This warning will be issued if there aremultiple audio frame size changes encountered while processing the stream. The multiplexer is assuming the audio elementarystream is VBR and further frame size warnings will be suppressed. If the audio is VBR, these warnings can be ignored. Ifunderflows are reported, then the audio rate should be set to the max expected for the audio stream.

Insufficient data for table %d (3 bytes minimum). A user provided table was less than 3 bytes in length. Theminimum table length is 3 bytes in order to include the table_id and length fields.

Maximum descriptors exceeded: N, only some will be transferred. An excessive number of descriptors wereencountered and some were dropped.

MPEG audio type changed to N. This is to inform the operator that the MPEG audio type changed during the stream. Ifthis is not expected, then the input stream may be corrupted. If the audio bitrate has increased, and the output rate was not setto allow for this, then buffer problems may occur shortly after this point in the stream. If the audio rate increases, the operatormust insure that there is adequate bandwidth in the multiplex for the increase.

MPEG-4/h.264/AVC non-standard frame rate. AVC supports almost any frame rate. Standard television supports avery limited set of frame rates. The input video stream is using a frame rate which is not equal to one of the standard framerates. If this is not expected, then the video should be fixed and remultiplexed.

MPEG-4 Audio channelConfiguration changed to N. There was a change in the characteristics of the MPEG-4audio stream. If this was not expected, then the stream is likely corrupted. The stream should be corrected and remultiplexed.

MPEG-4 Audio sampleRate changed to N. There was a change in the characteristics of the MPEG-4 audio stream. Ifthis was not expected, then the stream is likely corrupted. The stream should be corrected and remultiplexed.

MPEG-4 Audio samplesPerFrame changed to N. There was a change in the characteristics of the MPEG-4 audiostream. If this was not expected, then the stream is likely corrupted. The stream should be corrected and remultiplexed.

MPEG-4 part 2 video didn't indicate bit rate; used max N bps. If the video elementary stream does notinclude the bit rate, then the Multiplexer will use the maximum rate for the profile and level of the stream. This may result in anexcessively large file. The bit rate, if known, should be specified in the video parameters.

MPEG-4 part 2 video unsupported profile and level = 0xN. The profile and/or level are not supported byMP2TSME. This may be an invalid stream.

No block data - quitting. The Multiplexer was set up in a block processing mode and block data was not provided.

No SCTE35 splice/segmentation points were defined. No splice/segmentation points were defined in thedefinition file. The file might be empty.

Only first program in multiple program stream is terminated. The termination process can set the timingfor clean transitions in only one program of a multiple program transport stream. The timing is set for the first program, otherprograms will have undefined transitions.

Output buffer overflow; data lost. During the remultiplexing of a stream, the output buffer overflowed and theelementary stream was corrupted.

Pack header does not follow program stream syntax. A program stream was being remultiplexed and the packheader did not comply with the MPEG syntax. The stream may be corrupted or may not be a program stream.

Packet size increased for time stamp to N bytes. The PktTS Parameter was enabled but the output packet sizewas not large enough to carry the time stamp. The packet size has been increased to allow the time stamp to be written witheach packet. The PktSize parameter should be set to a value above 188 that is large enough to allow the time stamp to besaved with each packet.

Parsing SCTE35 file [path and name]. While parsing an SCTE35 definition file, a syntax error was detected. Anexplanatory message with line number is included.

PCR PID = 0xN, illegal value. The PCR PID for this program was given an illegal value. The stream will still begenerated, however it will not be compliant with the MPEG-2 specification. The PCR PID may be either 0, 1, or in the range0x0010 - 0x1FFE.

Page 242: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0234

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Picture vbv_delay fields don’t match stream rate. The StrictVBV parameter was enabled but the vbv_delayfields are not consistent with the video stream rate. This may result in underflows if the fields are in error by a large amount. The stream may be corrupted. Fix the stream or turn off StrictVBV if it is not required, and try again.

PMT PID = 0xN, illegal value. The PMT PID for this program was given an illegal value. The stream will still begenerated, however it will not be compliant with the MPEG-2 specification. The PMT PID should be in the range 0x0010 -0x1FFE.

Prepacketized Data input file empty, no packets seen. The input file for this stream was empty. Verify thereis data in the file and try again.

Private_stream_1 first N PES packets dropped; not acquisition points. PES data found or referred to atthe beginning of the input file was not multiplexed, as it did not contain acquisition information.

Private_stream_1 first N PES packets dropped; too early. The PES data found or referred to at the beginningof the input file was not multiplexed, as it had presentation times in the past.

Private_stream_1 format may be incompatible with SyncVideoTC. The SyncVideoTC option is usually selectedfor Spruce STL-derived subtitles. This warning is issued if the private_stream_1 index file does not indicate that the sourcematerial for the data was a Spruce STL subtitle definition file.

Private_stream_1 max data rate of N is > TB drain rate. The data rate is too high and will cause T-STDbuffer violations.

Private_stream_1 multiplexed with no video. Private stream 1 data contains presentation timestamps that areusually referenced from the video. This warning is generated if no video stream was multiplexed with the data.

Private_stream_1 PES length too large by N bytes. The PES data is larger than expected. The private stream 1data was incorrectly generated.

Private_stream_1 rate N too low, could not send packet before PTS. The private stream 1 data rate is toolow and a packet could not be delivered before its presentation time.

Private_stream_1's first PTS is beyond last video PTS. The private stream 1 data begins after the video hasended. The TimeOffset can be used to adjust the private stream 1 timestamps to the video--enter a negative value.

Private_stream_1 underflowed, PES packet N ms late. A PES packet was delivered after its presentation time. Ifthe lateness is not significant, this might not be a problem. E.g., subititles can be slightly late and the decoder should stilldisplay them.

Private_stream_1 warning: [string]. Indicates that while parsing the private stream 1 index, a warning condition wasdetected.

ProgramNumber = N: Delayed Stream with PCRs - PCRs delayed also. The PCR PID for this program has theStreamDelay option enabled. The StreamDelay option will delay the entire stream, including the insertion of PCRs. If there areother elementary streams in this program, and they have not been delayed, then they may appear in the transport stream priorto any PCRs. In this case, the decoder may not know when to decode these other elementary streams.

ProgramN: No elementary streams seen: created empty PMT. No elementary streams were listed in theconfiguration file for this program. MP2TSME will create an empty PMT.

PSI aggregate bitrate exceeds 80kbps limit by N bps. The total rate for the PMT and the PAT PIDs exceedsthe MPEG-2 80 kbps limit for transport streams with a rate of 40 Mbps or less. This potential problem may be eliminated byreducing the PAT or PMT insertion rate.

Regular AC-3 data changed to Enhanced AC-3. The syntax of the AC-3 audio changed from regular Dolby DigitalAC-3 to Enhanced AC-3 or Dolby Digital Plus. This is not normal and is most likely the result of corrupted data or commbiningtwo files created with different parameters. This could cause problems on decoders.

SCTE35 splice/segmentation points are all before first PCR. The SCTE35 splice/segmentation points aredefined to occur before the first PCR of the multiplexed stream, so none will be present in the output.

SCTE35 rate not set, setting to 19200. If the SCTE35 data rate is not set, it will default to 19200. A lower valuecan often be used.

Page 243: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Status Messages 235

Copyright © 1998 - 2010 Manzanita Systems, Inc.

SCTE35 requires SyncVideoTC; video timecode not found. The SyncVideoTC option was selected, but no videowas present, or no video timecodes were found.

SCTE35 splice/seg id N not inserted, not enough advance time. The SCTE35 splice or segment event hadan activation time in the past, or not far enough in the future for it to be inserted.

SCTE35 splice/seg id N, not all instances inserted, not enough advance time. The SCTE35 splice orsegment event had an activation time that was not far enough in the future for all intended duplicates of the table to be inserted,but the ones with the shortest AdvanceTimes were inserted.

SMPTE302M Channel Status CRC should have been 0xNN. The user defined channel status had a CRC that was notcorrect. The correct value is provided.

SMPTE302M input changed characteristics. While remultiplexing a transport stream with SMPTE302M data, thecharacteristics of the SMPTE302M stream changed. This could be any of the following characteristics: number of channels,word size or channel_id. The characteristics of SMPTE302M streams must not change between streams being remultiplexed.

Spruce subtitles had TapeOffset TRUE, but SyncVideoTC is FALSE. The private_stream_1 data wasgenerated from a Spruce STL subtitle definition file that indicates that the timestamps are relative to the video timecodes. In thiscase, it is usually the case that the SyncVideoTC option is wanted, so a warning is issued if SyncVideoTC is not selected.

Start code didn’t start with zero. During a demultiplexing operation, an expected startcode was not seen. This ismost likely caused by a corrupted stream. Fix the file and run the Multiplexer again.

Start timecode not seen before end of video. The Start parameter was set specifying a timecode for starting theMultiplexer. The end of video was reached without seeing this time code. The video stream was not multiplexed in the outputstream.

Stream (PID = 0xN) done. A stream ended early in the multiplex.

Stream too short - unable to correctly terminate. The duration of the transport stream was too short toterminate. A minimum stream duration of 16,667 packets is required to guarantee successful termination. The output streammay not be MPEG-2 compliant. Increase the duration and try again.

Table data length field (N) doesn't match actual data count. A user provided table's length field differedfrom the actual table size. This can cause problems in the decoder and should be fixed.

Terminated stream, PID 0xN, source ended prior to stream. The terminated elementary stream was shorter induration than the requested terminated stream duration. The elementary stream must be at least as long as the DurationParameter specifies to allow MP2TSME to correctly terminate the beginning and end of the transport stream. Either use alonger elementary stream, or shorten the duration and run MP2TSME again.

Termination does not support AVC video. The current termination implementation only supports MPEG-1 andMPEG-2 video.

TransitionCleanUp set without AVsync; ignored. TransitionCleanUp is designed to clean up audio partial accessunits when multiple TS files are remultiplexed with AV sync maintained. This feature only works when AV sync is being trackedacross file transitions. In this case, AVsync is not enabled, so this option has no effect. To correct the warning, either disableTransitionCleanUp, or enable AVsync.

Unable to correctly set Audio PES length in PID 0xN. The length of the PES packet is greater than 0.7seconds, which is the maximum interval between consecutive time stamps as specified by MPEG. The number of access unitsper PES should be decreased using the PESnau Parameter, thereby shrinking the PES packet size and allowing the PES lengthto be correctly set.

Unexpected stream_id encountered. While performing a demultiplexing operation, a stream_id was encountered thatwas not valid. This is probably caused by an invalid stream. Fix the file and run the Multiplexer again.

Using decoder buffer size (N) from user-defined metadata_STD descriptor. The decoder buffer sizeused by the multiplexer for the private_stream_1 data was determined by a metadata_STD descriptor defined in theconfiguration.

Using decoder buffer size (N) from from metadata_STD descriptor in data file. The decoder buffersize used by the multiplexer for the private_stream_1 data was determined by a metadata_STD descriptor defined in the inputfile.

Page 244: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0236

Copyright © 1998 - 2010 Manzanita Systems, Inc.

VBV size changed to N. This can be caused by either a video elementary stream not starting with a sequence header or ifencoding parameters change mid-stream or if the video data is corrupted. If this message is not expected, then the input streamshould be re-encoded.

Video bit rate changed to N. This can be caused by either a video elementary stream not starting with a sequenceheader or if encoding parameters change mid-stream or if the video data is corrupted. If this message is not expected, then theinput stream should be re-encoded.

Video decoder underflow by N bytes. While creating the transport stream, the Multiplexer verifies the decoder bufferlevels. In doing so an underflow was detected. The stream should be created again with corrections. Some possible fixes tothis problem are increasing the initial delay with the Delay Parameter, or increasing the video rate with the Rate Parameter.

Video vbv_size N > allowed by profile & level. The value assigned to the vbv_size in the MPEG-2 videoelementary stream syntax is invalid for the encoded video profile and level. The video stream may need to be re-encoded.

Video was MPEG-4 part 2 video but reserved start code seen. A reserved start code was seen in theMPEG-4 part 2 video elementary stream. This is an invalid stream.

Page 245: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Chapter VII

Tools

Page 246: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0238

Copyright © 1998 - 2010 Manzanita Systems, Inc.

7 Tools

MP2TSME includes several tools and utilities that preprocess input streams and manipulate existing transport streams. Each ofthese tools is described in detail in the following sections:

· Demultiplexer

· Video Trim Utility

· Maximum Duration Utility

· Extract Packets Tool

· Packetize Data Tool

· DVB Subtitles Tool

· Closed Caption Tools

· Audio ES Tools

· Video ES Tools

· Table Generator

7.1 Demultiplexer

The MP2TSME program includes a tool, the Demultiplexer, that will extract data streams from an existing MPEG-1 systemstream, MPEG-2 program stream, Video Object (VOB) stream, MPEG-2 transport stream, or MPEG-4 media file and save it asa binary file. The Demultiplexer removes any transport, adaptation field, and PES layers that are present, and writes thepayload data as a continuous stream. Multiple streams can be selected from the multiplexed input stream for simultaneousdemultiplexing.

The Demultiplexer tool can extract the following types of data streams:

· MPEG-1 or MPEG-2 video

· AVC (H.264 video)

· MPEG audio

· AAC

· AC-3 audio

· Enhanced AC-3 audio

· DTS audio

· MPEG-4 (HE-AAC and HE-AAC version 2) audio

· SMPTE 302M audio (saved as raw PCM, WAV, or broadcast WAV file)

· Private Stream 1 (saved as payload-only binary or payload plus timing information)

· Private Stream 2 (saved as payload-only binary or payload plus timing information)

· KLV (Key Length Value) (saved as payload-only binary or payload plus timing information)

Page 247: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 239

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· DVB subtitle data (saved as payload-only binary or payload plus timing information)

· Table and private data

The Demultiplexer can be run from either the MP2TSME UI or command line as described in the following subsections:

· Demultiplexing from the UI

· Demultiplexing SMPTE 302M Audio from the UI

· Demultiplexing from the Command Line

· Demultiplexing SMPTE 302M Audio from the Command Line

7.1.1 Demultiplexing from the UI

The Demultiplexer tool can be used in the MP2TSME graphical UI. Operation of the Demultiplexer is independent of themultiplexing functions, that is, you can run the Demultiplexer without disturbing the current transport stream configuration.

The Demultiplexer can extract and save elementary streams from the following types of files:

· Transport stream - elementary stream is identified by PID

· System stream - elementary stream is identified by stream_id

· Program stream - elementary stream is identified by stream_id

· VOB - elementary stream is identified by stream_id and optionally by sub-type

· MPEG-4 media file - elementary stream is identified by track_ID

To demultiplex an elementary stream (non-SMPTE 302M) from the MP2TSME UI:

1. Choose Tools > Demux from the Menu Bar.

The Demultiplex window will appear.

2. Enter the name of the input MPEG-1 system stream, MPEG-2 program stream, VOB stream, MPEG-2 transport stream, or

MPEG-4 media file in the Source textbox, or click the button to browse your system to select and open the file.

The Demultiplexer will open the input file and identify it. The Demultiplex window will display a tree structure that symbolizesthe multiplexed stream. Each elementary stream that is identified in a PMT will be shown, and will be identified by type. Ifthe input stream is a transport stream, then the PID for each elementary stream will be displayed. If the input stream is asystem stream or program stream, then the stream_id value associated with each elementary stream will instead be shown. If the input stream is a VOB, then each AC-3 audio stream will also be identified with a VOB sub-type in addition to astream_id.

If the file is an MPEG-4 media file, each elementary stream will be identified with its track ID.

A default output file name will also be displayed for each stream.

3. Enter the name of the desired location for the output file(s) in the Destination textbox, or click the button to browse yoursystem to select the location.

4. If a desired stream does not appear in the display, it can be added manually and selected for demultiplexing. If the input fileis a transport stream, enter the PID of the desired stream in the PID textbox. If the input file is a system stream, programstream, or VOB, enter the value of the stream_id that identifies the desired stream in the stream_id textbox. If the desiredstream is an AC-3 audio stream that is in a VOB file, check the VOB checkbox, and enter the sub-type value that identifies

Page 248: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0240

Copyright © 1998 - 2010 Manzanita Systems, Inc.

the stream in the Sub-type textbox. In this case, the stream_id will be set to 0xBD by default. If the file is an MPEG-4 mediafile, enter the track_ID of the desired stream in the track_ID textbox. PID, stream_id, track_ID, and sub-type values may bespecified in decimal, or if prefaced with a "0x", in hexadecimal.

5. If a PID, stream_id, track_ID, and/or sub-type for a stream has been entered as described in step 4, click the Add button.

The desired stream will be added to the multiplex display with a default output file name.

6. Repeat Steps 4 and 5 if there are more desired streams to add to the multiplex display.

7. Select the streams in the multiplex display that are to be demultiplexed. Multiple streams may be individually selected or the Select All button may be used.

8. If necessary, edit the output file names of the selected streams.

All output files will be written to the location shown in the Destination textbox.

9. Click on the Demux button at the bottom of the window.

A dialog box will be displayed that indicates the progress of the demultiplexing process. When all streams have beendemultiplexed, a summary dialog box will be displayed that indicates the names and sizes of the output files.

Depending upon the size of the input file, it may take several minutes for the stream(s) to be demultiplexed.

If your input file is in a remote location on a network, the demultiplexing progress may not be displayed, or it may not beaccurately updated because of network latency.

7.1.2 Demultiplexing Private Stream Data from the UI

The Demultiplexer can be used to extract and save data from PID streams that are identified as private_stream_1 (stream_id0xBD) and private_stream_2 (stream_id 0xBF), including DVB subtitle and KLV (Key Length Value) streams. The extracteddata can be saved in three different ways:

· Payload only - The PES packet payloads of the selected stream are saved in a single binary data file. All PES headerinformation, including timing and packet lengths, is not saved.

· Index and payload in one file - The extracted stream is saved in a single Manzanita's Private Stream Data file thatconsists of PES packet information, lengths, and timing in an "index", followed by the payload binary data.

· Index and payload in two files - PES packet information, lengths, and timing are saved in a text-readable file, and PESpacket payloads are saved in a separate binary file.

Private stream data that is saved as "Index and payload in one file" is not text-readable. If it is necessary to view theinformation in the index, then the stream should be extracted and saved using the "Index and payload in two files" mode.

The Demultiplexer can only save index information (in either single or two file modes) if the private stream is in a transportstream.

Streams that are identified as private_stream_1 (stream_id 0xBD) can have a full PES header, including time stamps (PTS/DTS), and can be synchronous to the video stream. If the demultiplexed stream is saved with an "index" (either as a singlePrivate Stream Data file or as an index file separate from the payload data), all the time stamps and PES packet lengths will beretained. The resulting Private Stream Data file, or index file and data file pair, can be input to the Multiplexer and multiplexedas Private Stream in a program with the video stream. In this case, the original timing will be maintained and the data streamwill be synchronous to video.

If a stream is identified as private_stream_2 (stream_id 0xBF), the PES headers only have a length field and no time stamps. Inthis case, the length of each PES packet and time of the packet relative to the start of the input transport stream will be saved inthe index. If the saved index and payload file(s) is multiplexed as Private Stream, the original PES packet lengths and insertiontimes will be maintained.

Page 249: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 241

Copyright © 1998 - 2010 Manzanita Systems, Inc.

To demultiplex a Private Stream from the MP2TSME UI:

1. Choose Tools > Demux from the Menu Bar.

The Demultiplex window will appear.

2. Enter the name of the input MPEG-2 transport stream in the Source textbox, or click the button to browse your system toselect and open the file.

The Demultiplexer will open the input file and identify it. The Demultiplex window will display a tree structure that symbolizesthe multiplexed stream. Each elementary stream that is identified in a PMT will be shown, and will be identified by PID andtype.

A default output file name will also be displayed for each stream.

3. Enter the name of the desired location for the output file(s) in the Destination textbox, or click the button to browse yoursystem to select the location.

4. Select the private streams in the multiplex display that are to be demultiplexed.

5. Select the desired output file format for the extracted data using the Private Stream Output drop-down list. The availableformats are Payload only, Index and payload in one file, and Index and payload in two files.

6. If necessary, edit the output file names of the selected streams.

All output files will be written to the location shown in the Destination textbox.

The output file name that is displayed is for the file in which the payload data is saved. If the Index and payload in onefile setting is selected, the single file that is saved will have this name. If the Index and payload in two files setting isselected, the payload file will have the specified output file name. In this case, the companion index file will have the samebase file name as the output file, but will have an ".idx" extension.

7. Click on the Demux button at the bottom of the window.

A dialog box will be displayed that indicates the progress of the demultiplexing process. When all streams have beendemultiplexed, a summary dialog box will be displayed that indicates the names and sizes of the output files.

7.1.3 Demultiplexing SMPTE 302M Audio from the UI

If the stream that is to be demultiplexed is SMPTE 302M audio, there are several ways the output data can be saved:

· The extracted data can be saved in a single file, or if the SMPTE 302M stream consists of more than two channels, theoutput can be split into multiple output files that contain between 2 to 8 channels each.

· The data can be saved in a raw PCM format, or it can be saved in WAV format at a specified sample rate.

· The data can be saved as a WAV file in Broadcast Wave Format (BWF) that includes time codes based on a referencevideo stream.

· The data samples can be saved with between 1 to 32 bits per word.

· The data samples can be saved with between 1 to 4 bytes per word.

· The least significant bit in the samples can be written in the high or low bit position.

· The least significant byte in the samples can be written first or last.

· If the sample bits do not fill the output word, then the valid bits may be written with the least significant bit justified or most

Page 250: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0242

Copyright © 1998 - 2010 Manzanita Systems, Inc.

significant bit justified.

These options are controlled by a set of secondary parameters that are set specifically for demultiplexing SMPTE 302M data.

To demultiplex a SMPTE 302M audio stream from the MP2TSME UI:

1. Follow Steps 1-8 as described in the section, Demultiplexing from the UI.

2. Click the checkbox at the bottom of the window that is labeled Demux some streams as SMPTE302M audio.

A new column labeled SMPTE302M appears in the multiplex display. This column contains a checkbox for each stream inthe multiplex. When the checkbox is checked for a stream, the Multiplexer will demultiplex the data as SMPTE302M audio.

3. Check the SMPTE302M checkbox associated with the stream(s) that are to be demultiplexed as SMPTE302M audio. Thestream(s) must also be selected for demultiplexing.

4. Click the Demux... button.

The SMPTE 302M Demultiplex dialog box will be displayed. The designated output file name(s) for the selected SMPTE302M stream(s) will be shown.

If multiple SMPTE 302M streams are selected for demultiplexing, the configuration that is set by the SMPTE 302MDemultiplex dialog box will pertain to all of them.

5. If the output is to be saved in multiple files, check the Multiple output files checkbox, and indicate the desired number ofchannels to be saved in each file using the Channels Per File spinner.

If the 302M stream has more than two channels, they may be split into multiple output files. For example, if the 302Mstream carries English on the first two channels and Spanish on the second two, the output can be split into two files bysetting Channels Per File to 2.

When the multiple output files option is enabled, a '#' character will be added to the base output file name. The '#' characteris replaced by a number that increments with each output file. For example, if the name appears as file#.wav, a fourchannel 302M stream would be split into file1.wav and file2.wav when demultiplexed with 2 channels per file selected.

6. Select the Raw PCM option or the WAV File option for the desired output format.

7. If a WAV output was selected, entered the desired sample rate in the Sample Rate textbox.

8. If a WAV output was selected and BWF time codes are desired in the output, check the Add BWF using video timecodecheckbox. Enter the PID (if the input stream is a transport stream) or the stream_id (if the input stream is a system, program,or VOB stream) of the reference video elementary stream in the Video Stream ID textbox. PID and stream_id values may bespecified in decimal, or if prefaced with a "0x", in hexadecimal.

9. Set the Bits Per Word spinner to the desired number of bits per word saved from each data sample. The allowable range is1 to 32.

10.Set the Bytes Per Word spinner to the desired number of bytes per word for each data sample. The allowable range is 1 to4.

The number of bytes per word must be large enough to hold the number of bits per word that is specified. Any additionalbits in the word are zero filled.

11.Check the LS Bit First checkbox if the least significant bit in the samples is to be written in the high bit position. Leave thecheckbox unchecked if the least significant bit is to be written in the low bit position.

12.Check the LS Byte First checkbox if the least significant byte in the samples is to be written first. Leave the checkboxunchecked if the least significant byte is to be written last.

Some Windows applications require the least significant byte to be written first, so this should be the default for WAVfiles.

13.Check the MS Bits Justified if the data should be written shifted to the most significant bit position when the number of

Page 251: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 243

Copyright © 1998 - 2010 Manzanita Systems, Inc.

sample bits is less than the length of the output word. Leave the checkbox unchecked if the data should be written in theleast significant bit position.

14.Click on the Demux button at the bottom of the window.

A dialog box will be displayed that indicates the progress of the demultiplexing process. All streams that are selected in themultiplex display will be demultiplexed, including any SMPTE 302M streams. When the streams have been demultiplexed,a summary dialog box will be displayed that indicates the names and sizes of the output files.

Depending upon the size of the input file, it may take several minutes for the stream(s) to be demultiplexed.

If your input file is in a remote location on a network, the demultiplexing progress may not be displayed, or it may not beaccurately updated because of network latency.

7.1.4 Demultiplexing from the Command Line

You may extract and save a data stream from an input MPEG-1 system stream, MPEG-2 program stream, VOB stream, MPEG-2 transport stream, or MPEG-4 media file using the command line version of MP2TSME.

To demultiplex a single elementary stream from the command line:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -d input_file output_file ID [sub_type]

For input_file, give the name of the input file. The file must be an MPEG-1 system stream, MPEG-2 program stream,VOB stream, MPEG-2 transport stream, or MPEG-4 media file. The output_file argument is the name to be used forthe output elementary stream file. The input_file and output_file arguments may be specified by full path, relativepath, or by filename only. If only the filename is given, then MP2TSME will look for the file in the current directory.

If the input file is a system stream, program stream, or VOB stream, then ID is the value of the stream_id that identifies theelementary stream that is to be demultiplexed. If the file is a transport stream, then ID is the value of the PID that isassociated with the elementary stream. If the file is an MPEG-4 media file, then ID is the value of the track_ID thatidentifies the elementary stream.

If the input file is a VOB and an Dolby AC-3 audio stream is to be extracted, then the sub_type argument must bespecified. In this case, sub_type is the value of the VOB subtype that identifies the AC-3 stream.

The ID and sub_type values may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

To demultiplex multiple elementary streams from the command line:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -dd input_file ID1[, sub_type1] output_file1 [ID2[, sub_type2] output_file2] ...

For input_file, give the name of the input file. The file must be an MPEG-1 system stream, MPEG-2 program stream,VOB stream, MPEG-2 transport stream, or MPEG-4 media file.

If the input file is a system stream, program stream, or VOB stream, then ID1 is the value of the stream_id that identifies thefirst elementary stream that is to be demultiplexed. If the file is a transport stream, then ID1 is the value of the PID that isassociated with the first elementary stream. If the file is an MPEG-4 media file, then ID1 is the value of the track_ID thatidentifies the first elementary stream.

Page 252: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0244

Copyright © 1998 - 2010 Manzanita Systems, Inc.

If the input file is a VOB and an Dolby AC-3 audio stream is to be extracted, then the sub_type1 argument must bespecified. In this case, sub_type1 is the value of the VOB subtype that identifies the AC-3 stream. The sub_type1argument, if present, must be separated from the ID1 argument with a comma (",").

In all cases, the output_file1 argument is the name to be used for the first output elementary stream file.

Each additional output elementary stream is similarly specified with an ID# and optional sub_type# followed by theoutput_file#.

Input and output file arguments may be specified by full path, relative path, or by filename only. If only the filename is given,then MP2TSME will look for the file in the current directory. PID, stream_id, and sub-type values may be specified indecimal, or if prefaced with a "0x", in hexadecimal.

7.1.5 Demultiplexing Private Stream Data from the Command Line

You may extract and save data from PID streams that are identified as private_stream_1 (stream_id 0xBD) andprivate_stream_2 (stream_id 0xBF). Using the command line Demultiplexer, the extracted data can be saved in two differentways:

· Index and payload in one file - The extracted stream is saved in a single Manzanita's Private Stream Data file thatconsists of PES packet information, lengths, and timing in an "index", followed by the payload binary data.

· Index and payload in two files - PES packet information, lengths, and timing are saved in a text-readable file, and PESpacket payloads are saved in a separate binary file.

The Demultiplexer can only save index information (in either single or two file modes) if the private stream is in a transportstream.

To demultiplex a Private Stream from the command line:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -d input_file output_file ID [ps | psi]

For input_file, give the name of the input MPEG-2 transport stream. The output_file argument is the name of thefile in which the payload data is to be saved. The input_file and output_file arguments may be specified by fullpath, relative path, or by filename only. If only the filename is given, then MP2TSME will look for the file in the currentdirectory.

The ID argument is the value of the PID that is associated with the private stream. The value may be specified in decimal,or if prefaced with a "0x", in hexadecimal.

The ps option should be specified to save the extracted stream with index and payload data in a single Private Stream Datafile.

The psi option should be specified to save both an index file and a payload data file.

If the ps option is selected, the single file that is saved will have the name specified by the output_file argument. Ifthe psi option is selected, the payload file will have the specified output file name. In this case, the companion index filewill have the same base file name as the output file, but will have an ".idx" extension.

Example

To extract a private stream carried in PID 0x2DE in a transport stream and save it in as a payload-only data file with a separateindex file, the following command would be entered at the command line:

mp2tsme –d infile2.mpg mydata.klv 0x2de psi

Page 253: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 245

Copyright © 1998 - 2010 Manzanita Systems, Inc.

To demultiplex multiple Private Streams from the command line:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -dd input_file ID1 [-ps | -psi] output_file1 [ID2 [-ps | -psi] output_file2] ...

For input_file, give the name of the input MPEG-2 transport stream.

The ID1 argument is the value of the PID that is associated with the first stream to be extracted.

The -ps option should be specified to save the first extracted stream with index and payload data in a single PrivateStream Data file.

The -psi option should be specified to save both an index file and a payload data file for the first extracted stream.

The output_file1 argument is the name of the file in which the payload data for the first stream is to be saved.

Each additional data stream is similarly specified with an ID# and -ps or -psi option followed by the output_file#.

7.1.6 Demultiplexing SMPTE 302M Audio from the Command Line

The MP2TSME command line Demultiplexer also supports demultiplexing of SMPTE 302M data from transport streams, savingit as either a WAV or raw PCM file.

To demultiplex a single SMPTE 302M elementary stream from the command line:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -d input_file output_file ID smpte302m [options]

For input_file, give the name of the input file. The file must be an MPEG-1 system stream, MPEG-2 program stream,VOB stream, or MPEG-2 transport stream. The output_file argument is the name to be used for the output elementarystream file. The input_file and output_file arguments may be specified by full path, relative path, or by filenameonly. If only the filename is given, then MP2TSME will look for the file in the current directory.

If the file is a system stream, program stream, or VOB stream, then ID is the value of the stream_id that identifies theelementary stream that is to be demultiplexed. If the file is a transport stream, then ID is the value of the PID that isassociated with the elementary stream.

To extract a SMPTE 302M stream, the smpte302m argument must be specified after the output file. If the extracted data isto be written to a single raw PCM file with default format (32 bits per word, 4 bytes per word, MS bit first, MS byte first), thenno other arguments are required. In all other cases, all of the following eight arguments must be specified after the smpte302m argument in the order that they are listed:

Name Valid Values Description

ChOut 0-8 channels per file Number of channels per output file. A value of 0 willsave all data in a single file.

Page 254: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0246

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Name Valid Values Description

WordSize 1-32 bits per word Number of bits of the original PCM samples to be savedin each word in the output.

BytesPerWord 1-4 bytes per word Number of bytes written per word for each sample. Thebytes per word must be large enough to hold the numberof bits per word that is specified. Any additional bits inthe word are zero filled.

BitReversed 0, 1 0 = write the most significant bit in the samples in thehigh bit position1 = write the least significant bit in the samples in thehigh bit position

ByteReversed 0, 1 0 = write the most significant byte first1 = write the least significant byte first

MSJustified 0, 1 0 = justify least significant bit in word1 = justify most significant bit in word

WaveSPS 0, 48000 0 = Save the output as a raw PCM file48000 = Save the output as a WAV file with sample rateof 48000 sps

BWF 0, 16-8190 (0x0010 and0x1FFE

0 = Do not save as BWFnon-zero = PID or stream_id of reference video stream;save with BWF timecode

If multiple output files are enabled using a non-zero ChOut option, a '#' character should be added to the output filename. The '#' character will be replaced by a number that increments with each output file. For example, if the outputname is specified as file#.wav and 2 channels per file is selected, then a four channel 302M stream would be split into file1.wav and file2.wav when demultiplexed.

The Demultiplexer will extract the payload of the SMPTE 302M PID and save it to the output file with the specified format. The number of channels and bits per sample in the extracted stream will be displayed.

Example

To extract a SMPTE 302M stream carried in PID 0x1E2 in a transport stream and save it as a WAV file for playback on aWindows PC, the following options should be used:

BitsPerWord = 16

BytesPerWord = 2

BitReversed = 0

ByteReversed = 1

WaveSPS = 48000

The following command would be entered at the command line:

mp2tsme –d in.ts out#.wav 0x1e2 smpte302m 2 16 2 0 1 0 48000 0

To demultiplex multiple SMPTE 302M elementary streams from the command line:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -d input_file [-so options] ID1 -s output_file1 [ID2 -s output_file2] ...

Page 255: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 247

Copyright © 1998 - 2010 Manzanita Systems, Inc.

For input_file, give the name of the input file. The file must be an MPEG-1 system stream, MPEG-2 program stream,VOB stream, or MPEG-2 transport stream.

If the extracted data is to be written in a format other than the default, then the eight SMPTE302M format arguments mustbe specified after the -so option in the order that they are listed in the table shown earlier in this section. Note that allSMPTE302M streams that are extracted will be saved with the same format.

If the input file is a system stream, program stream, or VOB stream, then ID1 is the value of the stream_id that identifies thefirst elementary stream that is to be demultiplexed. If the file is a transport stream, then ID1 is the value of the PID that isassociated with the first elementary stream. If the file is an MPEG-4 media file, then ID1 is the value of the track_ID thatidentifies the first elementary stream.

The -s option should be specified to indicate that the first stream is to be demultiplexed as SMPTE302M.

The output_file1 argument is the name to be used for the first output elementary stream file.

Each additional output elementary stream is similarly specified with an ID# and optional sub_type# followed by theoutput_file#.

Each additional data stream is similarly specified with an ID# and -s option followed by the output_file#.

Page 256: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0248

Copyright © 1998 - 2010 Manzanita Systems, Inc.

7.2 Video Trim Utility

MPEG-2 and MPEG-1 video elementary stream files that are input to the MP2TSME Multiplexer must begin with the first byte ofa sequence_header_code. AVC elementary streams files that are input to the Multiplexer should begin with a sequenceparameter set. In some cases, input video files may not meet this requirement. For example, it may not be possible to controlthe start of video elementary streams that are captured during broadcast.

The Video Trim Utility that is included in the MP2TSME program is a preprocessing option that will trim MPEG-1, MPEG-2, andAVC video elementary streams so that the first byte in the file is the first byte of a sequence_header_code, or in the case ofAVC, the beginning of the first sequence parameter set. The resulting video stream is a suitable input for the transport streamMultiplexer. The remainder of the video stream will be unchanged.

The Video Trim Utility can be run from either the MP2TSME UI or command line as described in the following subsections:

· Using the Video Trim Utility from the UI

· Using the Video Trim Utility from the Command line

7.2.1 Using the Video Trim Utility from the UI

The Video Trim Utility can be used in the MP2TSME graphical UI. Operation of the Video Trim Utility is independent of themultiplexing functions, that is, you can run the utility without disturbing the current transport stream configuration.

To trim a video elementary stream in the MP2TSME UI:

1. Choose Tools > Video Trim from the Menu Bar.

The Video Trim Utility dialog box will appear.

2. Enter the name of the input MPEG-1, MPEG-2, or AVC video elementary stream file in the Input File textbox. Instead of

entering the input file name directly, you can click the button to browse your system to select the file.

3. Enter the name to be used for the trimmed output video elementary stream file in the Output File textbox. Instead of entering

the file name directly, you can click the button to browse your system to specify the location and name of the file.

4. Click on the Trim button at the bottom of the dialog box.

A message box will be displayed when the Video Trim Utility has finished creating the trimmed output video elementarystream file.

5. Click the Close button to exit the Video Trim Utility.

7.2.2 Using the Video Trim Utility from the Command Line

The Video Trim Utility can be executed from the command line to preprocess video elementary stream files.

To trim a video elementary stream from the command line:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

Page 257: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 249

Copyright © 1998 - 2010 Manzanita Systems, Inc.

mp2tsme -t input_file output_file

For input_file, give the name of the input file. The file must be an MPEG-1, MPEG-2, or AVC video elementary stream.The output_file argument is the name to be used for the trimmed output video elementary stream file. Theinput_file and output_file arguments may be specified by full path, relative path, or by filename only. If only thefilename is given, then MP2TSME will look for the file in the current directory.

7.3 Maximum Duration Utility

The Maximum Duration Utility that is included with the MP2TSME program will determine the maximum duration of any video oraudio elementary stream. This utility, for example, can be used to verify that input video and audio elementary streams are ofthe same length prior to multiplexing them together.

If there are rate changes, e.g., sample rate, bit rate, frame rate, or loss of sync conditions in the elementary stream, theMaximum Duration Utility will report an error and will be unable to determine the duration.

The Maximum Duration Utility can be run from either the MP2TSME UI or command line as described in the followingsubsections:

· Using the Maximum Duration Utility from the UI

· Using the Maximum Duration Utility from the Command line

7.3.1 Using the Maximum Duration Utility from the UI

The Maximum Duration Utility can be used in the MP2TSME graphical UI. It can be run on video or audio elementary streamsthat are currently configured in the Multiplex Pane. It can also be executed on any video or audio elementary stream fileindependent of the current transport stream configuration.

To determine the maximum duration of an elementary stream displayed in the Multiplex Pane:

1. Select a video or audio elementary stream entry (VideoN or AudioN) in the Multiplex Pane. The input file may be an MPEG-1video, MPEG-2 video, H.264/AVC video, MPEG audio, AC-3 audio, AAC, DTS audio, or Enhanced AC-3 audio elementarystream.

2. Click the right mouse button.

A shortcut menu will open.

3. Select Show Duration from the shortcut menu.

The maximum duration of the input stream will be reported as hh:mm:ss:ff where hh is hours, mm is minutes, ss isseconds, and ff is frames. Both Drop Frame Time Code (DFTC) and Non-Drop Frame Time Code (NDFTC) times will bedisplayed.

To determine the maximum duration of any video or audio elementary stream:

1. Choose Tools > Show Duration from the Menu Bar.

The Show Maximum Duration dialog box will appear.

2. Browse your system to select the input video or audio elementary stream file, then click Open. The input file may be anMPEG-1 video, MPEG-2 video, H.264/AVC video, MPEG audio, AC-3 audio, AAC, DTS audio, or Enhanced AC-3 audioelementary stream.

Page 258: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0250

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The maximum duration of the input stream will be reported as hh:mm:ss:ff where hh is hours, mm is minutes, ss isseconds, and ff is frames. Both Drop Frame Time Code (DFTC) and Non-Drop Frame Time Code (NDFTC) times will bedisplayed.

If there are rate changes, e.g., sample rate, bit rate, frame rate, or loss of sync conditions in the elementary stream, theMaximum Duration Utility will report an error and will be unable to determine the duration.

7.3.2 Using the Maximum Duration Utility from the Command Line

The Maximum Duration Utility can be executed from the command line to determine the length of input elementary streams.

To determine the maximum duration of an elementary stream from the command line:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -m input_file

For input_file, give the name of the input file. The input file may be an MPEG-1 video, MPEG-2 video, H.264/AVCvideo, MPEG audio, AC-3 audio, AAC, DTS audio, or Enhanced AC-3 audio elementary stream. The input_fileargument may be specified by full path, relative path, or by filename only. If only the filename is given, then MP2TSME willlook for the file in the current directory.

The maximum duration of the input stream will be reported as hh:mm:ss:ff where hh is hours, mm is minutes, ss isseconds, and ff is frames. Both Drop Frame Time Code (DFTC) and Non-Drop Frame Time Code (NDFTC) times will bedisplayed. For example, the maximum duration of a video elementary stream may be reported as:

Non-Drop Frame (HH:MM:SS:FF) = 01:40:52:27

Drop Frame (HH:MM:SS:FF)= 01:40:58.96

Page 259: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 251

Copyright © 1998 - 2010 Manzanita Systems, Inc.

7.4 Extract Packets Tool

The Extract Packets Tool allows you to extract specific transport packets from an existing transport stream file and copy them toa new file. It can be used in several different ways:

· Extract and copy a segment of packets that is specified by start and end packet numbers.

· Extract and copy a segment of packets based on the in-stream video time codes.

· Extract and copy a segment or an exact number of packets with a specific PID.

· Extract data and save in Scenarist v1.0 format

· Extract and save captions for

the CC tool GUI does not support the -E S and - E A options.

The input transport stream will not be modified by the extract/copy process.

This feature is useful when an existing transport stream contains PIDs with private data or other non-PES data that you wouldlike to multiplex in a new transport stream. For example, you can use the Extract Packets Utility to copy the Network PIDpackets from a transport stream so that you can include then as prepacketized data in a new multiplex.

The Extract Packets Tool can be run from either the MP2TSME UI or command line as described in the following subsections:

· Using the Extract Packets Tool from the UI

· Using the Extract Packets Tool from the Command Line

7.4.1 Using the Extract Packets Tool from the UI

When the Extract Packets Tool is run from the MP2TSME graphical UI, it is independent of the multiplexing functions, that is,you can use the Extract Packets Tool without disturbing the current transport stream configuration.

To extract and copy a segment of the transport stream that is specified by start and end packet numbers:

1. Choose Tools > Extract Packets > By Packet Range from the Menu Bar.

2. Enter the name of the input MPEG-2 transport stream file in the Input File textbox, or click the button to browse yoursystem to select and open the file.

3. Enter the name of the desired output file in the Output File textbox, or click the button to browse your system to selectthe file.

4. Select the Start of file option to start the segment with the first packet in the file (packet number 1), or select the Packetoption and enter the number of the first packet to be copied.

5. Select the End of file option to end the segment with the last packet in the file, or select the Packet option and enter thenumber of the last packet to be copied.

6. Click on the Extract button at the bottom of the dialog box.

The Extract Packets Tool will extract all of the transport packets in the specified range and copy them to the output file.

Depending upon the size of the input file, it may take several minutes for the extracted packets to be copied. A dialog boxwill display the progress of the extraction. When copying is complete, a dialog box will display the number of transportpackets that were extracted to the output file.

Page 260: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0252

Copyright © 1998 - 2010 Manzanita Systems, Inc.

If your input file is in a remote location on a network, the extraction progress may not be displayed, or it may not beaccurately updated because of network latency.

To extract and copy a segment of packets based on the in-stream video time codes:

1. Choose Tools > Extract Packets > By Video Timecode from the Menu Bar.

2. Enter the name of the input MPEG-2 transport stream file in the Input File textbox, or click the button to browse yoursystem to select and open the file.

3. Enter the name of the desired output file in the Output File textbox, or click the button to browse your system to selectthe file.

4. Select the Start of file option to start the segment with the first packet in the file, or select the Timecode option and enter thetimecode at which the segment should start. The first video elementary stream in the first program in the transport stream willbe used as the timecode reference.

This utility is only practical if the transport stream is configured with one video elementary stream in a single program. Iftimecodes are not present in the video elementary stream, then they will be computed starting with an initial time of00:00:00:00.

5. Select the End of file option to end the segment with the last packet in the file, or select the Timecode option and enter thetimecode at which the segment should end. The first video elementary stream in the first program in the transport stream willbe used as the timecode reference.

The last access unit in the output file will be the last access unit before the specified End Timecode, i.e., the stream isexclusive of the End Timecode.

6. Click on the Extract button at the bottom of the dialog box.

The Extract Packets Tool will extract all of the transport packets in the specified range and copy them to the output file.

Depending upon the size of the input file, it may take several minutes for the extracted packets to be copied. A dialog boxwill display the progress of the extraction. When copying is complete, a dialog box will display the number of transportpackets that were extracted to the output file.

If your input file is in a remote location on a network, the extraction progress may not be displayed, or it may not beaccurately updated because of network latency.

To extract and copy a segment or an exact number of packets with a specific PID:

1. Choose Tools > Extract Packets > By PID from the Menu Bar.

2. Enter the name of the input MPEG-2 transport stream file in the Input File textbox, or click the button to browse yoursystem to select and open the file.

The Extract Packets Tool will open the input file and identify it. The multiplex window will display a tree structure thatsymbolizes the transport stream. Each elementary stream that is identified in a PMT will be shown, and will be identified byPID value.

3. Enter the name of the desired output file in the Output File textbox, or click the button to browse your system to selectthe file.

4. Select the PID stream to be extracted in the multiplex display, or enter the PID of the desired stream in the PID textbox. ThePID may be specified in decimal, or if prefaced with a "0x", in hexadecimal.

If a desired stream does not appear in the display, it must be entered manually in the PID textbox.

5. Select the Start of file option to start the segment with the first packet in the file (packet number 1), or select the Packet

Page 261: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 253

Copyright © 1998 - 2010 Manzanita Systems, Inc.

option and enter the number of the first packet to be copied.

6. Select the End of file option to end the segment with the last packet in the file, or select the Packet option and enter thenumber of the last packet to be copied.

7. If there is a maximum number of packets to be extracted, check the Limit number of packets to extract checkbox, andenter the number in the accompanying box.

8. Click on the Extract button at the bottom of the dialog box.

The Extract Packets Tool will extract transport packets with the specified PID in the specified range and copy them to theoutput file. If the number of transport packets copied reaches the specified maximum (if any), then the copy will stop even ifthe configured end has not been reached.

Depending upon the size of the input file, it may take several minutes for the extracted packets to be copied. A dialog boxwill display the progress of the extraction. When copying is complete, a dialog box will display the number of transportpackets that were extracted to the output file.

If your input file is in a remote location on a network, the extraction progress may not be displayed, or it may not beaccurately updated because of network latency.

7.4.2 Using the Extract Packets Tool from the Command Line

The Extract Packets Tool can be executed from the command line to extract transport packets from an existing transport streamfile and copy them to a new file. The usage statement for the Extract Packets Tool to execute the extract and copy function is:

mp2tsme -x input_file output_file [-p PID [-n count]] [-b BegTC | BegPacket] [-e EndTC |EndPacket]

The Extract Packets Tool arguments are:

Name Use Description

-x Required Execute the Extract Packets Tool

input_file Required The input transport stream file containing the transport packets to beextracted. The file may be specified by full path, relative path, or byfilename only. If only the filename is given, then MP2TSME will look for thefile in the current directory.

output_file Required The name to be used for the output transport stream file. The file may bespecified by full path, relative path, or by filename only. If only the filenameis given, then MP2TSME will look for the file in the current directory.

-p PID Optional; not valid withthe -b or -e options

The value of the PID to be copied. May be specified in decimal, or ifprefaced with a "0x", in hexadecimal. If the -p option is not used, alltransport packets in the specified range will be copied.

-n count Optional, valid onlywith the -p option; notvalid with the -b or -e options

The maximum number of packets with the specified PID to be copied. Allpackets with the specified PID will be copied if the -n option is absent.

Page 262: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0254

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Name Use Description

-b BegTC |BegPacket

Optional; BegTC mayonly be used with EndTC; BegPacketmay only be used with EndPacket

Specifies the beginning of the segment of packets to be copied. Thevalue may be timecode, or a packet number (the first packet in thetransport stream is packet number 1). If it is a timecode, the first videoelementary stream in the first program in the transport stream will be usedas the timecode reference. The timecode should be specified in HH:MM:SS:FF format, where HH is a number of hours (00 to 24), MM is anumber of minutes (00 to 59), SS is a number of seconds (00 to 59), andFF is a number of frames. If the -b option is not specified, the ExtractPackets Tool will start the copying the segment from the beginning of theinput file.

If timecodes are not present in the video elementary stream, then theywill be computed starting with an initial time of 00:00:00:00.

If both the -b and -e options are used, they must use the samemethod of specifying the segment times.

-e EndTC |EndPacket

Optional; EndTC mayonly be used with BegTC; EndPacketmay only be used with BegPacket

Specifies the ending of the segment of packets to be copied. The valuemay be timecode, or a packet number (the first packet in the transportstream is packet number 1). If it is a timecode, the first video elementarystream in the first program in the transport stream will be used as thetimecode reference. The timecode should be specified in HH:MM:SS:FFformat, where HH is a number of hours (00 to 24), MM is a number ofminutes (00 to 59), SS is a number of seconds (00 to 59), and FF is anumber of frames. If the -e option is not specified, the Extract PacketsTool will stop copying the segment at the end of the input file.

If timecodes are not present in the video elementary stream, then theywill be computed starting with an initial time of 00:00:00:00.

If both the -b and -e options are used, they must use the samemethod of specifying the segment times.

The Extract Packets Tool can also be used on a transport stream file to transfer packets of a specified PID from one transportstream to another one. The usage statement to use this extract and insert function is

mp2tsme -x input_file output_file -p PID -t

In this case, input_file is the transport stream file containing the PID to be extracted, and output_file is the transportstream file to be modified, i.e., the transport stream into which the PID is to be added. The PID argument specifies the PID ofthe stream to be extracted from input_file and to be inserted in output_file. The -t argument is a flag that enables thefunction.

This function also works with transport streams.

To extract and copy all packets of one PID from a transport stream:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -x input_file output_file -p PID

When processing is complete, the number of transport packets that were copied to the output file will be displayed.

To extract and copy a specified number of packets of one PID from a transport stream:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

Page 263: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 255

Copyright © 1998 - 2010 Manzanita Systems, Inc.

mp2tsme -x input_file output_file -p PID -n count

For the count argument, enter the desired number of packets to be copied. The Extract Packets Tool will copy the firstcount packets with the specified PID value to the output file.

To extract and copy all packets in segment that is specified by packet number:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -x input_file output_file -b beg -e end

For the beg argument, enter the packet number at which the segment should begin. For the end argument, enter thepacket number at which the segment should end.

A timecode delineated beginning time may not be used with a packet number ending time, and vice versa.

To extract and copy a timecode delineated segment of packets from a transport stream:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -x input_file output_file -b begTC -e endTC

For the begTC argument, enter the timecode at which the segment should begin. For the endTC argument, enter thepacket number at which the segment should end.

A timecode delineated beginning time may not be used with a packet number ending time, and vice versa.

To transfer a PID stream from one transport stream to another transport stream:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -x input_file output_file -p PID -t

All transport packets with the PID value specified by PID will be extracted from input_file. The Extract Packets Tool willuse these extracted packets to replace null packets in output_file, starting from the beginning of the file. The packetsare placed in the same relative position as in the original file.

Example

In this example, the transport stream, teststrm1.mpg, has a Network PID of 0x1FFE. The Network Information Table (NIT) iscompletely contained in each Network PID packet, and does not change over the length of the transport stream. To create anew transport stream that uses the same NIT and Network PID, you only need to extract one Network PID packet from teststrm1.mpg.

To extract one Network PID packet, the following line is entered at the command prompt:

mp2tsme –x teststrm1.mpg nit1.mpg -p 0x1ffe -n 1

The resulting file, nit1.mpg, will be consist of a single transport packet, or 188 bytes. It can be input into the MP2TSMEMultiplexer as prepacketized data.

To create a new transport stream that includes a PID association for the Network PID in the PAT, the NITPID parameter shouldbe included in the Transport Section as follows:

NITPID = 0x1ffe

A single Data Subsection should be created after the Transport Section to configure insertion of the extracted Network PID

Page 264: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0256

Copyright © 1998 - 2010 Manzanita Systems, Inc.

packet. The Rate Parameter should be set to provide the desired NIT repetition rate, and the Repeat Parameter should beenabled. Because the single packet will be repeated, the FixCC Parameter should be enabled to correct the continuity_counterfields. The Data Subsection should appear as follows:

Data1$File = nit1.mpgRate = 1504Repeat = YesFixCC = Yes

This will result in one NIT per second repeated through the stream.

7.5 Packetize Data Tool

The Packetize Data Tool processes input binary data to create an MPEG-2 private table, and will contain the resulting table datain one or more transport packets. These transport packets can then be configured as a prepacketized data stream andmultiplexed by the MP2TSME Multiplexer.

The input data should be the sequence of data bytes that are to be carried as private_data_bytes in the private table. Theprivate table will be comprised of one or more private sections; the number of private sections needed depends upon the lengthof the input data. Table 1 shows the format of the MPEG-2 private section. The Packetize Data Tool will generate the headerand the CRC value for each of the resulting private sections.

The format of the private table that is created can either be MPEG-2 section syntax (section_syntax_indicator is set to '1') or analternate format. The section syntax format table can be up to 256 sections that are each a maximum of 4096 bytes in length.The alternate format segments the table payload into up to 4096 sections that are a maximum of 1 KB each in size. GeneralInstrument and Motorola set-top boxes use a proprietary syntax which is partially supported with this format.

If the amount of input data is greater than the capacity for a single private section, then a multiple section table will be created.The maximum length of each private section is 4096 bytes for section syntax format, 1024 bytes for the alternate format, or itcan set by the user to a smaller length.

The table_id value, and optionally the table_id_extension, version_number, and private_indicator fields, are specified by theuser when the Packetize Data Tool is executed. The appropriate MPEG CRC will be computed for each section.

Table 1: The MPEG-2 private section format. Source: ISO 13818-1:2000 (MPEG-2 systems specification).

Syntax No. of bits Identifier

private_section() {

table_id 8 uimsbf

section_syntax_indicator 1 bslbf

private_indicator 1 bslbf

Reserved 2 bslbf

private_section_length 12 uimsbf

if(section_syntax_indicator == '0') {

for(i=0; i<N; i++) {

private_data_byte 8 uimsbf

}

}

else {

table_id_extension 16 uimsbf

Reserved 2 bslbf

version_number 5 bslbf

current_next_indicator 1 bslbf

Page 265: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 257

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Syntax No. of bits Identifier

section_number 8 uimsbf

last_section_number 8 uimsbf

for(i=0; i<private_section_length-9; i++) {

private_data_byte 8 uimsbf

}

CRC_32 32 rpchof

}

}

The private table is then packetized into a sufficient number of transport packets to entirely convey it. If the table has multiplesections, they will be packetized contiguously. The transport packets will be given the PID value that is specified by the user. The initial packet will include a payload_unit_start_indicator field with a value of one and a pointer_field value that indicates thebeginning of the table. Packet stuffing bytes of value 0xFF will be used to complete the payload of the last packet following thelast byte of the table.

Although the PID field in transport packets is only a 13-bit value with a range of 0x00000 to 0x1FFFF, the PID parameter inthe Packetize Data Tool accepts a full 16-bit value. The most significant bit in this 2-byte value, the 0x8000 position, is used bythe tool as the value of the transport_error_indicator in all output transport packets. Similarly, the second-to-most significant bit,the 0x2000 position, is used as the value of all transport_priority bits. This "hidden" feature may be used, for example, to set thetransport_priority_bit in all transport packets for the private data PID.

The resulting packetized data stream can be input to the MP2TSME Multiplexer and multiplexed as prepacketized data. Thisallows the user to create a multiplex containing private data streams.

The Packetize Data Tool can be run from either the MP2TSME UI or command line as described in the following subsections:

· Using the Packetize Data Tool from the UI

· Using the Packetize Data Tool from the Command Line

7.5.1 Using the Packetize Data Tool from the UI

When the Packetize Data Tool is run from the MP2TSME graphical UI, it is independent of the multiplexing functions, that is,you can use the Packetize Data Tool without disturbing the current transport stream configuration.

To create packetized private section data:

1. Choose Tools > Packetize Data from the Menu Bar.

The Packetize Data dialog box will appear.

2. Enter the name of the input binary data file in the Input File textbox. Instead of entering the input file name directly, you can

click the button to browse your system to select the file. The input file should contain the binary data that will be used asprivate_data_bytes in the private section(s).

3. Enter the name to be used for the output transport packet file in the Output File textbox. Instead of entering the file name

directly, you can click the button to browse your system to specify the location and name of the file.

4. (Optional) Enter the maximum private section length in bytes in the Max Length textbox. This length is the complete lengthof the entire private section including all header fields and the CRC. If the value is 0, the Packetize Data Tool will use amaximum section length of 1024 bytes if the Alternate Format option is checked and 4096 bytes if it is not checked.

5. Enter a value in the PID textbox. This value is the PID of the packets that will carry the private section(s). It may be specifiedin decimal, or if prefaced with a "0x", in hexadecimal.

Although the PID field in transport packets is only a 13-bit value with a range of 0x0000 to 0x1FFF, the PID parameter in

Page 266: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0258

Copyright © 1998 - 2010 Manzanita Systems, Inc.

the Packetize Data Tool accepts a full 16-bit value. The most significant bit in this 2-byte value, the 0x8000 position, isused by the tool as the value of the transport_error_indicator in all output transport packets. Similarly, the second-to-mostsignificant bit, the 0x2000 position, is used as the value of all transport_priority bits. This "hidden" feature may be used, forexample, to set the transport_priority_bit in all transport packets for the private data PID.

6. Enter the table_id of the private section(s) in the table_id textbox. The value may range from 0 to 255 (0x00 to 0xFF),inclusive.

7. (Optional) Check the Set private_indicator bit checkbox to use a value of one in the private_indicator field of the privatesection(s). By default, Set private_indicator will be not be checked and the private_indicator field will have a value of zero.

8. (Optional) Check the Alternate Format checkbox if the non-section syntax format used by General Instrument and Motorolaset-top boxes is required. By default, the Alternate Format option is not checked, which selects the section syntax format (section_syntax_indicator is set to '1').

9. (Optional) Enter the table_id_extension of the private section(s) in the table_id_extension textbox. The value may rangefrom 0 to 65535 (0x00 to 0xFFFF), inclusive.

10.(Optional) Enter the version_number of the private section(s) in the version_number textbox. The value may range from 0to 31 (0x00 to 0x1F), inclusive.

11.Click on the Packetize button at the bottom of the dialog box.

A message box will be displayed when the processing is complete, indicating the number of transport packets that werewritten to the output file.

12.Click the Close button to exit the Packetize Data Utility.

7.5.2 Using the Packetize Data Tool from the Command Line

The Packetize Data Tool can be executed from the command line to create a packetized PID stream of private sections fromany input binary data.

The usage statement for the Packetize Data Tool is:

mp2tsme -p input_file output_file PID table_id [-i] [-m MaxSectionLength] [-xTableExtension] [-v version] [-a]

The Packetized Data Tool arguments are:

Name Use Description

-p Required Execute the Packetize Data Tool

input_file Required The input binary file containing the data that will be used asprivate_data_bytes in the private section(s). The file may bespecified by full path, relative path, or by filename only. Ifonly the filename is given, then MP2TSME will look for thefile in the current directory.

output_file Required The name to be used for the output transport packet file. The file may be specified by full path, relative path, or byfilename only. If only the filename is given, then MP2TSMEwill look for the file in the current directory.

Page 267: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 259

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Name Use Description

PID Required The value of the PID to be used in the packets carrying theprivate section(s). May be specified in decimal, or ifprefaced with a "0x", in hexadecimal.

Although the PID field in transport packets is only a13-bit value with a range of 0x00000 to 0x1FFF, the PIDparameter in the Packetize Data Tool accepts a full 16-bitvalue. The most significant bit in this 2-byte value, the0x8000 position, is used by the tool as the value of thetransport_error_indicator in all output transport packets. Similarly, the second-to-most significant bit, the 0x2000position, is used as the value of all transport_priority bits.This "hidden" feature may be used, for example, to set thetransport_priority_bit in all transport packets for the privatedata PID.

table_id Required The value to use in the table_id field of the private section(s). The value may range from 0 to 255 (0x00 to 0xFF),inclusive.

-i Optional Sets the private_indicator bit to one in the private section(s). By default, the private_indicator bit will be set to zero if the -i option is not present.

-m MaxSectionLength

Optional Sets the maximum length in bytes of the private sections thatare created. If the amount of input data is greater than asection of this maximum length can accomodate, then amultiple section table will be created. The MaxSectionLength value includes all section overheadincluding the CRC, and may not exceed 4096 bytes. Amaximum length of 4096 bytes will be used for all privatesections if the -m option is not present.

-a Optional Selects the non-section syntax format used by GeneralInstrument and Motorola set-top boxes. This indicates thatthe private section uses non-section syntax. If the -a optionis absent, the section_syntax_indicator is set to 1 and thesection syntax format will be used.

-x TableExtension Optional Specifies the value of the table_id_extension field in theprivate section(s). The value may range from 0 to 65535(0x00 to 0xFFFF), inclusive. By default, thetable_extension will be set to zero if the -x option is notpresent.

-v version Optional Specifies the version_number used in the private section(s). The value may range from 0 to 31 (0x00 to 0x1F),inclusive. By default, the version_number will be set tozero if the -v option is not present.

To create packetized private section data:

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -p input_file output_file PID table_id [-i] [-m MaxSectionLength] [-xTableExtension] [-v version] [-a]

When processing is complete, the number of transport packets that were written to the output file will be displayed.

Example

Page 268: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0260

Copyright © 1998 - 2010 Manzanita Systems, Inc.

In this example, the user wants to create a single packet that contains four bytes of data for a decoder application. Thefour-byte payload is an IP address. This packet can then be input to the MP2TSME Multiplexer as prepacketized data.

The user creates a binary data file, IP.bin, that contains the data that will be the payload for the private table. The data consistsof the following four bytes: 192, 168, 0, 35.

The resulting single section table should have a table ID of 0x85, a table_id_extension value of 0x10, and a version_number of0x08. The table should have the section syntax format. The PID value used for the packet should be 0x1FFE. To create atransport packet that contains the desired table, the following command is entered:

mp2tsme –p IP.bin IP.mpg 0x1ffe 0x85 -x 0x10 -v 8

The resulting file, IP.mpg, is a single 188-byte transport packet. It can be input as prepacketized data to the MP2TSMEMultiplexer with the Repeat Parameter enabled and the Rate Parameter set to the desired table repetition rate.

Page 269: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 261

Copyright © 1998 - 2010 Manzanita Systems, Inc.

7.6 DVB Subtitles Tool

The MP2TSME Multiplexer supports multiplexing of DVB subtitles as "private_stream_1" using input files in a specific formatthat is defined by Manzanita Systems. This Private Stream Data file can be generated by inputting subtitle data into the DVBSubtitles Tool.

The DVB Subtitles Tool accepts subtitle data in two different formats:

· VOBSUB format (common extension .idx)

· Spruce Subtitle format (common extension .stl)

The output of the DVB Subtitles Tool, the Private Stream Data file, can be specified as the input file for a Private Stream in themultiplex configuration. The Multiplexer will multiplex the data as a DVB (ETSI EN 300 743) subtitle stream that is identified inthe program as private_stream_1.

If you are running the DVB Subtitles Tool on Solaris, you will need to add the location of the MP2TSME "iconv" library to thesearch path for shared libraries as described in the section, Installing MP2TSME: Solaris.

7.6.1 Making Private Stream Data Files From VOBSUB Input

The DVB Subtitles Tool can convert subtitle data in VOBSUB format (common extensions .idx and .sub) format to a ManzanitaSystems' Private Stream Data file. This file can then be input to the Multiplexer to multiplex a Private Stream carrying DVB(ETSI EN 300 743) subtitles.

MP2TSME supports the following commands in VOBSUB files:

· size - The screen display size, height x width, in pixels.

· palette - The sixteen color DVD palette is specified. Every subtitle uses at most four colors selected from the palette.

· custom colors - A custom set of four colors can be used for all of the subtitles. The word "ON" must follow "customcolors:". "tridx" is the transparency index for the four colors, 0 is opaque, and 1 is transparent. The four colors thenfollow, separated by commas.

· delay - The delay command is used to add or subtract a delay, specified as Hours:Minutes:Seconds:Milliseconds. It canbe used multiple times.

· id, index - The VOBSUB index file can contain multiple sets of subtitles, for different languages or DVD angles. Each setis preceded by the "id:" command. The "id:" command indicates the ISO639-1 language for the subtitle set, and isfollowed by "index:" and an index number which is unique for each subtitle set.

· timestamp, filepos - For each subtitle, the display time is indicated by the "timestamp:" command. The display time is inHours:Minutes:Seconds:Millseconds format. The display time is followed by "filepos:", which indicates the offset into theVOBSUB .sub file where the display data for the subtitle is located.

The VOBSUB file conversion can be run from either the MP2TSME UI or command line using the following parameters:

UI Parameter Command Line Argument /Default Value

Description

Tools > DVB Subtitles >Make From VOBSUB

-svRequired argument

Opens the DVB Subtitles Tool to convertVOBSUB input.

Open VOBSUB Index File infileRequired argument

Input VOBSUB format index file (commonextension is .idx). The VOBSUB .sub file must belocated in the same directory.

Page 270: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0262

Copyright © 1998 - 2010 Manzanita Systems, Inc.

UI Parameter Command Line Argument /Default Value

Description

Extract Subtitle to outfileRequired argument

Output Private Stream Data file

VOBSUB Selection -i IDXDefault = 0

UI: All subtitle sets that are present in the inputfile are displayed and are identified by index andISO 639-1 language code. User may select thedesired subtitle set.Command line: Selects subtitle set from the inputfile that has the index value IDX.

VOBSUB Selection -l L1Default = not used

UI: All subtitle sets that are present in the inputfile are displayed and are identified by index andISO 639-1 language code. User may select thedesired subtitle set.Command line: Select subtitle set from the inputfile that has the ISO 639-1 language code of L1.This option overrides the -i option.

ISO639-2 Language Code -L LANGDefault = use input file

The three-letter code indicating the output DVBsubtitle's language. This specified value willoverride the language code used in the input file. The default value is the one used in the VOBSUBindex file, if available.

Page ID -p PAGEIDDefault = 0

Used when there is more than one subtitle streamin a single PID. MP2TSME will generate only asingle subtitle stream per PID, so subtitles areidentified by PID rather than Page ID. This optioncan usually be left set to 0.

Subtitling type -Y [0 | 1]Default = 0

Output DVB subtitle type:0 = Normal1 = Hard of hearing

Subtitling aspect -A [0 | 1 | 2 | 3]Default = 0

Output DVB subtitle aspect ratio0 = Not critical1 = 4:32 = 16:93 = 2.21:1

Force four bits per pixel -B [2 | 4]Default = 2

The subtitles generated by MP2TSME onlyrequire 2 bits per pixel. However, some decodersdo not process 2 bit per pixel color tables. Byselecting 4, these decoders will work at theexpense of requiring additional bandwidth.

Display width -w WDTHDefault = use input file

The width of the display on which the subtitles willbe presented in pixels. For standard definition,720. For high definition, 1920 or somethingsimilar.

Display height -h HGHTDefault = use input file

The height of the display on which the subtitleswill be presented in pixels. For standard definitionPAL, 576, for NTSC, 480. For high definition,1080 or something similar.

Additional X offset -x XOFSDefault = 0

The subtitles can be adjusted horizontally by thespecified number of pixels. Negative values areallowed.

Page 271: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 263

Copyright © 1998 - 2010 Manzanita Systems, Inc.

UI Parameter Command Line Argument /Default Value

Description

Additional Y offset -y YOFSDefault = 0

The subtitles can be adjusted vertically by thespecified number of pixels. Negative values areallowed.

Color palette -P CUSTOM_PALETTEDefault = 0

The sixteen color DVD palette that is specified inthe input file. Every subtitle uses at most fourcolors selected from the palette. Any of the colorsmay be modified. The CUSTOM_PALETTE argument for the -Poption is a comma-separated list of RGB values inhexadecimal format, where red is encoded asff0000, green as 00ff00, and blue as 0000ff.

Adjust timing ratio -r RATIODefault = 1.0

The timestamps can be adjusted by multiplyingthem by this value. To speed the subtitles up,use a value less than 1. To slow them down, usea value greater than 1.

Time offset (ms) -t OFFSETDefault = 0

The timestamps will be adjusted by adding thisvalue in milliseconds to all of them.

If T is the subtitle's original timestamp, theadjusted value will be:

T * adjust_timing_ratio + time_offset

Subtitles whose adjusted time is negative will notbe in the generated output file. Subtitle timing canalso be adjusted during the multiplexingoperation.

To make a Private Stream file from VOBSUB input (MP2TSME UI):

1. Choose Tools > DVB Subtitles > Make from VOBSUB from the Menu Bar.

The Open VOBSUB Index File dialog box will open.

2. Select the input VOBSUB index file (common extension is .idx) and click Open.

The VOBSUB .sub file must be located in the same directory as the index file.

The DVB Subtitles from VOBSUB window will open. All of the subtitle sets that are defined in the file will be displayed inthe VOBSUB Selection Pane. Each subtitle set will be identified by index number and ISO 639-1 language code. Alloperational parameters will be set to default values.

3. Select the desired subtitle set.

4. If necessary, modify any default values.

5. Click the Preview button to view the encoded subtitles.

6. Click the Make button to create the Private Stream Data file.

The Extract subtitle to dialog box will open.

7. Select the location for the output Private Stream Data file and specify its file name, then click the Save button.

The Private Stream Data file will be created.

Page 272: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0264

Copyright © 1998 - 2010 Manzanita Systems, Inc.

To make a Private Stream Data file from VOBSUB input (MP2TSME UI):

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -sv infile outfile [-i IDX | -l L1] [-p PAGEID] [-L L2] [-x XOFS] [-y YOFS] [-hHGHT] [-w WDTH] [-t OFFSET] [-r RATIO] [ -B BITSPIX] [-Y TYPE] [-a ASPECT]

For infile, give the name of the input VOBSUB index file. For outfile, give the desired name of the Private Streamoutput file. The infile and outfile arguments may be specified by full path, relative path, or by filename only. If onlythe filename is given, then MP2TSME will look for the file in the current directory.

The VOBSUB .sub file must be located in the same directory as the index file.

Either the -i or the -l option should be specified to identify the selected subtitle set.

The remaining arguments are optional. Their functions are outlined in the table above.

7.6.2 Making Private Stream Data Files From Spruce STL Input

The DVB Subtitles Tool can convert subtitle data in Spruce STL format (common extension .stl) format to a Manzanita Systems'Private Stream Data file. This file can then be input to the Multiplexer to multiplex a Private Stream carrying DVB (ETSI EN 300743) subtitles.

MP2TSME supports the following variables in Spruce STL files:

· Color - Specifies a color from the 16 color palette.

· ColorIndex0 - Text color.

· ColorIndex1- Background color.

· ColorIndex2 - Outline color .

· Contrast: - Specifies color transparency, a value from 0 to 15. 15 is completely opaque, 0 is fully transparent.

· Contrast0 (synonym: TextContrast).

· Contrast1 (synonym: BackgroundContrast).

· Contrast2 (synonym: Outline1Contrast).

· Bold - TRUE or FALSE.

· Italic - TRUE or FALSE.

· FontSize - Font size in pixels. Only the first instance is used. The font and font size cannot be changed in the middle ofa file.

· FontName - The name of the font to use. Only the first instance is used. The font cannot be changed in the middle of afile.

· HorzAlign - Horizontal text alignment. One of left, center, or right.

· VertAlign - Vertical text alignment. One of top, center, or bottom.

· XOffset - An additional horizontal offset.

Page 273: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 265

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· YOffset - An additional vertical offset.

· SetFilePathToken - If bitmapped subtitles are to be used, this specifies the token to be used to indicate that the subtitletext references a file, rather than is text to be rendered. Bitmapped subtitles are not currently supported.

· TapeOffset - TRUE or FALSE. If true, the subtitles are expected to be timestamped according to internal timecodes inthe MPEG-2 video, otherwise, they begin at time 0. The DVB subtitle generator places an indication in the generated filethat is used during subsequent multiplexing.

The Spruce STL file conversion can be run from either the MP2TSME UI or command line using the following parameters:

UI Parameter Command Line Argument /Default Value

Description

Tools > DVB Subtitles >Make From Spruce STL

-ssRequired argument

Opens the DVB Subtitles Tool to convert aSpruce STL input file.

Open Spruce STL File infileRequired argument

Input Spruce STL format subtitle data file(common extension is .stl).

Extract Subtitle to outfileRequired argument

Output Private Stream Data file

Font -f [enum]Default = use input file

Name of the font to use.Command line: Enter mp2tsme -ss -f helpto see a list of available fonts.

Size -s FNTSIZEDefault = use input file or 30

Size of the font to use.

Encoding -E [enum]Default = CP1252

The character/language encoding for the STL file. Depending on your operating system, not allencodings are supported. Command line: Enter mp2tsme -ss -E helpto see a list of available encoding types.

Ignore right-to-left Not available UI: If checked, will not reorder any characters inthe STL file, even if they are in character rangesthat would typically be reversed such as Hebrewor Arabic.

Frames per second -T FPSDefault = guessed from inputfile

The number of frames per second expected bythe subtitle timestamps in the STL file. The initialvalue is deduced by examining all of thetimestamps in the file.

ISO639-2 Language Code -L LANGRequired argument

The three-letter language code to be used in theoutput DVB subtitle stream.

Page ID -p PAGEIDDefault = 0

Used when there is more than one subtitle streamin a single PID. MP2TSME will generate only asingle subtitle stream per PID, so subtitles areidentified by PID rather than Page ID. This optioncan usually be left set to 0.

Subtitling type -Y [0 | 1]Default = 0

Output DVB subtitle type:0 = Normal1 = Hard of hearing

Page 274: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0266

Copyright © 1998 - 2010 Manzanita Systems, Inc.

UI Parameter Command Line Argument /Default Value

Description

Subtitling aspect -A [0 | 1 | 2 | 3]Default = 0

Output DVB subtitle aspect ratio0 = Not critical1 = 4:32 = 16:93 = 2.21:1

Force four bits per pixel -B [2 | 4]Default = 2

The subtitles generated by MP2TSME onlyrequire 2 bits per pixel. However, some decodersdo not process 2 bit per pixel color tables. Byselecting 4, these decoders will work at theexpense of requiring additional bandwidth.

Display width -w WDTHRequired argument

The width of the display on which the subtitles willbe presented in pixels. For standard definition,720. For high definition, 1920 or somethingsimilar.

Display height -h HGHTRequired argument

The height of the display on which the subtitleswill be presented in pixels. For standard definitionPAL, 576, for NTSC, 480. For high definition,1080 or something similar.

Additional X offset -x XOFSDefault = 0

The subtitles can be adjusted horizontally by thespecified number of pixels. Negative values areallowed.

Additional Y offset -y YOFSDefault = 0

The subtitles can be adjusted vertically by thespecified number of pixels. Negative values areallowed.

Font outline -S [0 | 1 | 2 | 3 |4]Default = 2

The number of pixels outlining the font.

Font aspect ratio -R BITSPIXDefault = 1.0

Ratio to adjust the font width versus its height. Avalue of 0.5 will make the font width half its height,resulting in a narrower font. This can be used ifdisplay pixels are not square. The value mayrange from 0.1 to 10.0

Line spacing -N LINESPCDefault = 1.0

Changes the spacing between multiple lines in asubtitle. A value less than one will bring the linescloser together, and a value greater than one willspread them apart. The value may range from0.5 to 2.0.

Color palette Not available The sixteen color palette that is specified in theinput file. Any of the colors may be modified.

Adjust timing ratio -r RATIODefault = 1.0

The timestamps can be adjusted by multiplyingthem by this value. To speed the subtitles up,use a value less than 1. To slow them down, usea value greater than 1.

Page 275: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 267

Copyright © 1998 - 2010 Manzanita Systems, Inc.

UI Parameter Command Line Argument /Default Value

Description

Time offset (ms) -t OFFSETDefault = 0

The timestamps will be adjusted by adding thisvalue in milliseconds to all of them.

If T is the subtitle's original timestamp, theadjusted value will be:

T * adjust_timing_ratio + time_offset

Subtitles whose adjusted time is negative will notbe in the generated output file. Subtitle timing canalso be adjusted during the multiplexingoperation.

To make a Private Stream file from Spruce STL input (MP2TSME UI):

1. Choose Tools > DVB Subtitles > Make from Spruce STL File from the Menu Bar.

The Open Spruce STL File dialog box will open.

2. Select the input STL file (common extension is .stl) and click Open.

The DVB Subtitles from Spruce STL window will open. All optional parameters will be set to default values.

3. Specify the Display width and Display height parameters.

The Display width and Display height are required and have no default values.

4. If necessary, modify the default values of any optional parameters.

5. Click the Preview button to view the encoded subtitles.

6. Click the Make button to create the Private Stream Data file.

The Extract subtitle to dialog box will open.

7. Select the location for the output Private Stream Data file and specify its file name, then click the Save button.

The Private Stream Data file will be created.

To make a Private Stream Data file from Spruce ST input (MP2TSME UI):

1. (Windows only) Open an "MS-DOS" Command Prompt window.

2. At the command prompt or in a script, enter the line:

mp2tsme -ss infile outfile -L LANG -h HGHT -w WDTH [-T FPS] [-f FONT] [-s FNTSIZE] [-pPAGEID] [-t OFFSET] [-r TIMERATIO] [-x XOFS] [-y YOFS] [-B BITSPIX] [-S SHDW] [-RFONTRATIO] [-N LINESPC] [-E ENCODING] [-Y TYPE] [-A ASPECT]

For infile, give the name of the input VOBSUB index file. For outfile, give the desired name of the Private Streamoutput file. The infile and outfile arguments may be specified by full path, relative path, or by filename only. If onlythe filename is given, then MP2TSME will look for the file in the current directory.

The -L, -h and -w options are required.

The remaining arguments are optional. Their functions are outlined in the table above.

Page 276: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0268

Copyright © 1998 - 2010 Manzanita Systems, Inc.

7.7 Closed Caption Tools

The Closed Caption Tools that are available with MP2TSME provide four functions for manipulating closed caption data:

· View - The View function displays any closed caption data found in an input video elementary stream in ahuman-readable format.

· Extract - The Extract function writes closed caption data found in an input video elementary stream to an output text file.

· Insert - The Insert function inserts DTVCC (CEA-708-C) and/or A/53 608, caption data into an existing video elementarystream. The input must be provided as hexadecimal data with optional timecodes in a text file. Insertion of DVS157(CEA-608, ANSI/SCTE 20) format caption data is also supported.

· Remove - The Remove function deletes all closed caption data found in an input video elementary stream.

In a typical application, the user has a video elementary stream encoded with closed caption data in a legacy format, e.g.,Divicom or Minerva format. The user instead wants the closed caption data to be in a newer standard format, e.g., ATSC. Theuser first uses the Extract function to extract the closed caption data and save it in hexadecimal format to a text file. TheRemove function is next used to delete all picture user data including the legacy closed caption data from the original videoelementary stream. Finally, the modified video elementary stream and the closed caption data text file are input to the Insertfunction to insert closed caption data back into the video stream in the desired format.

The input closed caption data file for the Insertion function can in one of the following formats:

· Scenarist_SCC V1.0 format

· Computer Prompting and Captioning Company's MCC format

· Simplified SCC format (described in the next section)

The Closed Caption Tool can be run from either the MP2TSME UI or command line as described in the following subsections:

· Using the Closed Caption Tool from the UI

· Using the Closed Cation Tool from the Command Line

7.7.1 Input Closed Caption Data Format

To use the Insert function of the Closed Caption Tool, the closed caption data can be provided in a text file that follows asimplified SCC format. The closed caption data should be given in hexadecimal format with two characters per byte. All whitespace is ignored and any text on a line after a ‘#’ character is ignored. The ‘#’ character allows optional comments to beinserted in the file.

To allow the closed caption data to maintain alignment to the video frames, timecodes may be inserted at the beginning of theline. Timecode values may be specified in the Drop Frame Time Code (DFTC) format or Non-Drop Frame Time Code (NDFTC)

format. DFTC uses the syntax HH:MM:SS;FF, while NDFTC is specified as HH:MM:SS:FF. In both cases, HH is a number ofhours (00 to 24), MM is a number of minutes (00 to 59), SS is a number of seconds (00 to 59), and FF is a number of frames.

Leading zeros in the timecode may not be omitted. If no timecode is provided prior to the first closed caption data, then it isassigned a timecode of 00:00:00:00. Similarly in the video elementary stream, if timecodes are not present, then the first videopicture is assigned a timecode of 00:00:00:00. Pictures for which there is no closed caption data are given a data value of zero.

If the stream contains three field pictures (has inverse telecine), then data for the three field pictures should not be split over twolines. The typical format of closed caption data is to have a timecode followed by all data for that sequence of caption data, andthen the next line contains a new timecode and additional caption data. This results in long lines, however the caption file willwork with both video and film material.

A typical closed caption data file might begin something like:

# Sample Closed Caption Data00:00:21:00 942c 942c

Page 277: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 269

Copyright © 1998 - 2010 Manzanita Systems, Inc.

00:01:01:06 9420 9420 136e 136e 5b20 cd61 6e20

This example shows the typical two bytes per picture grouping and timecodes beginning each burst of closed caption data.

7.7.2 Using the Closed Caption Tools from the UI

All four Closed Caption Tool functions, View, Extract, Insert, and Remove, can be executed from the MP2TSME graphical UI.

Closed Caption View Text

The View function displays any closed caption data found in the picture user data of an input MPEG-2 or H.264/AVC videoelementary stream in a human-readable format. The tool supports viewing of DTVCC (CEA-708-C), ATSC (document A/53),DVS157 (EIA 608 / ANSI/SCTE 20 2001), Divicom, and Minerva closed caption formats.

To view closed captioning decoded from an input video elementary stream:

1. Choose Tools > Closed Caption > View Text from the Menu Bar.

The View Closed Captioning Text dialog box will appear.

2. Enter the name of the input file in the Video ES File textbox, or click the button to browse your system to select andopen the file.

3. Select the desired channel/service to be viewed using the Extract selection drop-down list.

The first field (channels CC1, CC2) or the second field (channels CC3, CC4) of analog-compatible closed caption data canbe viewed, or services 1 through 8 of the DTVCC (CEA-708-C) data channel.

4. Click the View button at the bottom of the dialog box.

The Closed Captioning window will display the output from the Closed Caption Tool in a scrollable text area. The Pausebutton can be used to interrupt the display of the captions. Once paused, the button changes to Resume. Until the userpresses Pause or Close, the tool continues to display the decoded captions, until it reaches the end of the file. A progressbar shows how much of the file has been viewed.

The initial timecode in the video elementary stream and the type of closed caption format that was used will be displayed,followed by the decoded closed captioning. Each line of captioning will be preceded by the timecode of the picture thatcarried the first two bytes of data for the line. if timecodes are not present in the video stream, then the first picture isassigned a timecode of 00:00:00:00.

If no closed caption data is found in the selected channel, the text area will be blank.

5. Click the Save All button to run the View function on the entire input video stream and save the readable output to a text file.

If the input file is large, it may take several minutes for the Closed Caption Tool to process the entire file and save theoutput.

Closed Caption Extract

The Extract function writes the closed caption data found in an input MPEG-2 or H.264/AVC video elementary stream to anoutput text file. The data can be saved in a simplified SCC text format or in Scenarist V1.0 format. In both cases, theassociated timecodes are shown. Zero fill data may be optionally included in the output data, and XDS (Extended DataServices) data may be omitted. The input video file is unchanged. The tool supports extraction of DTVCC (CEA-708-C),ATSC (document A/53), DVS157 (EIA 608 / ANSI/SCTE 20 2001), Divicom, and Minerva closed caption formats.

To extract and save closed caption data found in an input video elementary stream:

1. Choose Tools > Closed Caption > Extract from the Menu Bar.

The Closed Caption Extract dialog box will appear.

Page 278: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0270

Copyright © 1998 - 2010 Manzanita Systems, Inc.

2. Enter the name of the input video elementary stream file in the Input File textbox, or click the button to browse yoursystem to select and open the file.

3. Enter the name to be used for the output text file in the Output File textbox. Instead of entering the file name directly, you

can click the button to browse your system to specify the location and name of the file.

4. Select the desired output format using the Format drop-down list. The Text selection will save the data in a simplified SCCformat described in the section, Input Closed Caption Data Format. The Scenarist V1.0 selection will save the data in SonicScenarist V1.0 closed caption format.

5. Select the field that should be extracted, either the first field (channels CC1, CC2) or the second field (channels CC3, CC4),using the Field drop-down list.

6. (Optional) Check the Include Zero Fill box to include all zero, non-displayed data (0x8080) that is included in the stream. Ifthe box is unchecked, then the zero fill data will be omitted.

7. If the Field control is set to Second (CC3,CC4), then the Remove XDS Data checkbox is enabled. If this box is checked,then all XDS (Extended Data Services) data that is found will be omitted from the saved closed caption data.Because XDS data can only be present in the data for the second field, the Remove XDS Data checkbox isdisabled when Field is set to First (CC1,CC2).

8. Click the Extract button.

A message box will display the progress of the extraction. If the input file is large, it may take several minutes for theClosed Caption Tool to process the entire file and save the output.

Closed Caption Insert

The Insert function inserts DTVCC (CEA-708-C) and/or A/53 608 caption data into an existing video elementary stream. Theclosed caption data must be provided in a text file that is in simplified SCC format or in Scenarist V1.0 format. Insertion ofDVS157 (CEA-608, ANSI/SCTE 20) format caption data is also supported.

To insert input closed caption data in an existing video elementary stream:

1. Choose Tools > Closed Caption > Insert from the Menu Bar.

The Closed Caption Insert dialog box will appear.

2. Enter the name of the input video elementary stream file in the Input File textbox, or click the button to browse yoursystem to select the file.

3. Enter the name to be used for the output video elementary stream file in the Output File textbox. Instead of entering the file

name directly, you can click the button to browse your system to specify the location and name of the file.

4. Enter the name of the input closed caption data file (simplified SCC format, CPC MCC format, or Scenarist V1.0 format) in

the CC File textbox, or click the button to browse your system to select the file.

5. (Optional) Enter a value in the Time Offset textbox to specify an offset that should be added to the timecodes in the videostream to align it with the input closed caption data. The value should be specified in either HH:MM:SS:FF (NDFTC) orHH:MM:SS;FF (DFTC) format. Leading zeros in the value may be omitted. For example, to compensate for closed captiondata that begins at time 00:01:00:00 when the video begins at time 00:00:00:00, the Time Offset should be set to 1:00:00.Note that the timecodes in the video stream are not modified; the offset is only used for alignment during processing.

6. Select from the CC Type drop-down list the type of closed caption format that should be used when inserting the data. Fourtypes are available:

Page 279: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 271

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Type Description

ATSC A/53, no DTVCC Only A/53 608 caption data will be inserted.

ATSC A/53, emptyDTVCC (full 9600 BW)

A/53 608 caption data will be inserted, and the remaining bandwidth (availablefor DTVCC) of 9600 bps allocated for closed caption data will be zeros.

ATSC A/53,synthesized/includedDTVCC

Both A/53 608 and DTVCC caption data will be inserted. If the input file is inSCC format, the DTVCC data will be synthesized. If the file is in CPC MCCformat, the DTVCC data is taken from the input data.

DVS157 / EIA 608 /ANSI/SCTE 20 2001

DVS157 caption data will be inserted.

The ATSC specification requires that a full 9600 bps be included in the user data for both closed caption and DTVCCdata. Since the majority of this bandwidth is used by DTVCC, and is not used by this utility, the first method omits the extrabandwidth and just sends the closed caption data. The second approach includes this full bandwidth; however, the DTVCCdata is empty.

Any DVS157 (SCTE 20) data that is present in the input video stream is not removed or replaced by the inserted A/53608 and DTVCC data, and is still present in the output video.

7. Click the Insert button.

A message box will display the progress of the insertion. If the input file is large, it may take several minutes for the ClosedCaption Tool to process the entire file and save the output.

More than one closed caption type may be inserted (“dual carry”) in a video stream by repeatedly running the Insertionfunction.

Closed Caption Remove

The Remove function deletes all closed caption data, including DTVCC, ATSC A/53 608, DVS157, Divicom, and Minervaformats, found in an input video elementary stream. For MPEG-2 video, all picture user data will be removed. For H.264/AVCvideo, only the closed captioning SEI user data is removed; any other SEI data will be kept.

To save an input video elementary stream to an output video elementary stream file with all closed caption dataremoved:

1. Choose Tools > Closed Caption > Remove from the Menu Bar.

The Closed Caption dialog box will appear.

2. Enter the name of the input MPEG-2 or H.264/AVC video elementary stream file in the Input File textbox, or click the button to browse your system to select the file.

3. Enter the name to be used for the output video elementary stream file in the Output File textbox. Instead of entering the file

name directly, you can click the button to browse your system to specify the location and name of the file.

4. Click the Remove button.

A message box will display the progress of the deletion. The Closed Caption Tool will delete the closed caption data fromthe input file and save the resulting video elementary stream to the output file. If the input file is large, it may take severalminutes for the Closed Caption Tool to process the entire file and save the output.

All picture user data will be removed from MPEG-2 video elementary streams by this function.

Page 280: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0272

Copyright © 1998 - 2010 Manzanita Systems, Inc.

7.7.3 Using the Closed Caption Tools from the Command Line

The Closed Caption Tools can be executed from the command line to view, extract, insert, or remove closed caption data froman existing video elementary stream.

Closed Caption View / Extract

The View function decodes and outputs any closed captions found in the picture user data of an input MPEG-2 or H.264/AVCvideo elementary stream in a human-readable format. The tool supports viewing of DTVCC (CEA-708-C), ATSC (documentA/53), DVS157 (EIA 608 / ANSI/SCTE 20 2001), Divicom, and Minerva closed caption formats.

The Extract function writes the closed caption data found in an input video elementary stream to an output text file. The datacan be saved in a simplified SCC text format or in Scenarist V1.0 format. In both cases, the associated timecodes are shown.Zero fill data may be optionally included in the output data, and XDS (Extended Data Services) data may be omitted. Theinput video file is unchanged. The tool supports extraction of DTVCC (CEA-708-C), ATSC (document A/53), DVS157 (EIA 608/ ANSI/SCTE 20 2001), Divicom, and Minerva closed caption formats.

To view closed captioning decoded from an input video elementary stream:

1. At the command prompt (in a Command Prompt (“MS-DOS”) Console Window if this is a Windows system), type:

mp2tsme -cx input_file [outfile] [-z] [-s] [-2] [-x] [-E S|A] [-d SERVICE]

The Closed Caption View/Extract arguments are:

Name Use Description

-cx Required Execute the Closed Caption View/Extract function

input_file Required The name of the input MPEG-2 or H.264/AVC video elementary stream file. The file may be specified by full path, relative path, or by filename only. Ifonly the filename is given, then MP2TSME will look for the file in thecurrent directory.

output_file Optional If the optional output file is specified, then the Extract function is performedand the closed caption data is saved in simplified SCC format. The filemay be specified by full path, relative path, or by filename only. If only thefilename is given, then MP2TSME will look for the file in the currentdirectory.

If the output file is not specified, then the View function is executed, andthe closed captions are decoded and output in a human-readable format. In this case, no file is saved, but the command can be redirected to anoutput file on the command line, otherwise the output will be sent to theconsole.

-z Optional If the -z option is specified, then all closed caption data will be extracted,including all zero fill, non-displayed data (0x8080).

If the option is not specified, then zero fill data will be omitted

-s Optional; ignored if output_file is notpresent

If the -s option is specified, then the output file is saved in Scenarist V1.0format .

If the option is not specified, then the data will be saved in a simplifiedSCC format described in the section, Input Closed Caption Data Format.

-2 Optional; ignored ifthe -d option ispresent

If the -2 option is specified, then the second field (channels CC3, CC4) ofanalog-compatible closed caption data will be extracted.

If the option is not specified, then the first field (channels CC1, CC2) will beextracted.

Page 281: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 273

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Name Use Description

-x Optional If the -x option is specified, then all XDS (Extended Data Services)data that is found will be omitted from the extracted closed captiondata.

If the option is not specified, then any XDS data present will be retained inthe extracted data.

-E S|A Optional If the -E S option is specified, then DVS157 (SCTE 20) caption data willbe extracted (if both A/53 and SCTE 20 captions are present in the videoES).

If the -E A option is specified, then A/53 CEA 608 caption data will beextracted (if both A/53 and SCTE 20 captions are present in the video ES).

If the option is not specified, then the first closed caption data channel (canbe any format) that is detected is extracted.

-d SERVICE Optional; takesprecedent over the -2 option

If the -d option is specified, then the service specified by the SERVICEargument will be extracted from the DTVCC (CEA-708-C) data channel.The valid range for SERVICE is 1 through 63, inclusive. If the value 64 isspecified, then all services that are found in the DTVCC data channel willbe extracted.

If the option is not specified, then no DTVCC services will be extracted.

If the View function was executed, then the initial timecode in the video elementary stream and the type of closedcaption format that was used will be displayed, followed by the decoded closed captioning. Each line of captioning will bepreceded by the timecode of the picture that carried the first two bytes of data for the line. if timecodes are not present inthe video stream, then the first picture is assigned a timecode of 00:00:00:00.

Closed Caption Insert

The Insert function inserts DTVCC (CEA-708-C) and/or A/53 608 caption data into an existing video elementary stream. Theclosed caption data must be provided in a text file that is in simplified SCC format or in Scenarist V1.0 format. Insertion ofDVS157 (CEA-608, ANSI/SCTE 20) format caption data is also supported.

To insert input closed caption data in an existing video elementary stream:

1. At the command prompt (in a Command Prompt (“MS-DOS”) Console Window if this is a Windows system), type:

mp2tsme -c input_file output_file cc_file [cctype] [-2] [-T] [-e] [-r S|A] [-f 0-7] [-a1] [-o OFFSET]

The Closed Caption Insert arguments are:

Name Use Description

-c Required Execute the Closed Caption Insert function

input_file Required The name of the input MPEG-2 or H.264/AVC video elementary stream file. The file may be specified by full path, relative path, or by filename only. Ifonly the filename is given, then MP2TSME will look for the file in thecurrent directory.

output_file Required The name of the output video elementary stream file. The file may bespecified by full path, relative path, or by filename only. If only the filenameis given, then MP2TSME will look for the file in the current directory.

cc_file Required The name name of the input closed caption data file (simplified SCCformat, CPC's MCC format, or Scenarist V1.0 format). The file may bespecified by full path, relative path, or by filename only. If only the filenameis given, then MP2TSME will look for the file in the current directory.

Page 282: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0274

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Name Use Description

cctype Optional The format of the inserted closed caption data. The valid values are 1, 2,3, and 4. The type codes represent the following formats:

Code Description

1 ATSC A/53, no DTVCC - A/53 608 caption data will be inserted.

2 ATSC A/53, full 9600bps BW (blank DTVCC) - A/53 608 captiondata will be inserted, and the remaining bandwidth (available forDTVCC) of 9600 bps allocated for closed caption data will bezeros.

3 DVS157 / ANSI / SCTE 20 2001 - DVS157 caption data will beinserted.

4 ATSC A/53 full, synthesized/included DTVCC - Both A/53 608and DTVCC caption data will be inserted. If the input file is inSCC format, the DTVCC data will be synthesized. If the file is inCPC MCC format, the DTVCC data is taken from the input data.

If the cctype option is not specified, then a default value of 1 will be used,i.e., only A/53 608 caption data will be inserted.

-2 Optional If the -2 option is specified, then the closed caption data will be inserted inthe second field (channels CC3, CC4).

If the option is not specified, then the data will be inserted in the first field(channels CC1, CC2).

-T Optional If the -T option is specified, then the drop-frame status of timecodes in theinput SCC file are interpreted oppositely. I.e., if the timecodes aredrop-frame (e.g., 1:00:00;20) they will be interpreted as non-drop-frame(e.g., 1:00:00:20), and vice versa.

If the option is not specified, then drop-frame (DFTC) and non-drop-frame(NDFTC) timecodes are interpreted normally.

-e Optional; ignored ifthe -d option ispresent

If the -e option is specified, then the top field is defined as even, and thebottom field as odd.

If the option is not specified, then the top field is defined as odd, and thebottom field as even.

-r S|A Optional If the -r S option is specified, then DVS157 (SCTE 20) data, if present, isremoved when A/53 CEA 608 data is inserted (invalid if cctype is 3).

If the -r A option is specified, then A/53 CEA 608 data, if present, isremoved when DVS157 (SCTE 20) data is inserted (invalid if cctype is 1,2, or 4).

-f FONT Optional If the -f option is given, then the specified DTVCC font type will be used. The valid range for FONT is 0 through 7, inclusive.

If the option is not specified, then a default value of 3 (mono sans) is used.

-al Optional If the -al option is specified and if the video is AVC/H.264, then theclosed caption data is inserted in its own, separate SEI messages.

If the option is not specified, then the closed caption data will be inserted inexisting SEI messages.

-o OFFSET Optional If the -o OFFSET option is given, then OFFSET is an offset that should beadded to the timecodes in the video stream to align it with the input closedcaption data. The value should be specified in either HH:MM:SS:FF(NDFTC) or HH:MM:SS;FF (DFTC) format. Leading zeros in the valuemay be omitted. For example, to compensate for closed caption data thatbegins at time 00:01:00:00 when the video begins at time 00:00:00:00, OFFSET should be set to 1:00:00. Note that the timecodes in the videostream are not modified; the offset is only used for alignment duringprocessing.

Page 283: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 275

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The ATSC specification requires that a full 9600 bps be included in the user data for both closed caption and DTVCCdata. Since the majority of this bandwidth is used by DTVCC, and is not used by this utility, the first method omits the extrabandwidth and just sends the closed caption data. The second approach includes this full bandwidth; however, the DTVCCdata is empty.

More than one closed caption type may be inserted (“dual carry”) in a video stream by repeatedly running the ClosedCaption Tool function.

Closed Caption Remove

The Remove function deletes all closed caption data, including DTVCC, ATSC A/53 608, DVS157, Divicom, and Minervaformats, found in an input video elementary stream. For MPEG-2 video, all picture user data will be removed. For H.264/AVCvideo, only the closed captioning SEI user data is removed; any other SEI data will be kept.

To save an input video elementary stream to an output video elementary stream file with all closed caption dataremoved:

1. At the command prompt (in a Command Prompt (“MS-DOS”) Console Window if this is a Windows system), type:

mp2tsme -cr input_file output_file

For input_file, give the name of the input video elementary stream file. The input_file argument may be specifiedby full path, relative path, or by filename only. If only the filename is given, then MP2TSME will look for the file in the currentdirectory.

For output_file, give the name of the output video elementary stream file. The output_file argument may bespecified by full path, relative path, or by filename only.

The Closed Caption Tool will delete the closed caption data from the input file and save the resulting video elementarystream to the output file. If the input file is large, it may take several minutes for the Closed Caption Tool to process theentire file and save the output.

All picture user data will be removed from MPEG-2 video elementary streams by this function.

7.8 Audio ES Tools

The Audio ES (Elementary Stream) Tool consists of an Information function and a Copy function. The Information functionoutputs basic information about an input audio elementary stream. In addition to the type of encoding that was used to createthe input file (e.g., MPEG audio or AC-3 audio), the Information function will display the sample rate, the bit rate, and the size ofthe encoded audio frames. The Copy function can be used to copy selected frames from an existing audio elementary streamand save them to a new file.

You may want to use the Audio Tool if you have audio streams that were captured from an existing transport stream anddemultiplexed, or that were provided by a third party. The encoding format of these streams may be unknown, or there may besome artifacts, such as encoded noise, or garbage data at the beginning or end of the stream. The Information functionprovides a means of examining an input audio stream and determining its characteristics. You may also wish to use the Copyfunction it to copy all or part of the stream to a new file.

The Audio ES Tool can be run from either the MP2TSME UI or command line as described in the following subsections:

· Using the Audio ES Tool from the UI

· Using the Audio ES Tool from the Command Line

Page 284: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0276

Copyright © 1998 - 2010 Manzanita Systems, Inc.

7.8.1 Using the Audio ES Tool from the UI

The Audio ES Tool can be used in the MP2TSME graphical UI to display basic information about an input audio elementarystream and to copy selected frames from the audio stream to a new file.

To display audio stream information:

1. Choose Tools > Audio ES > Information from the Menu Bar.

The Show Audio ES Information dialog box will appear.

2. Browse your system to select an input MPEG audio, AC-3 audio, AAC, DTS audio, Enhanced AC-3, or MPEG-4 (HE-AACand HE-AAC version 2) audio elementary stream file.

3. Click the Open button at the bottom of the dialog box.

The Audio ES Information box will display a single line describing the type of audio encoding, the sample rate, bit rate andnominal frame size in bytes. The Audio ES Tool will stop processing the input stream at this point.

4. Click the Save All button to run the Audio ES Tool on the entire input stream and save the information to a file.

If the input file is large, it may take several minutes for the Audio ES Tool to process the entire file and save the output. Ifthere are any changes in the encoding characteristics in the file, the Audio ES Tool will indicate the frame at which thechange occurs and display the new characteristics. This may be an indication that the input file has been corrupted.

To copy audio frames:

1. Choose Tools > Audio ES > Copy from the Menu Bar.

The Audio Frame Copy dialog box will appear.

2. Enter the name of the input MPEG audio, AC-3 audio, AAC, DTS audio, Enhanced AC-3, or MPEG-4 (HE-AAC and HE-AACversion 2) audio elementary stream file in the Input File textbox. Instead of entering the input file name directly, you can click

the button to browse your system to select the file.

3. Enter the name to be used for the output audio elementary stream file in the Output File textbox. Instead of entering the file

name directly, you can click the button to browse your system to specify the location and name of the file.

4. Enter the number of the first audio frame that is to be copied in the Begin Frame box. The default value is 1, which indicatesthe first frame in the input file.

5. Enter the number of the last audio frame to be copied in the End Frame box. When End Frame is set to End of File, theAudio Tool will copy all audio frames starting with the Begin Frame value to the end of the file.

6. Click on the Copy button at the bottom of the dialog box.

A message box will be displayed when the Audio ES Tool has finished copying the audio elementary stream, reporting thetotal number of frames that were copied.

7.8.2 Using the Audio ES Tool from the Command Line

The Audio ES Tool can be executed from the command line to display basic information about an input audio elementary streamand to copy selected frames from the audio stream to a new file.

To display audio stream information:

1. At the command prompt (in a Command Prompt (“MS-DOS”) Console Window if this is a Windows system), type:

Page 285: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 277

Copyright © 1998 - 2010 Manzanita Systems, Inc.

mp2tsme -a input_file

For input_file, give the name of the input MPEG audio, AC-3 audio, AAC, DTS audio, Enhanced AC-3, or MPEG-4(HE-AAC and HE-AAC version 2) audio elementary stream file. The input_file argument may be specified by full path,relative path, or by filename only. If only the filename is given, then MP2TSME will look for the file in the current directory.

The Audio ES Tool will display a single line describing the type of audio encoding, the sample rate, bit rate and nominalframe size in bytes. Although the Audio ES Tool outputs the display as soon as it looks at the beginning of the file, it willcontinue to examine the entire file. If the file is large, this may take some time. You may wish to stop the process with acontrol-C after the information is initially displayed. However, if there are changes in any of the encoding characteristics atsome point in the file, the Audio ES Tool will indicate the frame at which the change occurs and display the newcharacteristics. This may be an indication that the input file has been corrupted.

Example

To determine this information about an unknown audio file, sample.aud, the following command is entered:

mp2tsme –a sample.aud

The Audio ES Tool displays the following information:

MP2TSME Audio ToolAC-3 audio: 48000 sps, 384000 bps, frame size = 1536 bytes

To copy audio frames:

1. At the command prompt (in a Command Prompt (“MS-DOS”) Console Window if this is a Windows system), type:

mp2tsme -a input_file output_file beg [end]

For input_file, give the name of the input MPEG audio, AC-3 audio, AAC, DTS audio, Enhanced AC-3, or MPEG-4(HE-AAC and HE-AAC version 2) audio elementary stream file. The output_file argument is the output audioelementary stream file. The input_file and output_file arguments may be specified by full path, relative path, or byfilename only. If only the filename is given, then MP2TSME will look for the file in the current directory.

The beg argument is the frame number of the first frame in the stream to be copied. Optionally, the end argument canspecify the last frame number to be copied. Note that the frames in the input file are numbered starting with 1. If end is notspecified, then the Audio ES Tool will copy all audio frames starting with beg to the end of the file.

Example

In this example, the user wants to copy the AC-3 audio file, music.ac3, starting at the 140th frame to a new file, short.ac3. TheAudio ES Tool is used with the following command:

mp2tsme –a music.ac3 short.ac3 140

The Audio Tool will copy music.ac3 starting at the 140th frame and ending with the last frame in the file. When it is finished, itwill report the total number of frames (access units) that were copied.

If instead of copying to the end of the file, the user would like to copy 300 frames from number 140 through 439, inclusive. Thefollowing command would be executed:

mp2tsme –a music.ac3 short.ac3 140 439

7.9 Video ES Tools

The Video ES (Elementary Stream) Tools may be used to examine or manipulate MPEG-1, MPEG-2 (including Multi-view and4:2:2 profile), or AVC / H.264 / MPEG-4 part 10 video elementary streams. The tools have three different functions:

· Video Information - outputs basic information about the input video elementary stream.

Page 286: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0278

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· Video Frame Copy - copies selected frames from the input video stream and saves them to a new file.

· Plot Rate - displays a plot of the estimated video bit rate versus time, and gives the minimum and maximum rates seen in thestream.

The Information and Copy Tools can be run from either the MP2TSME UI or command line. The Plot Rate Tool can only beexecuted from the UI. Use of the Video ES Tools is discussed in the following sections:

· Using the Video ES Tool from the UI

· Using the Plot Rate Tool

· Using the Video ES Tool from the Command Line

· Video Information

7.9.1 Using the Video ES Tool from the UI

The Video ES Tool can be used in the MP2TSME graphical UI to display basic information about an input video elementarystream and to copy selected frames from the video stream to a new file.

To display video stream information:

1. Choose Tools > Video ES > Information from the Menu Bar.

The Show Video ES Information dialog box will appear.

2. Browse your system to select an input MPEG-2 program stream, or MPEG-1, MPEG-2, or AVC / H.264 / MPEG-4 part 10video elementary stream file.

3. Click the Open button at the bottom of the dialog box.

The Video ES Information window will display the first 100 lines of output from the Video ES Tool in a scrollable text area.This amount of information is sufficient for an overview of the contents of the input stream. The Video ES Tool will stopprocessing the input stream at this point. The section, Video Information, describes the information that is reported for eachtype of input video.

4. Click the Save All button to run the Video ES Tool on the entire input stream and save the information to a file.

If the input file is large, it may take several minutes for the Video ES Tool to process the entire file and save the output.

To copy video frames:

1. Choose Tools > Video ES > Copy from the Menu Bar.

The Video Frame Copy dialog box will appear.

2. Enter the name of the input MPEG-1, MPEG-2, or AVC / H.264 / MPEG-4 part 10 video elementary stream file in the Input

File textbox. Instead of entering the input file name directly, you can click the button to browse your system to select thefile.

3. Enter the name to be used for the output video elementary stream file in the Output File textbox. Instead of entering the file

name directly, you can click the button to browse your system to specify the location and name of the file.

4. Enter the number of the first video frame that is to be copied in the Begin Frame box. The default value is 1, which indicatesthe first frame in the input file.

5. Enter the number of the last video frame to be copied in the End Frame box. When End Frame is set to End of File, theVideo Tool will copy all video frames starting with the Begin Frame value to the end of the file.

Page 287: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 279

Copyright © 1998 - 2010 Manzanita Systems, Inc.

6. Click on the Copy button at the bottom of the dialog box.

A message box will be displayed when the Video ES Tool has finished copying the video elementary stream, reporting thetotal number of frames that were copied.

7.9.2 Using the Plot Rate Tool

The Plot Rate Tool displays a plot of the bit rate of an input video elementary stream estimated over a specified time windowversus time. It also reports the minimum and maximum estimated rates for the entire video stream.

The rate is estimated by computing at each point in time the rate required to send the total number of bits in the upcomingpictures in a specified window of time, referred to as the Rate Window. The Rate Window can be varied from one to 20seconds. For example, if the Rate Window is set to one second for an MPEG-2 video elementary stream with a frame rate of 30fps, the estimated rate at each point is the sum of the number of bits in the next 30 pictures. The Tool reports the minimum andmaximum video rates that were computed.

For MPEG-2 video, the Rate Window should be left at the default setting of one second. For AVC video, the rate window can beadjusted to see how dynamic the video rate is within the stream, however, the window should not be greater than 10 seconds. AVC supports delays of up to 10 seconds, but often such long delays results in long acquisition latency and large decodermemory requirements.

The figure below shows the Plot Rate Tool output for an MPEG-2 video elementary stream.

The Plot Rate Tool has the following components:

Page 288: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0280

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Component Description

Video ES File Name of the input MPEG-1, MPEG-2, or AVC video elementary stream file.

ES Rate Bit rate that is encoded in the video elementary stream syntax.

Minimum Rate Minimum estimated bit rate that was found in the entire stream using the RateWindow.

Maximum Rate Maximum estimated bit rate that was found in the entire stream using the RateWindow.

Rate Window Specifies the length of the time window of video data over which the bit rates arecomputed. The Rate Window may set from one to 20 seconds.

View Sets the segment of time that is displayed in the Plot Pane. The View controlcan be used to zoom in and out on the plot time axis.

Plot Pane Displays a segment of the estimated video bit rate versus time. The vertical axisis the percentage of the ES Rate (encoded video bit rate). The horizontal axis istime in hours, minutes, and seconds. A crosshair is displayed when the mousecursor is placed on the Plot Pane. Labels indicate the time and the estimatedrate in bps at the position of the crosshair.

Stream Overview Displayed below the Plot Pane, this graph depicts an overview of the estimatedvideo rate for the entire stream. Each estimated rate that is computed is a line inthe graph. Any point in the stream at which the estimated rate exceeds the ESrate is indicated as a red line, otherwise it is indicated as a gray line. Theposition of the scrollbar below the Plot Pane relative to the Stream Overviewshows which segment of the stream is displayed in the Plot Pane.

To plot estimated bit rate of a video elementary stream:

1. Choose Tools > Video ES > Plot Rate from the Menu Bar.

The Video Rate window will appear.

2. Enter the name of the input MPEG-1, MPEG-2, or AVC / H.264 / MPEG-4 part 10 video elementary stream file in the Video

ES File textbox. Instead of entering the input file name directly, you can click the button to browse your system to selectthe file.

The Plot Pane window will display a segment of the estimated video bit rate versus time as computed using the specifiedRate Window. The Minimum Rate and Maximum Rate that were computed for the stream will be reported.

3. Adjust the Rate Window if necessary.

The Plot Pane, Minimum Rate, and Maximum Rate will be updated.

4. Adjust the View to the desired size of the plot segment that is displayed in the Plot Pane.

The Video Rate window can be resized to stretch out the displayed plot.

Page 289: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 281

Copyright © 1998 - 2010 Manzanita Systems, Inc.

7.9.3 Using the Video ES Tool from the Command Line

The Video ES Tool can be executed from the command line to display basic information about an input video elementary streamand to copy selected frames from the video stream to a new file.

To display video stream information:

The information displayed by the Video ES Tool may be very long, particularly if there are many video frames in the input file. Itis recommended that you either redirect the output to a file with a “>”, or direct the output to the “more” command so that theoutput can be viewed one screen at a time. The section, Video Information, describes the information that is reported for eachtype of input video.

1. At the command prompt (in a Command Prompt (“MS-DOS”) Console Window if this is a Windows system), type:

mp2tsme -v input_file > out_file

or

mp2tsme -v input_file | more

For input_file, give the name of the input MPEG-2 program stream, or MPEG-1, MPEG-2, or AVC / H.264 / MPEG-4part 10 video elementary stream file. The input_file argument may be specified by full path, relative path, or by filenameonly. If only the filename is given, then MP2TSME will look for the file in the current directory.

The output of the Video ES Tool can be redirected to out_file or can be paged through using more.

If the input file is large, it may take several minutes for the Video ES Tool to process the entire file and save the output.

Example

In this example, a video file, clip1.mpv, is of an unknown format. The Video ES Tool is used to examine the stream with thefollowing command:

mp2tsme –v clip1.mpv > clip1.txt

Note that the output is redirected to a text file, clip1.txt, to make viewing the result easier. The Video ES Tool gives thefollwing output:

MP2TSME Video Tool

Sequence End

SequenceHeader: HorizontalSize=528, VerticalSize=576 AspectRatio=3+4, FrameRate=25, BitRate=6480000, vbvSize=1835008Sequence Extension: Main Profile @ Main Level, low_delay=0Sequence Display ExtensionGOP: Time_code=10:10:30(12), closed=0, broken=01) PictureHeader: Type=I, vbv_delay=24405Picture Coding Extension AU size = 15328 bytes2) PictureHeader: Type=B, vbv_delay=24800Picture Coding Extension AU size = 16727 bytes3) PictureHeader: Type=P, vbv_delay=24559Picture Coding Extension AU size = 16860 bytes4) PictureHeader: Type=B, vbv_delay=24373Picture Coding Extension AU size = 15391 bytes

Page 290: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0282

Copyright © 1998 - 2010 Manzanita Systems, Inc.

5) PictureHeader: Type=P, vbv_delay=24458Picture Coding Extension AU size = 17196 bytes…

The output indicates that the file is a video elementary stream that is in PAL format and has B frames.

To copy video frames:

1. At the command prompt (in a Command Prompt (“MS-DOS”) Console Window if this is a Windows system), type:

mp2tsme -v input_file output_file beg [end]

For input_file, give the name of the input MPEG-1, MPEG-2, or AVC / H.264 / MPEG-4 part 10 video elementarystream file. The output_file argument is the output video elementary stream file. The input_file and output_filearguments may be specified by full path, relative path, or by filename only. If only the filename is given, then MP2TSME willlook for the file in the current directory.

The beg argument is the frame number of the first frame in the stream to be copied. Optionally, the end argument canspecify the last frame number to be copied. Note that the frames in the input file are numbered starting with 1. If end is notspecified, then the Video ES Tool will copy all video frames starting with beg to the end of the file.

Example

In this example, you wish to copy the video file, clip1.mpv, starting at the 25th frame to a new file, short.mpv. The Video ESTool is used with the following command:

mp2tsme –v clip1.mpv short.mpv 25

The Video ES Tool will copy clip1.mpv starting at the 25th frame and ending with the last frame in the file. When it isfinished, it will report the total number of pictures (access units) that were copied.

If instead of copying to the end of the file, you would like to copy 76 pictures from number 25 through 100, inclusive. Youwould execute the following command:

mp2tsme –v clip1.mpv short.mpv 25 100

7.9.4 Video Information

The Video Information Tool will search an input file for MPEG-2 program stream and video elementary stream structures. Whenit is executed from the command line, the Video ES Tool will search the entire length of the stream and output a summary eachtime if finds one of these structures. When run from the MP2TSME GUI, only the first 100 lines of output from the Video ESTool will be displayed to give a preview of the contents of the video elementary stream.

The input file can be a program stream, or an MPEG-1, MPEG-2 (including Multi-view and 4:2:2 profile), or AVC / H.264 /MPEG-4 part 10 video elementary stream. The Video ES Tool does not support transport streams.

The following MPEG-2 video elementary stream structures will be reported:

· Picture Header: AU size, type, vbv_delay

· Reserved Start Code

· User Data: first 8 bytes

· Sequence Header: Horizontal and vertical size, aspect ratio, frame rate, bit rate, vbv size, constrained parameter flag,and presence of quantization matricies

· Sequence Error

Page 291: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 283

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· Sequence Extension: Profile and Level, low_delay flag

· Display Extension

· Quant matrix Extension

· Copyright Extension

· Scalable Extension

· Picture Display Extension

· Picture Coding Extension

· Picture Spatial Scalable Extension

· Picture Temporal Scalable Extension

· Sequence End Code and End Code

· GOP: time code, closed flag, broken flag

The following AVC / H.264 / MPEG-4 part 10 video elementary streams structures will be reported:

· sequence parameter set: constraint_set (0,1,2,3), seq_parameter_set_id, pic_order_cnt_type, PictureWidth,PictureHeight, FrameRate, profile_idc, level_idc, num_units_in_tick, time_scale, bitrate, CPBsize

· picture parameter set: nal_ref_idc, pic_parameter_set_id, seq_parameter_set_id, poc_present

· buffering period SEI: sps_id, initial_cpb_removal_delay, offset

· picture timing SEI: cpb_removal_delay, dpb_output_delay, pic_struct, ClockTimeStamp

· other SEI: hex dump

· access unit delimiter: nal_ref_idc, primary_pic_type

· slice: nal_ref_idc, first_mb_in_slice, slice_type, pic_parameter_set_id, frame_num, field_pic_flag, bottom_field_flag,poc_lsb, POC

If the input file is an MPEG-2 program stream, the following structures will be reported in addition to any of the video structureslisted above.

· Pack Header: system or program stream

· System Header: rate bound

· Program Stream Map

· Private Stream

· Private Stream 2

· Audio PES Header

· Video PES Header

· Reserved Data Stream

· Program Stream Directory

If a video PES header was seen in the input MPEG-2 program stream, you can use the MP2TSME Demultiplexer to extract

Page 292: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0284

Copyright © 1998 - 2010 Manzanita Systems, Inc.

the video elementary stream.

Page 293: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 285

Copyright © 1998 - 2010 Manzanita Systems, Inc.

7.10 Table Generator

The Table Generator is a tool for defining and generating table data. It is only available from the MP2TSME GUI. The interfaceto the Generator presents an editable template of a selected table section that follows the syntax of the defining specification (e.g., MPEG, DVB, ATSC, Blu-Ray). Bit fields in the section can be set to desired values and the resulting data can be added to aTableN Parameter for inclusion in a Table Data stream.

The Generator is invoked during configuration of a Table Data stream when a new table is selected or when a previously addedtable is edited. It may also be opened independently from the MP2TSME Tools menu. In this case, data for a table can be builtand saved to a file for future use.

The set of tables that are available to the Table Generator is defined by a Table Definition Script. This script consists of severaltemplates that each specify the syntax for a table section or a descriptor. The MP2TSME installation includes several TableDefinition Scripts, including ones for ATSC, DVB, and standard MPEG. The Table Definition Script that is currently used by theDescriptor Generator is set up in the Preferences Dialog Box. Table Definition Scripts are written in the MP2TSME TableScripting language. User-defined templates can easily be created in the scripting language, and new Table Definition Scriptscan be created or existing ones can be modified.

Although nothing prevents you from creating a Table Definition Script that includes both ATSC and DVB tables, it is notrecommended. A single table_id value may be used by the two standards with a completely different syntax definition. Therefore, when configuring a transport stream that includes Table Data streams, you should select the appropriate script whenyou set up your preferences.

The following subsections give more information about using the Table Generator and its scripting language:

· Opening the Table Generator

· Using the Table Generator

· Table Scripting

7.10.1 Opening the Table Generator

The Table Generator can be opened either during configuration of a Table Data stream or independently from the MP2TSMETools menu.

During configuration of a Table Data stream, tables are defined using the Table List in the Table Data Parameters Dialog Box.Using the function buttons on the Table List interface, the Table Generator can be opened to define a new table or edit one thatis already on the list.

The Table Generator can be used apart from the Multiplexer to create table data and save it as binary data to a file. The file canlater be loaded into the Table List using the Load function to define a table in a Table Data stream.

To create a new table in the Table Generator:

1. Choose Tools > Table Generator > New Table from the Menu Bar.

The Select Table Dialog Box will open, listing the available table templates. The table templates are defined by the TableDefinition Script that has been selected in the Preferences Dialog Box.

2. Select the desired table from the Select Table list.

After a specific template is chosen from the list, the Table Generator will open, displaying the table syntax. Editable bitfields can then be set to their desired values.

3. Set bit field and section structures as required.

The Table Generator interface is discussed in the section, Using the Table Generator.

Page 294: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0286

Copyright © 1998 - 2010 Manzanita Systems, Inc.

4. Click the Save As button to generate and save the binary table data to a file.

7.10.2 Using the Table Generator

After a new or existing table is selected for editing, the Table Generator interface will open. It will be loaded with an editabletemplate of the table section. The syntax that is used follows that of the defining specification. If this is a new table, defaultvalues will be assigned to bit fields. If an existing table has been loaded, the field values will be set as defined in the table data.

The editable field values can be modified as required. In some cases, the section may have variable length or optionalstructures. These can also be easily set up in the interface.

When using the Table Generator, the following tips should be considered:

· When a field is selected, its bit-field length and valid range will be displayed below the Table Edit pane.

· To change a field, double-click on the value. The value will change to edit mode, allowing a new value to be entered, or ifthe field has enumerated values, to be selected from a drop-down list.

· The plus (+) button will be enabled below the Table Edit pane if the field line that has been selected consists of a variablenumber of structures. Such structures may be labeled as Elements or Descriptors.

· If the field line is labeled Elements, a new element can be added to the section by clicking the + button. An elementgenerally consists of several editable fields. The definition of each element and the number of allowable elementsdepends on the table definition. Each element that is added to a group of elements is given the label, Element #N,where N is a number that is assigned sequentially.

· If the field line is labeled Descriptors, a new descriptor can be added to the section by clicking the + button. The SelectDescriptor list will appear to enable selection of specific descriptor. Once a descriptor is selected, it will appear as astructure below the Descriptors label. The descriptor will consist of several editable fields.

· The available descriptors are defined by the Table Definition Script that has been selected in the Preferences Dialog Box.

· The minus (-) button will be enabled below the table edit pane when a Element #N label or descriptor name is selected.The selected element or descriptor can be deleted from the section by clicking on the - button. Note that deleting theelement or descriptor removes all fields and structures, including nested elements or descriptors, that appear within it.

· MP2TSME does not check the validity of the data that is entered into the editable fields.

7.10.3 Table Scripting

The Table Generator uses a Table Definition Script to define the set of available tables and descriptors. The script is an ASCIIfile written in the MP2TSME Table Scripting language.

The MP2TSME installation includes scripts for standard MPEG, ATSC, DVB, and Blu-Ray. These scripts are provided in the tables folder that can be found in the directory in which the MP2TSME program is installed. The Table Definition Script that isused by the Table Generator can be selected from the scripts that are provided. The scripts can be modified, or user-definedtemplates for tables and descriptors can be added using the Table Scripting language.

Script Syntax

The Table Scripting language is used to create Table Definitions and Descriptor Definitions.

The scripts that are provided in the tables folder can also be opened in a text editor and used as examples of the TableScripting language.

Page 295: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 287

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Only tables comprised of a single section can be assembled. Mutiple section tables must be manually built from individualsections where the "section_number`" and `"last_section_number" are set appropriately.

Tokens

Words

A word is a series of characters which does not contain white space. The first character must not be a digit. All othercharacters may be alpha-numeric, mathematical symbols, or punctuation. Case is ignored in words.

Example words:

service_id_90kHz_flagAC-3_type>=

Numbers

Numbers are integers which can be specified in decimal, or if prefixed with '0x', hexadecimal.

Example numbers:

240x1e

Strings

Strings are text enclosed with either double quotes or braces. The text can span multiple lines in the script whenbraces are used.

Example strings:

"SECAM-coded signal"

{This stringspans more thanone line.}

Binary Data

Binary data is specified with hexadecimal values following a hash and opening brace ( #{ ) and is terminated with aclosing brace ( } ). White space is allowed and ignored inside the braces.

Example binary data:

#{00e1 005F}#{48656C6C6F20776F726C64} ; "Hello world" as binary.

Groups

A group is a number of tokens enclosed with brackets. Groups can contain other groups.

Example groups:

[ country_code 24 ][word1 16 word2 [0 "FM Radio"]]

White Space

Spaces, tabs, and newlines separate tokens and are all equivalent.

Comments

Comments begin with a semicolon (;) and finish at the end of a line.

Page 296: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0288

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Grammar Notation

The following table summarizes the notation used in this document for describing statements in the language:

Notation Example Meaning Example Script Usage

<id> Word or number 0x12

"<filename>" String "/home/My Tables/foo.table"

#{<information>} Binary #{001a44b41c020002}

[...] Group [0 "Reserved" 1 "Analog"]

Text between greater than and less than symbols names part of a statement and is to be replaced (including the </>symbols) in actual usage.

A set of ellipsis (...) inside brackets denotes a group.

All other text is to be taken literally.

Definition Statements

There are three types of definition statements: Include Statements, Table Definitions and Descriptor Definitions.

Include Statements

Scripts can execute other scripts using the include statement. A relative path is relative to where the current scriptresides.

Table definition example:

include "my-tables.table"

Table Definitions

The basic syntax for a table definition is the table name followed by a group of fields. Each field is defined with a namefollowed by a length.

Table definitions use the following syntax:

<table_name> [ table_id 8 <id> ...]

All table definitions begin with a descriptive name, <table_name>, followed by the reserved table_id field. Thebody of the table definition is comprised of statements that define the contents of the table.

Each table defined in a Table Definition Script must be assigned a unique table_name.

Table definition example:

CA_section [ table_id 8 0x01 section_syntax_indicator 1 zero 1 zero reserved 2 ones section_length 12 byte_counter reserved 18 ones version_number 5 current_next_indicator 1

Page 297: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 289

Copyright © 1998 - 2010 Manzanita Systems, Inc.

section_number 8 last_section_number 8 for section_length descriptor CRC_32 32]

Descriptor Definitions

Descriptor definitions use the following syntax:

descriptor <tag> <descriptor_name> [ ...]

Descriptors are similar to tables but they have two predefined 8-bit fields: tag & length. These fields are defined by theequivalent of the following statements:

tag 8 hexlength 8 byte_counter

The value for the tag field is passed from the descriptor definition and the value of the length field is the count of theremaining bytes in the descriptor. The tag field plays the same role for descriptors that the table_id field does fortables. The body of the descriptor definition is comprised of statements that define the contents of the descriptor. Thetable_id and CRC_32 fields should not be used in descriptor definitions.

Each descriptor defined in a Table Definition Script must be assigned a unique descriptor_name.

Descriptor definition examples:

descriptor 5 registration_descriptor [ format_identifier 32 additional_identification_info length binary]

descriptor 3 audio_stream_descriptor [ free_format_flag 1 ID 1 layer 2 variable_rate_audio_indicator 1 reserved 3 ones]

descriptor 10 ISO_639_language_descriptor [ for N [ ISO_639_language_code 24 audio_type 8 ]

enum audio_type [ 0 "Undefined" 1 "Clean effects" 2 "Hearing impaired" 3 "Visual impaired commentary" ]]

Statements

Statements are used in the body of a definition group to specify the structure and logic of a table or descriptor.

Page 298: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0290

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Statement Syntax

Field <field name> <bit length>

<field name> <bit length> <specifiers>

Table ID Field table_id <bit length> <id>

table_id <bit length> <id> to <id>

CRC Field CRC_32 32

Binary Field <field name> <byte length> binary

For Loop for <counter> [ ... ]

for <counter> <structure name>

for <counter> descriptor

If if [<field name> <op> <value>] [ ...]

if [<field name> <op> <value>] [ ...] else [ ... ]

Structure <structure name>

Enumerator enum <field name> [ <value> "<description>" ... ]

Break break

Set set <field name>

Field

Field statements follow the syntax:

<field name> <bit length>

or

<field name> <bit length> <specifier>

The field name is a word, which describes or identifies the field.

The bit length is the number of bits the field occupies. The field length must be between 1 and 48.

The specifier is provided to give information about how the field should be used. If it is not provided, then the fieldformat is assumed to be integer.

Specifier Function

hex Integer value that is displayed in hexadecimal.

zero Hardcodes all bits in field to '0'.

ones Hardcodes all bits in field to '1'.

range <min> <max> Value is limited to range from min to max, inclusive.

byte_counter Field holds a byte length (rather than a number of elements).

packed ascii Field holds ASCII byte values packed into an integer.

Example Fields with a specifier:

section_syntax_indicator 1 zeroreserved_future_use 1 onesnumber of services 5 range 1 16section_length 12 byte_counter

Example Fields without a specifier:

service_loop_length 12

Page 299: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 291

Copyright © 1998 - 2010 Manzanita Systems, Inc.

bsmod 3

Table ID Field

Table ID Field statements follow the syntax:

table_id <bit length> <id>

or

table_id <bit length> <id> to <id>

Normally, the first field of table is the table_id. It identifies the table and associates it with the table name anddefinition. When a table is in binary form (extracted from a stream) the table_id will be used to select the appropriatedefinition for disassembly.

The table_id may be specified as being in a continuous range of values, i.e., <id> to <id>.

A table without a table_id is called a structure and can only be referenced by name from within another table.

Example Table Id Fields:

table_id 8 0x02table_id 8 0x4E to 0x6F

CRC Field

A CRC field will be set to an automatically calculated checksum when the table is generated. It must be the last field inthe table.

CRC fields are automatically given the "hex" specifier.

Example CRC Field:

CRC_32 32

Binary Field

A binary field is a series of bytes.

The length of a binary field may be specified as a number of bytes or as a word that names the field containing the bytelength. If the length is assigned the word "N", then the immediately preceding field contains the length.

Binary Field Examples:

UTC_time 5 binary

textlen 7text_code 1text textlen binary

data_service_descriptor_length 8data_service_data N binary

For Loops

For loops follow the syntax:

for <counter> [...]

For loops repeat data specified in a group, structure, or by descriptors. For loops may be nested.

Page 300: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0292

Copyright © 1998 - 2010 Manzanita Systems, Inc.

The number of times the group is repeated is controlled by the counter. If the counter has the byte_counter specifier,then the loop is repeated until the specified number of bytes have been read.

If the counter field immediately precedes the for statement, then the word "N" can be used for the counter as anabbreviation.

For loop examples:

slotCount 5repetitionCount 3for slotCount [ m4MuxChannel 8 numberofBytes 8]

length_of_items 8 byte_counterfor N [ item_description_length 8 item_description N binary item_length 8 item N binary]

ES_info_length 12for N descriptor

If

If and if/else statements conditionally read groups of fields based on the contents of fields which have already beenread.

If statements follow the syntax:

if [<expression>] [...]

If / else statements follow the syntax:

if [<expression>] [...]else [...]

The expression to evaluate is a group with three tokens. The first token is the name of a field in the table, the second isan operator, and the third is a number to compare the field with. There are six possible operators:

Operator Function

field = n or field == n Equal

field != n Not equal

field > n Greater than

field +>= n Greater than or equal

field < n Less than

field +<= n Less than or equal

If statement examples:

cell_linkage_info 8if [cell_linkage_info = 1] [ bouquet_id 16]if [cell_linkage_info = 2] [ original_network_id 16 hex transport_stream_id 16 hex

Page 301: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Tools 293

Copyright © 1998 - 2010 Manzanita Systems, Inc.

service_id 16]

cc_type 1if [cc_type == 0] [ reserved 5 ones line21_field 1] else [ caption_service_number 6]

Structure

Structures are constructed like table definitions, but they do not include a table_id field. They are independentlydefined, but may be embedded within table or descriptor definitions. Table structures make it easier to organize ascript. For example, a structure containing a block of field statements can be embedded in a for loop inside a tabledefinition.

Structures follow the syntax:

<structure_name> [ ... ]

All structures begin with a descriptive name, structure_name. The body of the table definition is comprised of fieldstatements. The structures may also include if / else statements, for loops, enumerators, sets and other structures.

To reference a structure within a table definition, simply provide the structure_name.

Structure example:

my_struct [ fieldX 8 fieldY 8 ]

example_table_with_my_struct [ table_id 8 0x40 my_struct CRC_32 32 ]

Enumerator

Specific values in a field can be given descriptions or flagged as reserved with an enumerator statement. Thesedescriptions can appear in user interfaces or disassembled tables. Fields marked as "packed_ascii" or greater than 32bits cannot be enumerated. This allows the Table Generator to display the list of description when a value is selectedfor the field. To enumerate values for a field, the enumerator statement should appear in the table definition after allfield definitions are given.

An enumerator statement begins with the enum word. This is followed by the name of the field to enumerate and then agroup of descriptions. The group contains one or more of the following statements:

Statement Type Grammar

Value Description <number> "<description>"

Range Description <number> to <number> "<description>"

Reserved Value <number> reserved

Reserved Range <number> to <number> reserved

Enumerator statement examples:

Page 302: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0294

Copyright © 1998 - 2010 Manzanita Systems, Inc.

enum logical_cell_presentation [ 0 "undefined" 1 "video" 2 "still picture" 3 "graphics/text" 4 to 255 reserved]

my_table [ table_id 8 0x40 side 3 my_field2 5

enum side [ 1 "Left" 2 "Right" 3 "Center" ]]

Break

A break statement is used where a descriptor may optionally end. A descriptor may have multiple breaks. A breakcannot be used in tables; it is only allowed in descriptors.

Set

The set instruction sets a byte_counter to the number of bytes written between the counter and the set instruction.

Set instruction example:

...loop_length 8 byte_counterfor N [ field1 4 field2 4 ]set loop_length...

Page 303: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Chapter VIII

The Terminator

Page 304: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0296

Copyright © 1998 - 2010 Manzanita Systems, Inc.

8 The Terminator

The Terminator is a proprietary technology (U.S. patent No. 6252873) developed by Manzanita Systems that processestransport streams for seamless concatenation. Such processing will enable a smooth transition between individually encodedprograms when they are joined together either offline or in realtime.

The MPEG-2 Transport Stream Multiplexer Enhanced version (MP2TSME) includes the Terminator technology. By usingMP2TSME with the Terminator technology enabled, transport streams can be created for the following applications:

· VOD - Transport streams created with the Terminator enable seamless broadcast of programs pulled from a serverarchive.

· Commercial Insertion - Preparation of compressed commercial material with the Terminator reduces insertionequipment complexity.

· Test Stream Playback - Test streams generated with the Terminator may be continually looped by transport streamplayback equipment. Reacquisition of decoders under test is eliminated.

· Offline Editing - Individually encoded programs are processed with the Terminator and then concatenated offline tocreate new content.

Use of the Terminator is described in the following subsections:

· Using the Terminator

· Terminated Stream Example

8.1 Using the Terminator

Use of the Terminator with MP2TSME is very simple. Since MP2TSME performs the termination on only one program in thetransport stream, the Terminator option is best suited for creating a library of single program transport streams for seamlessconcatenation. The single program may consist of one video elementary stream and one or more audio elementary streams. Normally in an application that requires seamless concatenation, there must be a fixed PID assignment in all of the transportstreams in the library.

MP2TSME will terminate the transport stream according to the timing characteristic of the first video elementary stream in thefirst program. All other elementary streams in the first program are processed relative to the first video stream. MP2TSME mustknow the approximate desired duration of the final transport stream in order to perform the termination process. Therefore, theDuration Parameter is required in the Transport Section of the configuration file when multiplexing a terminated transportstream.

The specified Duration value must be less than the duration of the video elementary stream that is the basis of the termination. This is a requirement so that the Terminator can precisely control the stream transitions. As a general rule, the DurationParameter should be set to one second less than the maximum length of the video elementary stream. The Maximum DurationUtility that is included with MP2TSME can be used to determine the maximum duration of the video elementary stream. It maybe run as a preprocessing step prior to multiplexing a terminated transport stream.

In addition to the Duration Parameter, the Overlap Parameter should be set when creating terminated streams. The OverlapParameter sets the overlap between the time when the transport stream is delivered to the decoder and the time when the firstaccess unit is decoded. The value should be a non-negative integer that represents the overlap as a number of video frameperiods. The Overlap Parameter applies to both the beginning and end of terminated streams. A typical value for the overlap is15 frames.

The value assigned to the Overlap Parameter must not change over a collection of terminated streams that are intended forseamless concatenation. If two streams are terminated with different values for the Overlap Parameter, there may be bufferproblems at the transitions.

The Terminator process only works with MPEG-1 or MPEG-2 video.

Page 305: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

The Terminator 297

Copyright © 1998 - 2010 Manzanita Systems, Inc.

To create a transport stream using the Terminator from the UI:

1. In the Transport Parameters Dialog Box, unclick the Auto setting next to the Duration Parameter, and enter the desiredduration of the terminated transport stream.

2. In the Transport Parameters Dialog Box, set the Terminate Parameter to Yes.

3. In the Transport Parameters Dialog Box, set the Overlap Parameter to the desired overlap that will be applied to the collectionof terminated streams.

4. Set all other required parameters and any desired optional parameters.

5. Choose Tools > Run Mux from the Menu Bar.

or

5. Click (Run Mux) on the Tool Bar.

To create a transport stream using the Terminator from the command line:

1. Include the following parameter assignments in the Transport Section of your configuration file, in addition to other requiredparameters and any desired optional parameter.

Duration = hh:mm:ss:ffTerminate = YesOverlap = overlap

where hh:mm:ss:ff is the desired duration of the terminated output transport stream and overlap is the desired overlapthat will be applied to the collection of terminated streams. The value specified for the Duration Parameter should be aleast one second less than the maximum duration of the first video elementary stream.

2. At the command prompt (in a Command Prompt (“MS-DOS”) Console Window if this is a Windows system) type:

mp2tsme configfile

For config_file, give the name of the configuration file.

8.2 Terminated Stream Example

In this example, a transport stream with the following characteristics is required:

§ Compliant MPEG-2 transport stream.

§ Transport rate of 4.5 Mbps.

§ Terminated transport stream that will be concatenated with two other terminated streams.

§ Duration of 15 seconds.

§ PAT and PMT inserted once per second.

§ PAT transport_stream_id field set to 2.

§ Single program consisting of one MPEG-2 video elementary stream, one MPEG audio stream, and one AC-3 audio stream.

§ PMT program_number set to 1.

§ All elementary streams are copyrighted.

§ One descriptor (ISO_639_language_descriptor) associated with the MPEG audio stream.

Page 306: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0298

Copyright © 1998 - 2010 Manzanita Systems, Inc.

§ Two descriptors (ISO_639_language_descriptor and AC3_descriptor) associated with the AC-3 audio stream

The following configuration file, terminate.cfg, is created. This example creates the output transport stream using MP2TSMEwith the Terminator technology.

Transport*# 15 second adFile = ad1.tsRate = 4500000Duration = 15:00Terminate = YesCreatePSI = YesPSIPATrep = 1PSIPMTrep = 1PATtsid = 0x2Program1*ProgramNumber = 1Video1$PEScopyrt = YesFile = ad1.mpvAudio1$PEScopyrt = YesFile = ad1.mpaDescriptor1 = 0A04656E6700Audio2$PEScopyrt = YesFile = ad1.ac3Descriptor1 = 050441432D33Descriptor2 = 0A04656E6700

MP2TSME is executed by entering the following line at the command prompt:

mp2tsme test2.cfg

MP2TSME displays the following configuration summary:

Configuration:Transport Rate = 4500000.000000Transport Stream Duration = 00:00:15:00Processing with Terminator technologyCreate PSI: Yes PAT repetition rate = 1.000000, PMT repetition rate = 1.000000 PAT transport stream ID = 0x0002, version number = 0Data: NonePrograms: Program 1: PCR PID = 0x0020, PCR period = 90 ms

Program Number = 1, PMT PID = 0x0020, PMT version = 0 Descriptors: None Video: Video 1: PID = 0x0021, PES every 1th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0xE0 (PMT stream_type to be determined from ES) PES: priority=No, align=No, copyright=Yes, original=No Descriptors: None Use vbv_delay field as base initial delay File = ad1.mpv Audio: Audio 1: PID = 0x0024, PES every 5th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0x00

Page 307: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

The Terminator 299

Copyright © 1998 - 2010 Manzanita Systems, Inc.

(PMT stream_type and PES stream_id to be determined from ES) PES: priority=No, align=No, copyright=Yes, original=No Descriptors: 1) 0A 04 65 6E 67 00 File = ad1.mpa Audio 2: PID = 0x0025, PES every 5th AU PTS every 1th PES, stream_type = 0x00, stream_id = 0x00 (PMT stream_type and PES stream_id to be determined from ES) PES: priority=No, align=No, copyright=Yes, original=No Descriptors: 1) 05 04 41 43 2D 33 2) 0A 04 65 6E 67 00 File = ad1.ac3 Data: None SMPTE 302M: None

MP2TSME displays the following status information when the transport stream has been created:

Stream CompleteOutput Filename = ad1.tsFile size = 8427100 bytes, 44825 packetsDuration (hh:mm:ss) = 00:00:14Transport Rate = 4500000 bpsMultiplexing Time = 3 seconds0 errors, 0 warnings

Page 308: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary
Page 309: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Chapter IX

Additional Support

Page 310: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0302

Copyright © 1998 - 2010 Manzanita Systems, Inc.

9 Additional Support

This chapter includes more information about using MP2TSME and where to go if you have additional questions. It has thefollowing sections:

· Frequently Asked Questions (FAQ) is a list of questions and answers that includes tips for using MP2TSME.

· References is a reference list of relevant MPEG standards documents.

· Technical Support tells you how to contact Manzanita Systems for technical support assistance.

9.1 Frequently Asked Questions (FAQ)

Before reporting any problems, please check this list to see if there is a known solution:

· Installation

o I tried running the V6.0, but the header displayed in the command window says the version is V4.0. What is wrong?

· Execution

o When running from the command line, is it possible to direct MP2TSME output messages into a file rather than to thescreen?

o Does MP2TSMM take advantage of multiple processors on my PC?

· Configuration Issues

o I have two video streams that are the output of the demux tool. They are called snippet_01E1.mpv and snippet_01E2.mpv.When I went to insert them into a different multiplex and tried to use the Auto Increment button in the Multiple Files list, itincremented in a way I wasnt expecting. I first used the Add button to input the filename snippet_01E1.mpv then pressedthe Auto Increment button. The filename that showed in the list was snippet_01E02.mpv.

o How do I create a Blu-Ray compatible transport stream using MP2TSME?

· General Transport Issues

o Our customer requires 0.3% null packets in the output. How can we set this?

o Why am I getting these warnings on output from the muxing tool?

o I'm trying to create a stream for a SONY HDV camera but it will not load. How should I configure the mux?

· Transport Rate

o We encode our video at 3 Mbps and audio at 192Kbps. When we set the rate to zero, we get an output rate of 3.3 Mbps. Ifwe set the rate to 3.75Mbps, what happens? Can we expect an improvement in the audio or video?

o We’re muxing video at 3 Mbps and audio at 384 kbps. How much overhead is added in using a transport stream?

o How do I specify a minimum number (e.g., 10%) of null packets in a transport stream?

Page 311: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Additional Support 303

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· Stream Duration

o I set the Duration Parameter to 1:00:00:00, but the Multiplexer says the stream that it created is 00:58:30 (hh:mm:ss). Whyis the output stream shorter than the duration that was specified?

o Is there a way to create a clip of a specified duration and starting point? I want to create a 10-minute clip that starts 30minutes into a movie?

o I would like to minimize the number of null packets in the output transport stream. What is the best approach?

o I am creating streams that have in/out points that are exactly 150 minutes apart.. After concatenating the files, muxing andanalysing, the duration of the finished file is 150 minutes 9 seconds. Why the difference?

· Remultiplexing

o We are trying to remux DVDs to transport streams and need to set the rate to 4Mbps. Can the mux make this conversion?

o I need to remux a set of files forming a single new transport stream file. How can I do this?

o I'm trying to remux a stream and am running out of bandwidth. The video is CBR at 3.18 Mb/S and both audio streams are192 Kb/S. I'm getting bitrate too high errors and a video buffer problem. What can I do?

o I am trying to remultiplex a multiprogram transport stream into a single program transport stream using the CableLabsconfiguration file and I get a video never acquired error. Why?

o I'm remuxing two transport stream files and I get an error at the transition that says there is a loss of audio sync. What canI do to fix this?

· PSI and Private Tables

o Our encoding spec requires the PMT to fit in one packet. Our programs have one video and one or two audios with thelanguage descriptor in audio. Are we OK?

o I have been trying to understand the NITPID parameter, but I do not quite get it. Can you give an example?

· Descriptors

o How do I create a language descriptor for [some language]?

o I have configured the following descriptor, but the set-top does not see it. What's wrong?

o I am attempting to build some content that has a CA descriptor in it. Can you help me?

o We are required to use an AC-3 descriptor. What is it?

· PCR Issues

o If I don't set the PCRPID Parameter and leave the Auto box checked, what PID will carry the PCR in my transport stream?

o I have configured the PCR on the PMT PID. When I analyze my output files I get an error that the PCRs are sometimesfarther than 100ms apart. What is wrong?

o Our content is being rejected because the mux isn't putting the first PCR on the 3rd packet. Why not?

· Adaptation Field Issues

Page 312: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0304

Copyright © 1998 - 2010 Manzanita Systems, Inc.

o The mux has a default InitDI = no for video, but CableLabs requires the DI to be set in the PCR PID. Are the CableLabssettings in the mux broken?

· PES Issues

o I’m trying to create a stream with a PES header on every picture. The PESnau Parameter and video access unitterminology confuse me. What should I do?

· General Video Issues

o My content is film and switches in & out of 3:2 pulldown mode. Will MP2TSME handle this OK?

o Can Manzanita TS multiplexers multiplex files if any part of the video elementary stream is encrypted?

o I want to send still pictures. How do I use this feature?

o Why doesn't the Manzanita Mux work with the H.264 stream I just downloaded from the MAC HD Video Gallery?

o Why did the Multiplexer create such a huge output file when my input file is H.264 video and only 1 MB in size?

· Video Rate and Buffering

o I get underflows when I try to multiplex a video stream, what can I do to fix it?

o I’m muxing an MPEG-1 variable bitrate video stream and the output file is huge, in fact my hard drive fills! What is wrong?

o I am getting lots of video underflow errors halfway through a full movie I'm multiplexing. Creating new elementary streamswith a more moderate bitrate doesn't help either. What do I do?

o I get the following warning: "Picture vbv_delay fields don't match stream rate". What do I do?

· General Audio Issues

o Does MP2TSME support MP3 audio?

o I am trying to multiplex a Dolby 5.1 AC3 stream. Is there a setting for stereo AC3 vs. 5.1 AC3?

o I used the value of 16.9 for the audio SkipFrames parameter. The manual says it is an integer, but I need a fractionaladjustment. Will this work?

o I'm hoping that you could help me with a problem that I'm having muxing PCM audio. All I hear is static when it is playedback. What I'm trying to do is mux a 422 mpeg video stream with 2 pairs (4 channels) of .wav PCM audio. The two stereo.wav files were captured and the .wav headers were removed using a program called 'riffstrip'. After muxing the file, andattempting to play back on a decoder, all I could hear is static. Is there something I should add to the my config settings?

· Audio Rate and Buffering

o I get underflows when I try to multiplex an audio stream, what can I do to fix it?

o We need to create a single program transport stream containing some of the official Dolby AC-3 test material. While tryingto multiplex many of the test clips MP2TSME reports many warnings, and the audio content often stops and starts whenplayed back. How can we fix this?

o Here is the software encoded audio elementary stream file that we are having problems with when trying to multiplex withthe Manzanita tool. What's wrong?

Page 313: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Additional Support 305

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· Data Issues

o I'm creating a transport stream with a single data subsection. Despite asking for a 1:00 duration file, I get only 0:08. Why?

o How do I make a data stream part of a program in the transport stream?

o We need to insert metadata in our streams. How can we do this?

· Lipsync

o When I mux an audio and video stream, the resulting transport has lip sync problems. Why?

o Our customer tells us the audio and video are 'out of sync'. What must we do to correct this?

o While playing the file we notice some audio drift about 5 minutes before the end of the file. Is this "normal behaviour"?

· Set-top and Decoder Playback

o I created a transport stream using MP2TSME, but it will not play on a Zephyr-2000 decoder. What is wrong?

o I create a transport stream using MP2TSME but it will not play on my PC. What is wrong?

o I am trying to solve a problem that relates to trick plays (FF and RW functions).

· Demultiplexer

o I often have to demultiplex 10-20 transport streams to elementary streams. Is there any batch function I can use?

o When I use the Demultiplexer tool and click on the "Select All" button, I don't see that any files have been selected, but the"Demux" button does become active. What is going on?

· Packetize Data Tool

o Is there a trick to packetizing more than 1.5 MB using the Packetized Data Tool? We are doing some tests with data, but Iget "Error packetizing data" if I try with a file larger than 1.5 MB. At 3881000 bps, even if I repeat the file 20 times, it onlylasts 8 seconds. I would like to packetize a very large file so that at 3881000 bps it will run for a few minutes at least.

o Why am I getting an error when using the Packetize Data Tool on files over 2MB?

· DVB Subtitles Tool

o I am trying to generate subtitles with Spruce STL and I get this error: "Subtitle Rendering Error: 6 lines were seen in asubtitle, max is 5 (line 1071)". How do I get rid of this error?

o When I "Make" my VOBSUB subtitle file, I get a popup "Subtitle rending warning: using 106995 bytes, more than the DVBpixel buffer of 80000 bytes", what does this mean?

· Audio ES Tool

o When using the Audio ES Information Tool, why does the rate not always agree with what my encoder says for HE-AACstreams?

Page 314: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0306

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· Video ES Tool

o I am using the video tool to compute the min and max rate on an H.264 stream. When I set the max rate from the tool inthe mux, I still get underflows. Why?

· Terminator and Splicing

o When we terminate our transport streams we note a slight drift in the PCR. The stream is legal, but is this expected?

o I’m trying to splice together two streams. I am using the File1 and File2 parameters to input the video and audioelementary streams. The video muxes fine, but I get an error that Audio lost sync. What is wrong?

Installation

· I previously had MP2TSME V4.0 installed on my PC. I’ve just installed the V6.0 update. I tried running the new version, butthe header displayed in the command window says the version is V4.0. What is wrong?

Your PATH variable includes the MP2TSME V4.0 program which is still installed on your PC. The command interpreter isfinding the MP2TSME V4.0 executable first and executes it. You need to completely uninstall MP2TSME V4.0.

Execution

· When running from the command line, is it possible to direct MP2TSME output messages into a file rather thanto the screen? I would like to save a log.

Yes, use the redirect command, “>”, as follows:

mp2tsme movie.cfg > movie.log

· Does MP2TSME take advantage of multiple processors on my PC?

No, MP2TSME runs as a single process on the PC. Performance is usually more I/O limited.

Configuration Issues

· I have two video streams that are the output of the demux tool. They are called snippet_01E1.mpv and snippet_01E2.mpv.When I went to insert them into a different multiplex and tried to use the Auto Increment button in the Multiple Files list, itincremented in a way I wasnt expecting. I first used the Add button to input the filename snippet_01E1.mpv then pressed theAuto Increment button. The filename that showed in the list was snippet_01E02.mpv..

When implementing the Auto Increment, we treated the count as a minimum of 2 digits, mainly because sorted lists of filescan get misinterpreted when leading zeros are missing. Auto Increment is also done in decimal. When the files weredemuxed, the PID was used to differentiate between the various streams. In this case, the PID included an alpha character(hex) followed by only one numerical character and thus a leading zero was inserted in the Auto Increment.

· How do I create a Blu-Ray compatible transport stream using MP2TSME?

The Blu Ray standard supports many options. You can set up MP2TSME to include the descriptors and tables necessaryfor Blu-Ray support by selecting blu-ray.table as the preferred Table Definition Script (see the section, Preferences DialogBox).

We have also found that the following configuration file will create a Blu-Ray compatible transport stream:

Page 315: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Additional Support 307

Copyright © 1998 - 2010 Manzanita Systems, Inc.

# Blu-Ray configurationTransport*File = bluray.tsVBR = yesPktSize = 192PktCountMultiple = 32PSIPATrep = 11.000PSIPMTrep = 11.000PATtsid = 0x0NITPID = 31SIT = yesSITperiod = 900SITtransDescr1 = 63 08 c1 d4 c0 ff ff ff ff ffSITserviceID = 1PktTS = yesPktTSPre = yesPktTSBits = 30PktTSBytes = 4

Program1*ProgramNumber = 0x1PMTPID = 0x100Descriptor1 = 05 04 48 44 4d 56Descriptor2 = 88 04 0f ff fc fcPCRPID = 0x1001

Video1$File = part1.vidDescriptor1 = 05 08 48 44 4d 56 ff 02 61 3fPID = 0x1011PESalign = yes

Audio1$File = part1.ac3Descriptor1 = 05 04 41 43 2d 33Descriptor2 = 81 04 08 3c 0e 00PID = 0x1100TransportPriority = yesPESalign = yesPESid = 0xfdPESnau = 1BDbuf = yes

General Transport Issues

· Our customer requires 0.3% null packets in the output. How can we set this?

By default, the mux allocates 15 kbps for null packets. You can increase this by specifying a higher output rate or if youroutput rate is fixed, lowering your elementary stream rates. The latter would have to be done at encode time.

The distribution of nulls is fairly uniform, but sometimes video can cause null packets to bunch up. If you set StrictVBV toYes in the video subsection, then the null packets will be more uniformly distributed. This parameter will only work if thevideo has valid vbv_delay fields. If you try this, but get lots of warning when multiplexing, your encoder probably does notcreate valid vbv_delay fields. In this case, you can not use the StrictVBV option.

· Why am I getting these warnings on output from the muxing tool?

Warning: packet = 208342, pid = 0x01E1, time 83.56s Picture vbv_delay fields don’t match stream rate

This is usually caused by StrictVBV being set to Yes in the video subsection of the config file. This parameter was addedfor DIVA VOD servers, and they went out of business years ago. The mux is trying to position each picture in the streamaccording to the vbv_delay value of the picture header. The values in your stream are not correct, so the mux is unable tosatisfy this request. As long as this is the only warning you see, then your output file is fine. To eliminate this warning you

Page 316: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0308

Copyright © 1998 - 2010 Manzanita Systems, Inc.

can delete the StrictVBV parameter or set it to No.

· I'm trying to create a stream for a SONY HDV camera but it will not load. How should I configure the mux?

The Sony HDV camera uses HDV mode HD2. The following configuration file will generate a transport stream that iscompatible with HDV mode HD2. If you are using the MP2TSME GUI, you can set the the corresponding parameters to thevalues in this file.

# Sony HDV cameraTransport*File = movie1.mpgHDVModeHD2=YesAUXApid=0x815AUXVpid=0x811

Program1*programnumber = 100PMTPID = 0x81PCRPID = 0x134Descriptor1 = 050B54534856FF1000FFFFFFFF

Video1$File = movie1.mpvPID=0x810PESalign=Yes

Audio1$File = movie1.mpaPID=0x814PESalign=Yes

Transport Rate

· We encode our video at 3 Mbps and audio at 192Kbps. When we set the rate to zero, we get an output rate of 3.3 Mbps. Ifwe set the rate to 3.75Mbps, what happens? Can we expect an improvement in the audio or video?

No, MP2TSME will fill the unused bandwidth with null packets. There will be no quality difference in the audio or video in thestream.

· We’re muxing video at 3 Mbps and audio at 384 kbps. How much overhead is added in using a transport stream?

The overhead can be determined by running MP2TSME with the output rate set to zero. Subtract from the actual outputrate the sum of the elementary stream rates and you have the transport overhead.

· How do I specify a minimum number (e.g., 10%) of null packets in a transport stream?

The easiest way to do this is to set the output rate in the Transport Parameters to the Minimum option. Run the multiplexerand note the output rate. Then re-run the Multiplexer, but this time, uncheck the Minimum box and specify a Rate valuethat is 10% above the output rate of the previous run.

Stream Duration

· I set the Duration Parameter to 1:00:00:00, but the Multiplexer says the stream that it created is 00:58:30 (hh:mm:ss). Why isthe output stream shorter than the duration that was specified?

The Multiplexer can only create a transport stream that is as long as the input elementary stream with the longest duration.So, your output transport stream will be the length that you desire only if all of your input elementary streams are as long asor longer than the specified duration. In addition, the reported duration may vary by +/- 1 second due to rounding incomputing this value.

· Is there a way to create a clip of a specified duration and starting point? I want to create a 10-minute clip that starts 30minutes into a movie?

Page 317: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Additional Support 309

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Yes, there are two ways to do this. The first is to use the Start and End timecode parameters to select the ten minuteportion of the video. This will also take the corresponding ten-minute section of audio. An alternative approach is to usethe Video ES Tool to copy frames from the video elementary stream starting 30 minutes into the stream. Copy over 10minutes of the stream. Similarly, use the Audio Tool to copy over 10 minutes of the audio elementary stream starting 30minutes into the stream. Then create your transport stream with the elementary stream copies, setting the DurationParameter to 10 minutes.

· I would like to minimize the number of null packets in the output transport stream. What is the best approach?

If the output Rate Parameter is set to zero, MP2TSME will compute a minimum rate. A rate lower than this value may beused. MP2TSME computes the minimum required rate, then adds 15Kbps margin to this amount. The resulting rate can bereduced by up to 15Kbps in most cases if the number of null packets is to be minimized. The resulting stream should beanalyzed to verify that timing requirements are met.

· I am creating streams that have in/out points that are exactly 150 minutes apart on my encoder. After concatenating the files,muxing and analysing [with the Manzanita analyzer], the duration of the finished file is 150 minutes 9 seconds. Why thedifference?

Are you measuring the time with drop frame time codes or non drop frame? Using 30 fps -vs- 29.97 fps; the difference is0.1%, or 150 * 0.001 = 0.15 min = 9 seconds.

Remultiplexing

· We are trying to remux DVDs to transport streams and need to set the rate to 4Mbps. Can the mux make this conversion?

Maybe. If the video in your VOBs is at a low enough rate then it can be remultiplexed directly by MP2TSME. You will needto specify the SourceStreamID. If the video rate is too high to fit in a 4 Mbit transport stream, then the video will have to betranscoded. We do not offer a rate conversion product at this time. If you are able to take the video elementary stream andrecode it at a lower rate, then you can mux the new elementary stream directly.

· I need to remux a set of files forming a single new transport stream file. How can I do this?

Here is a sample config file for remultiplexing based on the spec you provided. You may need to change the input PIDs tomatch your input files. This is specified with the SourceTSPID parameter in both the video and audio subsections. Finally,you will need to specify your input and output files.

For both video and audio, the SourceTSPID specifies the PID in an input transport stream that is to be demuxed by theprogram, and the PID parameter specifies the output PID to use. In the example, there are two input TS files (input1.ts andinput2.ts) and one output file.

# The original TS has PIDs: video=0x30, audio=0x31, pcr=0x30# New TS PIDs: Video=0x30, Audio=0x31, pcr=0x30, pmt=0x3f#Transport*File = output.mpg

Program1*PMTPID = 0x3fPCRPID = 0x30

Video1$File1 = input1.tsFile2 = input2.tsPID = 0x30SourceTSPID = 0x30

Audio1$File1 = input1.tsFile2 = input2.tsPID = 0x31SourceTSPID = 0x31

Page 318: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0310

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· I'm trying to remux a stream and am running out of bandwidth. The video is CBR at 3.18 Mb/S and both audio streams are192 Kb/S. So this all should fit. I'm getting the bitrate too high errors and a video buffer problem. What can I do?

It appears that you are close, but a little short on bandwidth. The mux says you are 83400 bps short. MP2TSME uses amargin of 15 kbps, so you are really at least 64000 bps short. At the 30 second point you have your first underflow whichreaches just over 50kB. This works out to ~13Kbps. Not too much. Without knowing what the video looks like, you can try:

1. Add a delay to the video to allow the video buffer to fill some more before decoding. 50kB would require ~1/8 sec, or~12000 90kHz cycles, so add the following to the video subsection:

delay = 12000

2. If you don't want to disturb the video TS timing, then you can try freeing up some bandwidth. You have PAT & PMTs 8times/second. Each is 188 bytes. If you decrease their frequency to 3/sec, that gives an additional (5+5) * 188 bytes/secto video (= 1880 * 8 = 15kbps)

3. You have PESalign = Yes in both your audio streams. Do you really need this? This feature uses a lot of bandwidthbecause of the relatively small audio frame sizes, a lot of stuffing is used to fill the packets to achieve alignment. If youeliminate the PESalign parameter, the problem will probably go away.

· I am trying to remultiplex a multiprogram transport stream into a single program transport stream. I am able to successfullyextract the target video and audio elementary streams into files video.ves and audio.aes. I verified that the extracted videoplay successfully. I then attempted to remultplex these two streams using the CableLabs configuration file as starting point. When I run the mux, why does it generates the following error?

Fatal Error: packet = 0, PID = 0x01E1, time = 0.00sVideo never acquired.

Most likely your input video does not start with a sequence header and the multiplexer does not see one in the first 250KBof data. You can use the Video Trim Tool to cut off the beginning of the stream:

mp2tsme -t video.ves video2.ves

Then try muxing with the 'trimmed' video file.

Some additional thoughts:- If you are remuxing a transport stream that begins in the middle of a GOP, is this a captured stream? If so, it isprobable that you will have lip sync issues in the remuxed stream. Audio & video at the beginning of a captured streamdo not necessarily correspond to the same presentation time. When you mux two streams, it assumes they begin atthe same time.- Using the video trim tool may remove some video frames and this can introduce additional lip sync problems.

You can adjust any lip sync problems by shifting the audio. Use StreamDelay in the audio subsection to delay the audio ifthe audio leads the video. Units are 90 KHz clock tics, so 45000 will result in a 0.5 second delay of audio. Use Skipframesin the audio subsection if the video leads the audio. Skipframes will drop audio frames from the beginning of the audiostream, thereby advancing the audio. The units are audio frames, which are usually 31ms, so a value of 16 will result in 0.5second shift.

Alternatively you can use the AVsync option to maintain lip sync while remultiplexing.

· I'm remuxing two transport stream files and I get an error at the transition that says there is a loss of audio sync. What can Ido to fix this?

If the error is on a transition, then you may be able to fix the problem by enabling the TransitionCleanUp Parameter. Wehave seen some encoders put out garbage at the begin/end of their audio and we added this feature to work around thisproblem. Just add:

AVsync = YesTransitionCleanUp = Yes

Add the following lines to the audio subsection of the config file or enable these two parameters on the Audio ParametersDialog Box.

Page 319: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Additional Support 311

Copyright © 1998 - 2010 Manzanita Systems, Inc.

PSI and Private Tables

· Our encoding spec requires the PMT to fit in one packet. Our programs have one video and one or two audios with thelanguage descriptor in audio. Are we OK?

The PMT is 16 bytes plus 5 bytes * the number of elementary streams plus any descriptors data bytes. The transportpacket carries up to 184 bytes of payload. As long as you do not have a large number of streams or descriptors your PMTwill be in a single packet.

· I have been trying to understand the NITPID parameter, but I do not quite get it. Can you give an example?

Although the NITPID parameter will add an entry in the PAT for a Network Information Table, you will still have to insert theNIT packets by creating a prepacketized data stream and adding a Data Subsection in your Transport Section. MP2TSMEdoes not create the NIT, we support its use via the NITPID parameter and prepacketized data stream or a Table Datastream.

A typical NIT insertion might look something like:

Transport*File = test.mpgNitPid = 0x10Data1$file=nitpkt.tprate=15040repeat=yesfixcc=yesProgram1*{the rest of your config file}

Assuming the file, nitpkt.tp contains a single NIT in a transport packet with a PID of 0x10, then this packet would be insertedten times per second into the stream. The NITPID parameter configures an entry in the PAT for the NIT on PID 0x10. Therepeat, fixcc, and rate parameters in the data subsection tell MP2TSME to repeat the data in nitpkt.tp at a rate of 15040 bpsand to correct the continuity_counter field in the packets so as to create a legal stream.

Descriptors

· How do I create a language descriptor for [some language]?

The basic format for the 6-byte language descriptor is:

0A = ISO 639 language descriptor tag04 = length of descriptorXX = 1st characterYY = 2nd characterZZ = 3rd character00 = audio type (00 = undefined, 01=clean effects, 02 = hearing impaired, 03 = visual impaired commentary, 04-FF =

reserved (as of '96))

The 3 characters make up a language code. The valid language codes are defined in ISO 639. This information can befound by searching on the web.

· I have configured the following descriptor, but the set-top does not see it. What's wrong?

Descriptor1 = 0x676E651001000100

The Descriptor data that you specified does not use a valid format. The data should not start with a "0x", but should justconsist of the hex data. In addition, the Descriptor format is a one byte tag followed by a one byte length field. This dataindicates the tag is 0x67 and the length is 0x6e = 110, but this does not match the data provided. Keep in mind that theMultiplexer does not verify the accuracy of descriptors.

· I am attempting to build some content using your software that has a CA descriptor in it that points to an ECM stream.However I do not know what the descriptor is or how to do this with your software. Can you help me?

Page 320: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0312

Copyright © 1998 - 2010 Manzanita Systems, Inc.

MPEG defines the basic CA descriptor syntax and gives some information on the use of ECMs and EMMs. Thisinformation is in section 2.6.16 of the MPEG Systems spec (ISO/IEC 13818-1). The CA descriptor definition includes theCA_PID field that specifies the PID for packets that carry access control information, e.g., ECMs. However, the CAdescriptor can include private data bytes. Furthermore, the MPEG spec does not address the contents of ECM messages,as they are are privately defined.

The contents of the CA descriptor will be specific to the vendor making your access control hardware. Once you determinewhat the descriptors look like, you can insert it into the stream with the DescriptorN parameter.

· We are required to use an AC-3 descriptor. What is it?

The AC-3 descriptor is defined on page 120 of the ATSC A/52a document. You can download it from:

http://www.atsc.org/standards.html

You can use the MP2TSME Descriptor Generator to build an AC-3 descriptor and then include it in a PMT.

PCR Issues

· If I don't set the PCRPID Parameter and leave the Auto box checked, what PID will carry the PCR in my transport stream?

If there is a video elementary stream present in your configuration, then the Multiplexer will assign the PCR_PID to thesame PID that carries the video stream. If there is only audio in your transport stream, then the PID used for the first audiostream (Audio 1) will be used for the PCR. If your configuration doesn't include any elementary streams, then theMultiplexer will assign PID 0x1FFF as the PCR_PID. This assignment indicates that there is no PCR associated with theprogram. In this case (no elementary streams are configured), the output transport stream is only two packets long. The firstpacket carries the PAT and the second packet carries an "empty" PMT.

· I have configured the PCR on the PMT PID. When I analyze my output files I get an error that the PCRs are sometimesfarther than 100ms apart. I have tried manually setting this using the PCRper parameter but this seems to make nodifference. What is wrong?

The problem is that the default value for PSIPMTrep is 10. This sets the PMT rate to 10 PMTs per second for an averagePMT (& PCR) interval to 100 ms, so variations will cause violations of the 100 ms spec. You can fix this by making yourPMTs more frequent. In the Program Section add (or change) the PSIPMTrep to 12. You may also want to give the PMTpackets higher priority to avoid multiplex jitter that may cause violations if the spacing is close to 100ms. This is done bysetting the Priority Parameter to Yes in the Program Section.

· Our content is being rejected because the mux isn't putting the first PCR on the 3rd packet. Why not?

After examining the sample stream it was determined the encoder was using invalid vbv_delay field values. This field isused by the multiplexer to set up the initial timing for the stream. You can add the following line to the video subsection tooverride the use of the initial video timing:

typedelay = max

Adaptation Field Issues

· The mux has a default InitDI = no for video, but CableLabs requires the DI to be set in the PCR PID. Are the CableLabssettings in the mux broken?

No. MP2TSME will always set the discontinuity_indicator in the PCR PID at the beginning of the stream even if the InitDIparameter is set to No for that stream. The InitDI option is only effective for non-PCRPID streams.

PES Issues

· I’m trying to create a stream with a PES header on every picture. The PESnau Parameter and video access unit terminologyconfuse me. What should I do?

Page 321: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Additional Support 313

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Because MPEG supports field pictures, where each frame is encoded as two separate pictures, the MPEG ‘picture’ may notbe the picture you intend. Hence the notion of access units was created. MP2TSME offers control over how many accessunits are in each PES packet. For normal NTSC video (i.e., frame pictures) the default value of PESnau = 1 will give you aPES header with every picture.

General Video Issues

· My content is film and switches in & out of 3:2 pulldown mode. Will MP2TSME handle this OK?

Yes, MP2TSME can handle any legal sequence of pictures. Film transitions are not a problem.

· Can Manzanita TS multiplexers multiplex files if any part of the video elementary stream is encrypted? For example, willMP2TSME multiplex a VES if it is encrypted such that the video picture headers are in the clear and the payload isencrypted?

The upper layers of the video would need to be in the clear. We would need to see all the way down to the first sliceheader, beneath that the data could be scrambled.

· I want to send still pictures. How do I use this feature?

Typically, the still picture stream is a sequence of only I frames. However, some decoders require one or two empty Pframes after each I frame. If you use empty P frames, you should set the PESNAU parameter to indicate the total groupsize. For example, if you have two P frames, the PESNAU would be set to three. This is necessary to keep the P frames inthe same PES packet as the I frames for timing purposes.

The other parameter that you will need to set is the StillPicOffset parameter. This should be set to the max time it will taketo transfer the IPP group of pictures. Time is measured in picture times. For example, if your I frames are nominally 50 KBand you are sending the video at 100 kbps, then it will take 50000 * 8 / 100000 = 4 seconds to send each I frame. TheStillPicOffset should be set slightly larger than this value. For 30 fps video, this means the StillPicOffset should be at least120. Using a value that is too small will result in an underflow in the decoder as the larger pictures will not arrive in time. Using a value that is too large will result in an overflow as the decoder waits for the decode time. Note that actual decoderbehavior varies with make and model.

· Why doesn't the Manzanita Mux work with the H.264 stream I just downloaded from the MAC HD Video Gallery?

H.264 encoding does not require some of the parameters, e.g., bit rate and frame rate, that MPEG specifies are necessaryfor creating transport streams. Your H.264 stream probably does not contain bit rate or frame rate information. Tomultiplex the stream, you can explicitly configure the bit rate and/or frame rate if you know the values.

· Why did the Multiplexer create such a huge output file when my input file is H.264 video and only 1 MB in size?

Bit rate information is sometimes not encoded in H.264 streams. If no bit rate is found in the input stream and the video bitrate parameter is not explicitly configured, the Multiplexer will use the maximum rate for the profile and level, which willoften result in files larger than expected

Video Rate and Buffering

· I get underflows when I try to multiplex a video stream, what can I do to fix it?

The input stream probably does not have accurate timing information in it. There are several things to try. If the underflowhappens right away, i.e., within the first second or so, then use the Delay Parameter to increase the amount of data in thebuffer. If the underflow starts later in the stream and gets progressively worse, i.e., the number of bytes that the bufferunderflows by keeps increasing, then the rate at which the stream is multiplexed is too low. Use the Rate Parameter toincrease the rate until the underflows stop. If the underflow is brief, then the stream may not be correctly encoded for thespecified bit rate or decoder buffer size. Either re-encode the stream or try using a higher rate or a larger buffer size withthe DBsize Parameter. Note that using a larger decoder size will result in a transport stream that is not MPEG compliant. Depending on your decoder, it may solve your problem.

· I’m muxing an MPEG-1 variable bitrate video stream and the output file is huge, in fact my hard drive fills! What is wrong?

Page 322: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0314

Copyright © 1998 - 2010 Manzanita Systems, Inc.

MPEG-1 variable bit rate (VBR) video streams have the bit rate field set to the max allowable. For MPEG-1 VBR video theRate Parameter must be specified for the video stream. The value used should be the actual maximum rate that will beencountered in the stream.

· I am getting lots of video underflow errors halfway through a full movie I'm multiplexing. I've read the help files and triedeverything but still the same problem. Creating new elementary streams with a more moderate bitrate doesn't help either. What do I do?

Usually this is caused by the video stream using more bits than it should. There are a couple of things you can try.

First, if your video elementary stream is CBR, then you can do a simple math check of the file size. This is not exact, butwill tell if there is an obvious problem. Assuming you know the duration of the stream, compare this to what you wouldcompute the duration to be based on the video rate and the file size. You can use our MPEGid utility to report the videorate and duration. If the file is CBR, the computed duration should be very close to the expected value (within one second).If the computed duration is longer, then there are more bits than expected which means the actual rate is higher. You candownload MPEGid from:

http://www.manzanitasystems.com/mpegid.html

You can also try a simple test to see if the rate is off by setting a higher rate in the Video Subsection and running the muxagain. For example, if your rate is 3.18Mbps, you might try 3.3Mbps. If this works, the problem isn't fixed, but it verifies thatthe encoder is generating too many bits.

· I get the following warning: "Picture vbv_delay fields don't match stream rate". What do I do?

Unless you need it, disable the StrictVBV parameter. Your input video stream probably does not have accurate vbv_delayfield values and this is causing these warnings. The StrictVBV parameter is supported for a VOD Server that is no longermade.

General Audio Issues

· Does MP2TSME support MP3 audio?

Yes, MP2TSME supports Layer III MPEG audio, as well as Layer I and Layer II. However, few decoders currently supportMP3 audio in a transport stream. Although a particular decoder may play an MP3 file by itself, it may not play it when it ismultiplexed in a transport stream.

· I am trying to multiplex a Dolby 5.1 AC3 stream. Is there a setting for stereo AC3 vs. 5.1 AC3?

The audio internal format (stereo, 5.1, etc.) are at coding layer lower than the transport stream, so is entirely controlled byyour audio encoder. The format does not matter to MP2TSME.

· I used the value of 16.9 for the audio SkipFrames parameter in my config file. The manual says it is an integer, but I need afractional adjustment. Will this work?

Parameters that expect an integer value will ignore all extra data after the integer. If you enter 16.9, it will use the value 16and ignore the 0.9. You can verify this by looking for this parameter in the summary output that is displayed as theMultiplexer begins to run from the command line. The command line program will give the actual value used. If you needfiner control you can add additional delay to the stream with the StreamDelay parameter.

· I'm hoping that you could help me with a problem that I'm having muxing PCM audio. All I hear is static when it is playedback. What I'm trying to do is mux a 422 mpeg video stream with 2 pairs (4 channels) of .wav PCM audio. The two stereo.wav files were captured and the .wav headers were removed using a program called 'riffstrip'. After muxing the file, andattempting to play back on a decoder, all I could hear is static. Is there something I should add to the my config settings?

The problem most likely is caused by a difference between what the multiplexer expects and the actual format of the inputdata. Your config file has no settings specified, so the default values are:

ByteReversed = NoBytesPerWord = 3MSjustified = NoWordSize = 24

Page 323: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Additional Support 315

Copyright © 1998 - 2010 Manzanita Systems, Inc.

This is probably not valid for your input data. Usually .wav files are byte reversed. Did your utility reverse the byte order ofthe samples? What is the word size? Most PC .wav files are 16 bit. The MS justified is probably fine, but the others mayneed changing.

Audio Rate and Buffering

· I get underflows when I try to multiplex an audio stream, what can I do to fix it?

If the underflow happens early in the stream, say within the first second or so, then try using the Delay Parameter toincrease the initial delay and thereby increase the amount of data in the decoder buffer before the first access unit isdecoded. If the underflow is regular throughout the stream and you are using AC-3 audio, then it may be caused by thepotentially larger frame sizes in the higher rate AC-3 streams. Try using the ATSCbuf Parameter to enable the ATSC buffermodel. Alternatively, you can use the DBsize Parameter to specify a larger decoder buffer. This last option will result in astream that is not MPEG compliant, however it may solve your problem if your decoder can handle the stream.

· We need to create a single program transport stream containing some of the official Dolby AC-3 test material. While trying tomultiplex many of the test clips MP2TSME reports many warnings, and the audio content often stops and starts when playedback. How can we fix this?

We have multiplexed the Dolby AC-3 test suite and some of the streams contain bit rate changes and other changes thatcan cause underflows. The solution to this problem is to make sure the transport rate is high enough and set a higher audiobit rate if necessary. For example, if you are multiplexing the audio by itself and do not specify the transport rate, thenMP2TSME will compute the transport rate based on the initial audio bit rate. If the audio bit rate changes to a higher bitrate, underflows will happen.

· Here is the software encoded audio elementary stream file that we are having problems with when trying to multiplex with theManzanita tool. We are having no problems with the files we have created with our hardware encoder. Please let me knowwhat you find.

In your config file you have the rate specified as:

Rate = 128014

but our analyzer says the audio input stream is encoded as:

MC audio: layer 2, 44.1Ksps 256 Kbps

If you omit the Rate parameter from your config file, it should multiplex with no errors.

Data Issues

· I'm creating a transport stream with a single data subsection. The packets all use PID 0x10 and there are 10 packets in thefile. I have included the Repeat Parameter. Despite asking for a 1:00 duration file, I get only 0:08. Why?

The multiplexer will only continue to repeat the input data stream if there are other input streams that have not completed. It will stop multiplexing when all of the input streams have been processed, or the requested duration has been reached. Inthis case, since you do not have other input streams, you will have to lengthen your data stream. You can do this byspecifying the data file repeatedly using the FileN Parameter. Repeating the file 8 times, for example, may allowMP2TSME to run for 1 minute.

· How do I make a data stream part of a program in the transport stream? I need the data to be carried in a User private DataPID? I create a packetized stream file using PID = 0x1EB, but when I configure PID = 0x1EB in data section of the config filethe resulting stream shows up as an undetermined stream.

The PID and StreamType parameters are required in the Data Subsection if you want the data stream to be entered in theprogram's PMT. In this case, the CreatePMTEntry Parameter must be set to Yes. If you have specified both the PID andStreamType, then the PMT will list that PID as part of the program. If you use a stream_type value that indicates privatestream (5 or 6), or user private (0x80-0xff), the decoder will know to look for this data. Unless you include other informationor the decoder has a-priori information (i.e., it looks for AC-3 audio in stream_type 0x81) the data is just undefined user

Page 324: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0316

Copyright © 1998 - 2010 Manzanita Systems, Inc.

private data.

· We need to insert metadata in our streams. How can we do this?

This is a question we often hear, and usually there is a lack of information as to how the metadata is to be inserted into thetransport stream. First, you need to answer these questions:

1. Will the data be in private sections (tables)?

2. If so, are they section syntax, or non-section syntax?

3. If not private sections, then private stream? (PES'd stream)

4. If private stream, private_stream_1 or private_stream_2?

We support some of these formats and expect to support more as time goes on. We also have more tools in ourMP2TSME product. Once you figure out what format you need, we can help you find the necessary tools.

Lipsync

· When I mux an audio and video stream, the resulting transport has lip sync problems. Why?

Lip Sync errors can be caused by different problems. If the offset is variable, then the problem is in the encoded elementarystreams and can not be fixed when multiplexing. If the offset is fixed, then the elementary streams were created starting atdifferent times. This can be fixed by using either the Audio Skipframes Parameter to advance the audio or the AudioStreamDelay Parameter to retard the audio relative to the video.

· Our HD-VOD customer tells us the audio and video are 'out of sync'. What must we do to correct this?

MP2TSME assumes that the input elementary stream files all begin at the exact same time. It sounds like your inputs donot begin at the same time. You can adjust the AV sync at the time of multiplexing to compensate for the different beginningtimes.

If the audio is ahead of the video, that is sounds happen before the action, then the audio can be delayed with the AudioStreamDelay Parameter. The units of StreamDelay are 90KHz cycles, so to introduce a 1/2 second delay would require avalue of 45000.

If the audio lags the video, or sounds happen after the action, then you need to advance the audio. This is done with theAudio SkipFrames Parameter. SkipFrames tells the multiplexer to drop some number of audio frames off the beginning ofthe stream, this effectively advances the audio by that number of frames. The duration of an audio frame is a function of thetype of audio, but they are usually around 31ms. To advance the audio by 1/2 second would typically require a SkipFramesvalue of 15.

We recommend only the audio be adjusted (as opposed to using the StreamDelay parameter with video) because the PCRis carried on the video PID and delaying the presence of PCRs can cause other problems.

If you are lucky, the AV shift will be a fixed amount for your encoder, so you can figure out what compensation you needand always use the same value. Otherwise you will need to determine the adjustment each time. Usually the encoders startin a predetermined fashion, so any compensation is fixed.

· We are using MP2TSME to generate a one hour mp2ts file. While playing the file we notice some audio drift about 5 minutesbefore the end of the file. I was wondering if you could tell me if a) that would be "normal behaviour" given the length of thefile and b) if I could set up some parameters to prevent this problem ?

This is caused by the audio & video elementary streams being created asynchronously. The multiplexer can not alter thetiming within either the video or audio streams, so it can not cause or correct AV drift during the stream. If you have drift,then it was either in the original material or (most likely) was introduced when the audio & video were encoded. This is notnormal & should be fixed at the time the elementary streams are encoded.

Set-top and Decoder Playback

Page 325: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Additional Support 317

Copyright © 1998 - 2010 Manzanita Systems, Inc.

· I created a transport stream using MP2TSME, but it will not play on a Zephyr-2000 decoder. What is wrong?

Some decoders, including the Zephyr-2000, rely on fixed PID assignments. If you have used the MP2TSME default PIDassignments, or configured PID values that do not comply with the decoder’s requirements, the transport stream will not bedecoded. Ask the decoder manufacturer for the required PID values.

· I create a transport stream using MP2TSME but it will not play on my PC. What is wrong?

Most PC-based software decoders will not play a transport stream reliably, if at all. There are some hardware MPEGdecoders that support transport, and even Dolby AC-3 audio, however we have not found any PC decoders that will supportall the different types of audio and video in a transport stream. In addition, a software player will often work at lower rates,but at higher rates or with HD content the decoder starts to have problems. The most reliable way to play transport streamsis with a set-top box.

· I am trying to solve a problem that relates to trick plays. I am encoding/multiplexing using the Manzanita tool for a VODapplication. They are using an OVS and PACE set-top boxes. The content seems to play back fine, but there is an issue withthe FF and RW functions. At certain points of the stream, the STB will crash during the FF function. This problem does notoccur with the content created by the network carrier using an Optibase real time encoder.

Looking at your spec two requirements are not met by the config file:

1. PCR every 40msYou can add the following line to the Program section to meet this requirement:

PCRper = 40

2. Random access indicators set every I frameYou can add the following line to the Video subsection:

RAI = Yes

The lack of the RAI option for video is probably causing the problems you are encountering. The PESalign parametershould also be set to Yes. The RAI is used for trick modes to allow the decoder to quickly find the I frames.

You may also set the RAI parameter to Yes in your audio subsection, but this is not a requirement. You may want to omitthis as it uses a fair amount of bandwidth. The same is true of PESalign in audio.

Demultiplexer

· I often have to demultiplex 10-20 transport streams to elementary streams. Is there any batch function I can use?

You can use the command line version of the MP2TSME Demultiplexer. For example, if you have to demultiplex the videoelementary streams carried in PID 0x21 from four different transport stream files, your batch file would look something like:

mp2tsme -d infile1.mpg outfile1.mpv 0x21mp2tsme -d infile2.mpg outfile2.mpv 0x21mp2tsme -d infile3.mpg outfile3.mpv 0x21mp2tsme -d infile4.mpg outfile4.mpv 0x21

· When I use the Demultiplexer tool and click on the "Select All" button, I don't see that any files have been selected, but the"Demux" button does become active. What is going on?

For Win XP, change Display -> Properties -> theme scheme to "Windows XP (modified)" and for Win Vista changePersonalization -> Window Color and Appearance to "Windows Standard". This sets up the frame and window backgroundcolors to be different enough so that the select all always has enough contrast to show up.

Packetize Data Tool

· Is there a trick to packetizing more than 1.5 MB using the Packetized Data Tool? We are doing some tests with data, but Iget "Error packetizing data" if I try with a file larger than 1.5 MB. At 3881000 bps, even if I repeat the file 20 times, it only lasts8 seconds. I would like to packetize a very large file so that at 3881000 bps it will run for a few minutes at least.

The MPEG spec limits the length of a section syntax format table to 1 MB. Tables are broken into sections. There may be

Page 326: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0318

Copyright © 1998 - 2010 Manzanita Systems, Inc.

up to 256 sections with each section carrying up to 4096 bytes. Because of a small amount overhead in each section, soyou actually get a little less than 1 MB of payload in a table. The only way to send more data is to use multiple tables.

· Why am I getting an error when using the Packetize Data Tool on files over 2MB?

MPEG limits the size of tables to 256 sections of 4 Kbytes each, or a total of 1 MB. You will need to split the data intomultiple tables.

DVB Subtitles Tool

· I am trying to generate subtitles with Spruce STL and I get this error: "Subtitle Rendering Error: 6 lines were seen in a subtitle,max is 5 (line 1071)". How do I get rid of this error?

Using a text editor that displays line numbers, you can directly edit the .stl file. Line Breaks are denoted by "|". You canedit out one or more of those characters taking note that the size and length of each line will also be limited.

· When I "Make" my VOBSUB subtitle file, I get a popup "Subtitle rending warning: using 106995 bytes, more than the DVBpixel buffer of 80000 bytes", what does this mean?

This means that the .idx file is not DVB compliant and "may" not play on the STB. If this is the case, you may want to use adifferent format such as Spruce STL to render the subtitles. You can also choose to ignore the warning, generate thesubtitle file and see if it works for your application.

Audio ES Tool

· When using the Audio ES Information Tool, why does the rate not always agree with what my encoder says for HE-AACstreams?

Depending upon whether the SBR and PS signalling are implicit or explicit, the streams may or may not be backwardscompatible with AAC only decoders. The rate that the Audio ES Tool displays for implicit signaling is the AAC core samplerate. The rate displayed for explicit streams includes the SBR sampling rate. Your encoder may specify only the SBR ratefor an HE-AAC stream.

Video ES Tool

· I am using the Video Tool to compute the min and max rate on an H.264 stream. When I set the max rate from the tool in themux, I still get underflows. Why?

The Plot Rate Tool does not compute the maximum multiplexed rate, but computes an average of the picture sizes over auser specified window. The tool shows how the picture sizes fluctuate over time and is related to the actual bit rate. Usually the actual rate is close to that shown in the plot, but often some adjustment will need to be made. If you are stillseeing underflows, then you will need to increase the rate above that provided by the tool.

Terminator and Splicing

· When we terminate our transport streams we note a slight drift in the PCR. The stream is legal, but is this expected?

Yes, the Terminator will adjust the system clock frequency slightly to eliminate timing discontinuities at stream transitions. As you noted the transport stream is still perfectly legal.

· I’m trying to splice together two streams. I am using the File1 and File2 parameters to input the video and audio elementarystreams. The video muxes fine, but I get an error that Audio lost sync. What is wrong?

Most likely the first audio file does not end with a complete audio access unit. We have seen this problem with someMPEG encoders that put extra (garbage) data at the end of the stream. There are two approaches to solving this problem. The first is to use the Audio ES Tool to copy the audio frames from the original file to a new file. Copy beginning at frame 1

Page 327: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Additional Support 319

Copyright © 1998 - 2010 Manzanita Systems, Inc.

and do not specify an ending frame. This will copy all the complete frames to the new file. This process may also need tobe repeated with the second audio file. After both audio files have been copied, the new files will work in the multiplexer. Alternatively, the files can be multiplexed to create two transport streams using the Terminator process, then these streamscan be concatenated together.

Page 328: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0320

Copyright © 1998 - 2010 Manzanita Systems, Inc.

9.2 References

The following list of documents are the primary references for the standards used by MP2TSME:

1. ISO/IEC 11172-1:1993: Information technology -- Generic coding of moving pictures and associated audio for digital storagemedia at up to about 1.5 Mbits/s - Part 1 : Systems.

2. ISO/IEC 11172-2:1993: Information technology -- Generic coding of moving pictures and associated audio for digital storagemedia at up to about 1.5 Mbits/s - Part 2 : Video.

3. ISO/IEC 11172-3:1993: Information technology -- Generic coding of moving pictures and associated audio for digital storagemedia at up to about 1.5 Mbits/s - Part 3 : Audio.

4. ISO/IEC 13818-1:2007: Information technology -- Generic coding of moving pictures and associated audio information -- Part1: Systems.

5. ISO/IEC 13818-2:2000: Information technology -- Generic coding of moving pictures and associated audio information -- Part2: Video.

6. ISO/IEC 13818-3:1998: Information technology -- Generic coding of moving pictures and associated audio information -- Part3: Audio.

7. ISO/IEC 13818-7:2006: Information technology -- Generic coding of moving pictures and associated audio information -- Part7: Advanced Audio Coding (AAC).

8. ISO/IEC 14496-2:2004: Information Technology - Coding of audio-visual objects - Part 2: Visual

9. ISO/IEC 14496-3:2005: Information Technology - Coding of audio-visual objects - Part 3: Audio

10.ISO/IEC 14496-10:2005: Information Technology - Coding of audio-visual objects - Part 10: Advanced Video Coding

11.ISO/IEC 13818-1 Information technology - Generic Coding of Moving Pictures and Audio: Systems -- Amendment 3:Transport of AVC video data over ITU-T Rec H.222.0 ISO/IEC 13818-1 streams

12.Advanced Television Systems Committee: ATSC Digital Television Standard, Document A/53 Revision E, with AmendmentsNo. 1 and 2.

13.Advanced Television Systems Committee: Guide to the Use of the ATSC Digital Television Standard, Document A/54.

14.Advanced Television Systems Committee: Digital Audio Compression (AC-3, E-CA-3) Standard, Document A/52 Revision B.

15.Advanced Television Systems Committee: Program and System Information Protocol for Terrestrial Broadcast and Cable,Document A/65 Revision C with Amendment No. 1.

16.ETSI EN 300 468, V1.8.1 (2008-07): Digital Video Broadcasting (DVB); Specification for Service Information (SI) in DVBSystems.

17.ETSI EN 300 472 V1.3.1 (2003-05): Digital Video Broadcasting (DVB); Specification for conveying ITU-R System B Teletextin DVB bitstreams.

18.ETSI EN 300 743 V1.3.1 (2006-11): Digital Video Broadcasting (DVB); Subtitling systems.

19.ANSI/SCTE 35 2007: Digital Program Insertion Cueing Message for Cable.

20.ANSI/SCTE 43: Digital Video Systems Characteristics Standard for Cable Television, 2005.

21.EIA/CEA-708-C: Digital Television (DTV) Closed Captioning, 2006.

22.ITU-R Recommendation 653: System B, 625/50 television systems.

23.MD-SP-VOD-CEP2.0-I02-070105: Content Encoding Profiles 2.0 Specifications, January 5, 2007, Cable TelevisionLaboratories, Inc.

24.Specifications of HDV Recording Format, Version 1.0, September 2003.

Page 329: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Additional Support 321

Copyright © 1998 - 2010 Manzanita Systems, Inc.

9.3 Technical Support

Manzanita Systems provides this User's Manual with your copy of MP2TSME as the first level of support. If you do not find ananswer to your question in the User's Manual, contact Manzanita Systems technical support by phone, fax, or Internet.Manzanita Systems technical support is available as follows:

Phone1-858-679-8990Monday through Friday9:00 a.m. - 5:00 p.m. PST

Fax1-858-679-8991

E-mail

[email protected]

Web Site www.manzanitasytems.comProduct news, FAQ, maintenance release and update information

Page 330: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary
Page 331: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Chapter X

Revision History

Page 332: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0324

Copyright © 1998 - 2010 Manzanita Systems, Inc.

10 Revision History

The following table outlines the history of changes made to MP2TSME with each released version, starting with Version 4.0.

Version Description

4.0 Added graphical user interface for configuration and multiplexing

Added support for Mac OS X

Added automatic generation of multiple output filenames

Added automatic generation of multiple input filenames

Transport: Filesize parameter no longer limited to 2GB

Transport: Added StopOnWarning and StopOnError parameters

Added support for HDV Mode HD1 and HD2

Transport: Added DITTransition, SITPeriod, SITVersion, SITTransDescr, SITServiceID,SITRunningStatus, SITSvcDescr parameters

Transport: Added AUXVPID, AUXAPID, ADVDropFrame parameters

Transport: Added support for Time Stamps on Packets

Video: Added support for AVC / H.264 / MPEG-4 part 10

Video: Added support for 4:2:2 profile video

Video: Added AVSync parameter

Video: Added FrameRate parameter

Video: Added StillPicOffset parameter

Audio: Added support for DTS audio

Audio: Added support for Enhanced AC-3 Dolby audio

Audio: Added AVSync parameter

Audio: Added TransitionCleanUp parameter

Audio: Added DVBbuf parameter

Audio: Added SourceStreamSubtype parameter

SMPTE302M: Added AVSync parameter

Data: Changed name of Delay parameter to StreamDelay

Table Data: Added support

Added Descriptor Generator

Command Line File I/O Override: Added multiple input file support

Command Line File I/O Override: Added multiple output file support

Demultiplexer: Added SMPTE302M PCM audio support into WAV or BWF files

Demultiplexer: Added VOB support

Added Table Generator and templates for all DVB and ATSC tables

Extract Packets Tool: Added option to extract packets based on video timecodes

Extract Packets Tool: Added option to extract first N packets from stream

Packetize Data Tool: Added support for non-section syntax alternate format

Packetize Data Tool: Added control of private_indicator bit

Added support of user-defined tables and descriptors

Page 333: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Revision History 325

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Version Description

5.0 Added support for Windows Vista

Added "Cablelabs HD" configuration type

Added Private Stream to support DVB subtitles and teletext

Added support for SCTE 35 data stream

Added check for duplicate program_number

Transport: Added checks for Start and End timecodes that are not seen

Transport: Added StopOnAV Parameter

Remux: Added DescFromData to extract descriptors from input file

Remux: Added drag & drop capability to remux Program & System streams

Video: Added support for MPEG-4 part 2 video

Video: Added timestamp checks for input video ES files

Video: Added AVC start & end timecode support

Video: Disable quadbyte and noemptyAF for AVC video

Video: Added POC support for AVC

Video: Added IgnorePOC Parameter

Video: Added RAI support for AVC

Video: Watch for huge CPB and DPB delays

Video: Added full frame rate support for AVC

Video: Added warning check for AVC streams with B pictures in low_delay mode

Video: Increased video delay limits to +- 900000 (10sec) for AVC

Video: Fixed AVC timing for CPB removal and DPB output delay pictures

Audio: Added support for MPEG-4 (HE-AAC and HE-AAC version 2) audio

Audio: Added support for MPEG Audio layers 1-3 low sample rates

Audio: Added support for Enhanced AC3 substreams and small block frames

Audio: Added support for detection & correction of byte reversed AC-3

Audio: Changed ATSC buffer model for AC-3 to meet A/53E amd 1 (Apr 2006)

Audio: Fixed false warnings with small and varying frame sizes

Demultiplexer: Added MPEG-4 file support

Demultiplexer: Added capability to demux multiple files

Demultiplexer: Added support for packet sizes greater than 188 bytes

Maximum Duration Utility: Added support for AVC

Maximum Duration Utility: Added support for AAC, Enhanced AC-3 and HE-AAC

Extract Packets Tool: Improved user interface

Closed Caption Tools: Added support for AVC

Closed Caption Tools: Added Scenarist mode

Closed Caption Tools: Added support for DFTC in Scenarist CC files

Video ES Tools: Added Plot Rate tool

Video ES Tools: Added user data and other fields to AVC information

Video ES Tools: Fixed copy function for single slice AVC pictures

Table Generator: Improved the table editor interface

DVB Subtitles Tool: Added tool to convert Spruce STL and VOBSUB to subtitle file

Command Line MP2TSME: Replace PID supports multiple streams

Page 334: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0326

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Version Description

6.0 Added support for Windows 7 and Windows Server 2008

Added support for variable bit rate (VBR) single program transport streams

Improved Windows performance, including file I/O and multiplexing speed

Support for Blu-Ray descriptors and other transport-specific unique requirements

Transport: Added PktCountMultiple Parameter

Improved Remultiplexer performance

Improved drag-and-drop configuration

Transport: Added PktCountMultiple Parameter

Transport: Added BurstNulls, BurstNullsCount, BurstNullsSpacing Parameters

Transport: Added PktTSBits Parameter

Video: Added support for all AVC frame rates including non standard frame rates

Video: Added stream_id_extension Parameter

Video: Added FrameRateTolerant Parameter

Video: Added Minimum option for the Rate Parameter

Video: Added MaxDecodeDelay Parameter

Video: Added RateAdjustment Parameter

Video: Added support for synthesis of DTVCC (CEA-708-C) data

Video: Added CreateDTVCC Parameter

Video: Added CCField Parameter

Video: Added CCTimeOffset Parameter

Video: Added PESPrivateDataFile Parameter

Video: Added support for PES Private Data File to insert pes_private_data field

Audio: Added stream_id_extension Parameter

Audio: Added support for Layer1, Layer2 audio with low sampling frequencies (LSF)

Audio: Added PESPrivateDataFile Parameter

Audio: Added support for PES Private Data File to insert pes_private_data field

SMPTE 302M: Added stream_id_extension Parameter

Private Stream: Added support for private_stream_2 multiplexing

Private Stream: Added support for DataOnly Parameter

Private Stream: Added support for index and payload in two files

Private Stream: Added support for FrameSize Parameter

Private Stream: Added support for NoVideoBase Parameter

Private Stream: Added support for SyncVideoTC Parameter

Private Stream: Added support for AdjustStart Parameter

SCTE 35 Stream: Added support for SyncVideoTC Parameter

SCTE 35 Stream: Added support for AdjustStart Parameter

Closed Caption Tool: Improved Insertion & extraction of caption data into H.264 / AVC

Closed Caption Tool: Added support for DFTC in SCC files

Closed Caption Tool: Added ability to synthesize DTVCC from A/53 data in SCC file

Closed Caption Tool: Added support for both first & second fields

Closed Caption Tool: Added support for multiple DTVCC services

Closed Caption Tool: Added ability to remove XDS data from second field

Closed Caption Tool: Added ability to remove just caption data from user data

Demultiplexer: Added support for KLV (Key Length Value) data

Demultiplexer: Added demultiplexing of multiple streams from MPEG-4 media files

Demultiplexer: Added demultiplexing of private stream to payload only file

Demultiplexer: Added demultiplexing of private stream to separate index & payload files

Page 335: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Revision History 327

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Page 336: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary
Page 337: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Chapter XI

License Agreement

Page 338: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0330

Copyright © 1998 - 2010 Manzanita Systems, Inc.

11 License Agreement

This chapter displays the license agreements for MP2TSME. It contains the following sections:

· Demo Version License Agreement is the legal agreement to which you are bound when you install and run the demoversion of the MP2TSME program.

· Registered User License Agreement is the legal agreement to which you are bound when you install and run the full,registered version of the MP2TSME program.

11.1 Demo Version License Agreement

This is a legal agreement between you (either an individual or an entity) and Manzanita Systems, Inc. By installing the softwarepackage and/or by using the MPEG-2 Transport Stream Multiplexer Enhanced Version (MP2TSME), you agree to be bound bythe terms of this Agreement. The demo version of MP2TSME is provided at no charge to you for your evaluation.

As an unregistered user of MP2TSME you agree to the following:

1. You are free to share copies of MP2TSME with others, however, you may not alter the software in any way.

2. You may not sell copies of MP2TSME or otherwise distribute it for profit.

3. You may not reverse engineer, decompile, or disassemble the MP2TSME program.

4. By installing and using MP2TSME, you acknowledge that you have read this license, understand it, and agree to bebound by all of its terms.

COPYRIGHT MP2TSME is owned by Manzanita Systems, Inc. and is protected by United States copyright laws andinternational treaty provisions. Therefore you must treat the MP2TSME software like any other copyrighted material. You maynot print copies of any user documentation provided in "online" or electronic form.

LIMITED WARRANTY AND REMEDIES The MP2TSME program is provided "as is" without warranty of any kind, eitherexpress or implied, including, but not limited to warranties of merchantability or fitness for a particular purpose. In no event shallManzanita Systems, Inc. be liable for any damages whatsoever (including, without limitation, damages for loss of businessprofits, business interruption, loss of business information, or other pecuniary loss) arising out of the use or inability to useMP2TSME, even if Manzanita Systems, Inc. has been advised of the possibility of such damage.

Page 339: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

License Agreement 331

Copyright © 1998 - 2010 Manzanita Systems, Inc.

11.2 Registered User License Agreement

This is a legal agreement between you (either an individual or an entity) and Manzanita Systems, Inc. By installing the softwarepackage and/or by using the MPEG-2 Transport Stream Multiplexer Enhanced Version (the "SOFTWARE"), you agree to bebound by the terms of this Agreement. If you do not agree to the terms of this Agreement, return the installation disk andaccompanying items within 30 days of purchase for a full refund.

SOFTWARE LICENSE

1. GRANT OF LICENSE This License Agreement ("License") permits you to use one copy of the software product identifiedabove, which may include user documentation provided in "online" or electronic form ("SOFTWARE"). The SOFTWARE islicensed as a single product. Its component parts may not be separated for use on more than one computer. If the SOFTWAREis provided with a registered software key or time-limited evaluation software key, then the SOFTWARE is "in use" on acomputer when it is installed into the permanent memory (e.g., hard disk) of that computer. If the SOFTWARE is provided with ahardware key (i.e., "dongle"), then the SOFTWARE is "in use" on a computer when it is installed into the permanent memory(e.g., hard disk) of that computer and the hardware key is attached to that computer.

2. COPYRIGHT The SOFTWARE is owned by Manzanita Systems, Inc. and is protected by United States copyright laws andinternational treaty provisions. Therefore you must treat the SOFTWARE like any other copyrighted material except that youmay either (a) make one copy of the SOFTWARE solely for backup or archival purposes, or (b) transfer the SOFTWARE to asingle hard disk provided you keep the original solely for backup or archival purposes. You may not copy the printed materialsaccompanying the SOFTWARE, nor print copies of any user documentation provided in "online" or electronic form.

3. OTHER RESTRICTIONS This License is your proof of license to exercise the rights granted herein and must be retained byyou. You may not rent or lease the SOFTWARE, but you may transfer your rights under this License on a permanent basis,provided you transfer this License, the SOFTWARE and all accompanying printed materials, retain no copies, and the recipientagrees to the terms of this License. You may not reverse engineer, decompile, or disassemble the SOFTWARE.

LIMITED WARRANTY

1. LIMITED WARRANTY Manzanita Systems, Inc. warrants that the SOFTWARE will perform substantially in accordance withthe accompanying printed material and on-line documentation for a period of one year from the date of purchase. ManzanitaSystems additionally warrants that the SOFTWARE is believed to be free from defect of workmanship and material or viruses.Manzanita Systems will provide technical support to investigate and resolve any problems reported by you within the warrantyperiod.

2. CUSTOMER REMEDIES Manzanita Systems' entire liability and your exclusive remedy shall be, at Manzanita Systems'option, either (a) return of the price paid or (b) repair or replacement of the SOFTWARE that does not meet this LimitedWarranty and that is returned to Manzanita Systems with a copy of your receipt. This Limited Warranty is void if failure of theSOFTWARE has resulted from accident, abuse, or misapplication. Any replacement SOFTWARE will be warranted for theremainder of the original warranty period or one year from the date of purchase, whichever is longer.

3. NO OTHER WARRANTIES To the maximum extent permitted by applicable law, Manzanita Systems, Inc. disclaims all otherwarranties, either express or implied, including but not limited to implied warranties of merchantability and fitness for a particularpurpose, with respect to the SOFTWARE and any accompanying written materials.

4. NO LIABILITY FOR CONSEQUENTIAL DAMAGES To the maximum extent permitted by applicable law, in no event shallManzanita Systems, Inc. be liable for any damages whatsoever (including, without limitation, damages for loss of businessprofits, business interruption, loss of business information, or other pecuniary loss) arising out of the use or inability to use theSOFTWARE, even if Manzanita Systems, Inc. has been advised of the possibility of such damage.

Page 340: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary
Page 341: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Index 333

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Index- A -

Add Program 22, 24

using 32

adding

data stream 35

elementary stream 32, 34

program 32

SCTE 35 Data 40

SMPTE 302M stream 37

subtitles 38

table data stream 36

AdjustStart 124, 136, 196, 203

AdvanceTime 124, 136, 196, 203

AES3 audio 112

AES-3 digital audio stream

inserting 37

ATSC table stream

configuring 105

ATSC tables 285

ATSCbuf 175

audio elementary stream

copying 275

information 275

maximum duration 249

Audio ES 22

Audio ES Tool 275

from command line 276

from UI 276

audio stream

configuring 85

inserting 32

parameters 85, 175

removing 42

Audio Subsection 175

AUXAPID 43, 154

AUXVPID 43, 154

AVSync 66, 85, 112, 165, 175, 189

- B -

BitReversed 112, 189

BurstNulls 43, 154

BurstNullsCount 43, 154

BurstNullsSpacing 43, 154

ByteReversed 112, 189

BytesPerWord 112, 189

- C -

CableLabs

configuration 27

CableLabs VoD transport stream

multiplexing 217

canceling

multiplexer 209

CCField 66, 165

CCTimeOffset 66, 165

ChangePID 99, 181

ChannelID 112, 189

ChannelStatusN 189

Closed Caption 22

closed caption data

input format 268

inserting 268

removing 268

viewing 268

Closed Caption Tools 268

from command line 272

from UI 269

command line

Audio ES Tool 276

Closed Caption Tools 272

demultiplexing from 243

demultiplexing SMPTE 302M 245

Extract Packets Tool 253

file I/O override 211

Maximum Duration Utility 250

multiplexing 209

Packetize Data Tool 258

Video ES Tool 281

Video Trim Utility 248

command line multiplexing

examples 212

Comment 43, 61, 66, 85, 99, 105, 112, 124, 136

configuration

CableLabs 27

default values 27

Standard 27

configuration file 148

Audio Subsection 175

Data Subsection 181

entries 150

Page 342: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0334

Copyright © 1998 - 2010 Manzanita Systems, Inc.

configuration file 148

format 149

manual creation 149

opening 148

Private Stream Subsection 196

Program Section 163

rules 152

saving 148

SCTE 35 Data Subsection 203

SMPTE 302M Subsection 189

Table Data Subsection 185

Transport Section 154

Video Subsection 165

configuration parameters

setting 43

configuring

audio stream 85

data stream 35

elementary stream 32

new multiplex 31

overview 30

prepacketized data stream 99

Private Stream 38, 124

Program 32, 61

SCTE 35 Data 40, 136

SMPTE 302M stream 37, 112

table data 105

table data stream 36

Transport parameters 43

video stream 66

with UI 30

copying

audio elementary stream 275

PID stream 251

video elementary stream 277

CreateDTVCC 66, 165

CreatePMTEntry 99, 105, 181, 185

CreatePSI 43, 154

creating

configuration file 149

prepacketized data stream 256

private section 256

CSdata 112

CSdataN 189

cueing messages

configuring 136

inserting 40

- D -

data stream

configuring 99

inserting 35

parameters 99, 181

removing 42

Data Subsection 181

DataOnly 124, 196

DBsize 66, 85, 112, 124, 165, 175, 189, 196

decimal

display preference 27

Decoder Buffer 85

default

parameter values 27

Delay 66, 85, 112, 165, 175, 189

deleting

closed caption data 268

data stream 42

elementary stream 42

Private Stream 42

program 42

demo version

license agreement 330

Demultiplexer 22, 238

Private Stream Output 240

demultiplexing

from command line 243

from UI 239

MPEG-1 system stream 238

MPEG-2 program stream 238

MPEG-2 transport stream 238

VOB 238

Demux 22, 239

DescFromData 66, 85, 112, 124, 165, 175, 189, 196

DescFromFile 124, 196

Descriptor Generator 146

Descriptor Selector 146

DescriptorN 163, 165, 175, 181, 185, 189, 196, 203

descriptors 61, 66, 85, 99, 105, 112, 124, 136

specifying 146

Descriptors List 146

Descriptors Parameter

specifying 146

display preferences 27

DIT 43, 154

DITTransition 43, 154

Page 343: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Index 335

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Dolby-E audio 112

Dolby-E audio stream

inserting 37

dongle

installation 12

drag-and-drop 34

Duration 43, 154

DVB SI table stream

configuring 105

DVB SI tables 285

DVB subtitles 22

demultiplexing 240

inserting 38

DVB Subtitles Tool 261

DVB tables

DIT 43

SIT 43

DVBbuf 175

- E -

Edit

Add Program 22, 32

Insert Audio 22, 32

Insert Data 22, 35

Insert File 22

Insert Private Stream 38

Insert SCTE35 Data 40

Insert SMPTE 22, 37

Insert Stream 32

Insert Table Data 22, 36

Insert Video 22, 32

Parameters 22

Preferences 22

Remove Entry 22, 42

Edit Menu 22

elementary stream

demultiplexing 238

inserting 32, 34

maximum duration 249

removing 42

remultiplexing 41

End 43, 154

error

messages 222

example

multiple program transport stream 213

multiplexing CableLabs VoD transport stream 217

multiplexing SMPTE 302M stream 218

remultiplexing program stream 215

single program transport stream 212, 213

variable bitrate video 213

examples

command line multiplexing 212

Extract Packets 22

Extract Packets Tool 251

from command line 253

from UI 251

extracting

PID stream 251

- F -

FAQ 302

features 6

new 4

File 154, 165, 175, 181, 196, 203

New 22, 31

Open 22

Quit 22

Save 22

Save As 22

file I/O override 211

File Menu 22

FileN 154, 165, 175, 181, 196, 203

Files 43, 66, 85, 99, 124, 136

FileSize 43, 154

FixCC 99, 181

format

configuration file 149

parameter value 150

FrameRate 66, 165

FrameRateTolerant 66, 165

FrameSize 124, 196

- G -

graphical UI 20

GUI 20

configuring with 30

Main Window 21

Menu Bar 22

Multiplex Pane 25

multiplexing from 208

Parameters Dialog Box 26

Preferences Dialog Box 27

Status Pane 26

Page 344: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0336

Copyright © 1998 - 2010 Manzanita Systems, Inc.

GUI 20

Tool Bar 24

- H -

HD2

AUX-A data 43

AUX-V data 43

HDV Recording Format

Mode HD2 43

HDVDropFrame 43, 154

HDVModeHD2 43, 154

Heartbeat 136, 203

help 302, 321

About 22

Manual 22

Help Menu 22

hexadecimal

display preference 27

- I -

IgnorePOC 66, 165

IndDelay 66, 85, 165, 175

InitDI 43, 61, 66, 85, 105, 112, 124, 136, 154, 163, 165, 175,185, 189, 196, 203

initializing

new multiplex 31

input file

replacing 34

Insert Audio 22

using 32

Insert Data 22

using 35

Insert File 22, 24

using 32

Insert Private Stream

using 38

Insert SCTE35 Data

using 40

Insert SMPTE 22

using 37

Insert Table Data 22

using 36

Insert Video 22

using 32

inserting

closed caption data 268

cueing messages 40

data stream 35

elementary stream 32, 34

Private Stream 38

program 32

SCTE 35 Data 40

SMPTE 302M stream 37

splicing messages 40

subtitles 38

table data stream 36

teletext 38

installation

dongle 12

Linux 13

Mac OS X 16

mp2tsme 12

software 12

software key 16

Solaris 15

Windows 13

- K -

KLV

demultiplexing 240

- L -

Leader 43, 154

license agreement 330

demo version 330

registered user 331

Linux

installation 13

loading

configuration file 148

- M -

Mac OS X

installation 16

Main Window 21

Menu Bar 22

Multiplex Pane 25

Status Pane 26

Tool Bar 24

Manzanita Systems

contacting 321

MaxDecodeDelay 66, 165

Maximum Duration 22

Page 345: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Index 337

Copyright © 1998 - 2010 Manzanita Systems, Inc.

Maximum Duration Utility 249

from command line 250

from UI 249

MaxPESlen 66, 165

Menu Bar 22

messages

error 222

status 222

warning 230

mp2tsme

installation 12

starting 17

user interface 20

mp2tsme Version 6.0 4

MPEG

specifications 320

MPEG-1 system stream

demultiplexing 238

MPEG-2 program stream

demultiplexing 238

MPEG-2 transport stream

demultiplexing 238

MSjustified 112, 189

Multiplex Pane 25

multiplexer

canceling 209

starting 208, 210

status 208

multiplexing 208

CableLabs VoD transport stream 217

command line 209

Dolby E audio stream 218

examples 212

from UI 208

multiple program transport stream 213

single program transport stream 212

SMPTE 302M data 218

variable bitrate video 213

- N -

New 22

New Config 24

using 31

new in Version 6.0 4

new multiplex

initializing 31

NITPID 43, 154

NoEmptyAF 43, 154

NotLowDelay 66, 165

NoVideoBase 124, 196

- O -

Open 22

Open Config 24

opening

configuration file 148

Table Generator 285

Overlap 43, 154

overview 5

features 6

- P -

Pack 105, 185

Packetize Data 22

Packetize Data Tool

from command line 258

Packetize Data Tool Tool

from UI 257

Packetized Data Tool 256

parameter

default values 27

viewing 26

parameters

audio stream 85, 175

prepacketized data stream 99, 181

Private Stream 124, 196

Program 61

Program Section 163

SCTE 35 Data 136, 203

setting 43

SMPTE 302M stream 112, 189

Table Data stream 105, 185

Transport 43

Transport Section 154

value formats 150

video stream 66, 165

Parameters Dialog Box

opening 26

using 43

PAT

rate 43

transport_stream_id 43

version_number 43

PATtsid 43, 154

Page 346: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0338

Copyright © 1998 - 2010 Manzanita Systems, Inc.

PATvsn 43, 154

PCM audio 112

PCM audio stream

inserting 37

PCRGOP 66, 165

PCRi 43, 154

PCRper 61, 163

PCRPES 61, 163

PCRPID 61, 163

PES Private Data File 84

PESalign 66, 85, 165, 175

PEScopyrt 66, 85, 112, 124, 165, 175, 189, 196

PESid 66, 85, 112, 124, 165, 175, 189, 196

PESnau 66, 85, 165, 175, 189

PESorig 66, 85, 112, 124, 165, 175, 189, 196

PESpri 66, 85, 112, 124, 165, 175, 189, 196

PESPrivateDataFile 66, 85, 165, 175

PID 66, 85, 99, 105, 112, 124, 136, 165, 175, 181, 185, 189,196, 203

display preference 27

PID stream

extracting 251

PktCountMultiple 43, 154

PktSize 43, 154

PktTS 43, 154

PktTSBits 43, 154

PktTSBytes 43, 154

PktTSLSByteFirst 43, 154

PktTSPre 43, 154

Plot Rate 279

PMT

rate 43

PMTPID 61, 163

PMTvsn 61, 163

preferences 22

default configuration 27

hexadecimal or decimal 27

Table Definition Script 27

Preferences Dialog Box

opening 27

prepacketized data stream

configuring 99

creating 256

inserting 35

Packetized Data Tool 256

parameters 99, 181

Priority 43, 61, 66, 85, 99, 105, 112, 124, 154, 163, 165, 175,181, 185, 189, 196

private section

creating 256

Private Stream

configuring 124

demultiplexing 240, 244

inserting 38

parameters 124, 196

removing 42

Private Stream Data file 135

Private Stream file

making 261

Private Stream Output 240

Private Stream Subsection 196

private table stream

configuring 105

private tables 285

Program

adding 32

configuring 61

parameters 61

revmoving 42

Program Section

parameters 163

program stream

remultiplexing 41, 215

ProgramNumber 61, 163

PSIPATrep 43, 154

PSIPMTrep 43, 154

PTSnPES 66, 85, 165, 175

- Q -

QuadByte 66, 165

Quit 22

- R -

RAI 66, 85, 112, 124, 165, 175, 189, 196

Rate 43, 66, 85, 99, 112, 124, 136, 154, 165, 175, 181, 189,196, 203

RateAdjust 66

RateAdjustment 165

references 320

RefVideoPID 112, 189

Remove Entry 22, 24

using 42

removing

data stream 42

elementary stream 42

Private Stream 42

Page 347: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Index 339

Copyright © 1998 - 2010 Manzanita Systems, Inc.

removing

program 42

remultiplexing 41

program stream 215

Remux Stream 66, 85, 112, 124

Repeat 99, 105, 181, 185

replacing

input file 34

restoring

configuration 148

revision history 324

Run Mux 24

running

multiplexer 208, 210

- S -

Save 22

Save As 22

Save Config 24

saving

configuration file 148

parameter settings 43

SBrate 61, 66, 85, 99, 105, 112, 124, 163, 165, 175, 181, 185,189, 196

SBsize 61, 66, 85, 99, 105, 112, 124, 163, 165, 175, 181, 185,189, 196

SCCFile 66, 165

SCTE 35 Data

configuring 136

inserting 40

parameters 136, 203

SCTE 35 Data file 140

SCTE 35 Data Subsection 203

setting

configuration parameters 43

Show Duration 22, 249

SIT 43, 154

SITPeriod 43, 154

SITRunningStatus 43, 154

SITServiceID 43, 154

SITSvcDescr 43, 154

SITTransDescr 43, 154

SITVersion 43, 154

SkipFrames 85, 175

SMPTE 302M

demultiplexing 241, 245

SMPTE 302M stream

configuring 112

inserting 37

multiplexing 218

parameters 112, 189

SMPTE 302M Subsection 189

SMPTE 302Mstream

parameters 189

software

installation 12

software key

installation 16

Solaris

installation 15

SourceStreamID 66, 85, 165, 175

SourceStreamSubtype 85, 175

SourceTSPID 66, 85, 112, 124, 165, 175, 189, 196

specifying

descriptors 146

Splice 66, 165

Splice Information Table

specifying 140

splicing messages

configuring 136

inserting 40

specifying 140

Spruce STL file

Private Stream file from 264

Standard

configuration 27

Start 43, 154

starting 17

multiplexer 208, 210

new configuration 31

StartSeqHdr 66, 165

status

messages 222

multiplexer 208

Status Pane 26, 208

StillPicOffset 66, 165

StopOnAV 43, 154

StopOnError 43, 154

StopOnWarning 43, 154

stopping

multiplexer 209

stream_id_extension 66, 85, 112, 165, 175, 189

StreamDelay 66, 85, 99, 105, 112, 124, 165, 175, 181, 185,189, 196

StreamID

display preference 27

Page 348: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

MP2TSME User's Manual, V6.0340

Copyright © 1998 - 2010 Manzanita Systems, Inc.

StreamMFileN 189

StreamN 189

StreamType 66, 85, 99, 105, 112, 124, 165, 175, 181, 185, 189,196

display preference 27

StrictVBV 66, 165

subtitles

inserting 38

support 321

SyncVideoTC 124, 136, 196, 203

system stream

remultiplexing 41

- T -

Table Data stream

configuring 105

inserting 36

parameters 105, 185

Table Data Subsection 185

Table Datastream

parameters 185

Table Definition Script

preferences 27

Table Generator 22, 105, 285

opening 285

preferences 27

using 286

TableN 185

TablesPerSecond 105, 185

technical support 321

teletext

inserting 38

Terminate 43, 154

TimeOffset 124, 136, 196, 203

TimestampRatio 124, 196

tool 238

Demultiplexer 238

Tool Bar 24

Add Program 24

Insert Stream 24

New Config 24

Open Config 24

Remove Entry 24

Run Mux 24

Save Config 24

Tool Tips 27

Tools

Audio ES 22

Audio ES Tool 276

Closed Caption 22

Closed Caption Tools 269

Demux 22, 239

DVB Subtitles 22

Extract Packets 251

Packetize Data 22

Packetize Data Tool 257

Run Mux 22

Show Duration 22, 249

Table Generator 22

Video ES 22

Video ES Tool 278, 279

Video Tim 22

Video Trim 248

Tools Menu 22

TransitionCleanUp 85, 175

Transport

parameters 43

Transport Section 154

transport stream

multiplexing 208

new configuration 31

remultiplexing 41

transport_stream_id 43

TransportPriority 43, 61, 66, 85, 105, 112, 124, 136, 154, 163,165, 175, 185, 189, 196, 203

trimming

video elementary stream 248

TypeDelay 66, 165

- U -

UI

configuring with 30

Main Window 21

Menu Bar 22

Multiplex Pane 25

multiplexing from 208

Parameters Dialog Box 26

Preferences Dialog Box 27

Status Pane 26

Tool Bar 24

user interface 20

configuring with 30

Main Window 21

Menu Bar 22

Multiplex Pane 25

multiplexing from 208

Page 349: MPEG-2 Transport Stream Multiplexer Enhanced Version …read.pudn.com/downloads459/ebook/1932708/mp2tsme-6.0.0.pdf · 2010-02-03 · •Enhanced AC-3 (Dolby Digital Plus) Audio Elementary

Index 341

Copyright © 1998 - 2010 Manzanita Systems, Inc.

user interface 20

Parameters Dialog Box 26

Preferences Dialog Box 27

Status Pane 26

Tool Bar 24

using

demultiplexer 238

Table Generator 286

utilities

Audio ES 22

Closed Caption 22

Demultiplexer 22

DVB Subtitles 22

Extract Packets 22

Packetize Data 22

Show Duration 22

Video ES 22

Video Trim 22

utility 238

Demultiplexer 238

- V -

Validity 112, 189

variable bitrate video

multiplexing 213

VBR 43, 154

Version 6.0 4

video elementary strea

closed caption data 268

video elementary stream

copying 277

information 277

maximum duration 249

structures 282

trimming 248

Video ES 22

Video ES Tool 277

Copy 278

from command line 281

from UI 278

Information 278

Plot Rate 279

Video Frame Copy 278

Video Information 278

Video Plot Rate 279

video stream

configuring 66

inserting 32

parameters 66, 165

removing 42

Video Subsection 165

Video Trim Utility 248

from command line 248

from UI 248

viewing

closed caption data 268

VOB

demultiplexing 238

remultiplexing 41

VOBSUB index file

Private Stream file from 261

- W -

warning

messages 230

Windows

installation 13

WordSize 112, 189