Scroll to navigation

MP42TS(1) GPAC MP42TS(1)


MP42TS - MPEG-4 Systems Framework and Software Development Kit


MP42TS <inputs><destinations>[options]



-src filename[:OPTS]
specifies an input file used for a TS service: * currently only supports ISO files and SDP files * can be used several times, once for each program
By default each source is a program in a TS. Source options are colon-separated list of options, as follows:

ID=N specifies the program ID for this source. All sources with the same ID will be added to the same program
name=STR program name, as used in DVB service description table
provider=STR provider name, as used in DVB service description table

-prog filename
same as "-src filename"


Several destinations may be specified as follows, at least one is mandatory:
-dst-udp UDP_address:port (multicast or unicast)
-dst-rtp RTP_address:port
-dst-file filename

The following parameters may be specified when -dst-file is used:

-segment-dir dir
server local directory to store segments (ends with a '/')
-segment-duration dur
segment duration in seconds
-segment-manifest file
m3u8 file basename
-segment-http-prefix p
client address for accessing server segments
-segment-number n
number of segments to list in the manifest

Basic options

-rate R
specifies target rate in kbps of the multiplex (optional)
specifies the muxer will work in real-time mode * if not specified, the muxer will generate the TS as quickly as possible * automatically set for SDP or BT input
-pcr-init V
sets initial value V for PCR - if not set, random value is used
-pcr-offset V
offsets all timestamps from PCR by V, in 90kHz. Default value is computed based on input media.
-psi-rate V
sets PSI refresh rate V in ms (default 100ms). * If 0, PSI data is only send once at the beginning or before each IDR when -rap option is set. * This should be set to 0 for DASH streams.
-time n
request the muxer to stop after n ms
forces 1 PES = 1 AU (disabled by default)
forces RAP/IDR to be aligned with PES start for video streams (disabled by default). In this mode, PAT, PMT and PCR will be inserted before the first TS packet of the RAP PES.
same as -rap but flushes all other streams (sends remaining PES packets) before inserting PAT/PMT
-nb-pack N
specifies to pack up to N TS packets together before sending on network or writing to file
-pcr-ms N
sets max interval in ms between 2 PCR. Default is 100 ms
-ttl N
specifies Time-To-Live for multicast. Default is 1.
-ifce IPIFCE
specifies default IP interface to use. Default is IF_ANY.
-temi [URL]
Inserts TEMI time codes in adaptation field. URL is optional
-temi-delay DelayMS
Specifies delay between two TEMI url descriptors (default is 1000)
-temi-offset OffsetMS
Specifies an offset in ms to add to TEMI (by default TEMI starts at 0)
Do not restart the TEMI timeline at the end of the source
-sdt-rate MS
Gives the SDT carrousel rate in milliseconds. If 0 (default), SDT is not sent

MPEG-4/T-DMB options

-bifs-src filename
update file: must be either an .sdp or a .bt file
-audio url
may be mp3/udp or aac/http (shoutcast/icecast)
-video url
shall be a raw h264 frame
-mpeg4-carousel n
carousel period in ms
-mpeg4, -4on2
forces usage of MPEG-4 signaling (IOD and SL Config)
same as -4on2 and uses PMT to carry OD Updates
carries BIFS over PES instead of sections
carries BIFS over PES without writing timestamps in SL

Misc options

set log tools and levels, formatted as a ':'-separated list of toolX[:toolZ]@levelX
-h, -help
print this screen


For bug reports, more information on BT or XMT-A formats or GPAC TTXT files or ISMACryp, MPEG-4 Systems usage and more help on MP42TS please visit the GPAC web site


Jean Le Feuvre, Cyril Concolato, Romain Bouqueau. Copyright © Telecom ParisTech 2005-2012.


GPAC(1), MP4Box(1), MP4Client(1)
July 2015 MP42TS