Packaging for Unified Origin

Package MP4 to fragmented-MP4 and back

Fragmented-MP4 is also known as PIFF and ISMV. Converting from an MP4 file to a fragmented mp4 file (.ismv):


mp4split -o example.ismv \

The other way around, from fragmented MP4 / PIFF / ISMV to MP4:


mp4split -o example.mp4 \

Or from Adobe's F4F to MP4:


mp4split -o example.mp4 \

You can also use the server manifest file as input. All the audio and video streams referenced in the manifest file are combined into one MP4 file.


mp4split -o example.mp4 \

Options for fragmented-MP4 packaging

The packager supports the following options.


Create an mp4 that references a fragmented mp4 file, for compatibility with older players.


Do not write the output.


The output timescale used for media. Defaults to the original media or 10MHz when the "piff" brand is used.


The target duration of each fragment (in milliseconds), default 2000. When sync-samples are present, then the fragments for the streams are aligned. This parameter can be useful for optimizing the fragment duration for a specific playout format e.g. HLS which recommends a fragment duration of 8 seconds. In rare cases it could also be useful for aligning audio or video fragments, although it is highly recommended to start with all sources GOP aligned from the outset.


Sets the 'compatibility brand'. Options: "piff", "iso6", "ccff" and "dash". Default is "iso6", but with timescale=10000000 (10Mhz) the default is "piff".

When creating (progressive) mp4 files with negative-composition-times "iso4" is used as brand. When using "iso2" negative composition time offsets are disabled and an edit list is used to compensate for the ct_offset.

Input track selection and editing

You can also make a selection of tracks when generating a server manifest file. Note that these options appear after (each) specification of an input file. The available options for track selection are:


Select the one track that matches this track id.


Select only the tracks that match the track type (audio/video/text/data)

All track properties are generated based on the input track. It is possible to override some properties. But note that is not necessary in the general case. The following track properties can be overridden:


Specifies the trackName to be used.


The three character ISO 639-2/T language specifier.


A user-friendly description of the track.


Specifies the systemBitrate to be used.


Specifies the Subtype, default CAPT.



A specific role of the track.

Options are main, alternate, supplementary, commentary and dub.


  • mp4split guarantees that track_name is unique. It uses track_type (audio/video/data/text) as its basename and (if present) adds the language modifier. If another track_name is then identical, but with a different codec, mp4split adds a _1, _2, postfix.
  • By default track_language is taken from the track's media info. Make sure to use the correct language codes, e.g. spa for Spanish, eng for English, nld for Dutch, etc.
  • When set, track_description overrides the defaults for the LABEL attribute (for alternative audio tracks in HDS) and the NAME attribute (for media tracks in HLS).
  • By default track_bitrate is the average bitrate (either from the metadata info of the input track, or calculated from the source samples). You can also set this to max, in that case the maximum/peak bitrate is used.

Packaging Smooth Streaming with track selection

Say you have one MP4 video and would like to store the audio and video track in separate fragmented files:


mp4split -o example-64k.isma \
  example.mp4 --track_type=audio

mp4split -o example-800k.ismv \
  example.mp4 --track_type=video

Generating the required server manifest file:


mp4split -o example.ism \
  example-64k.isma \

The track selection options always come after the input file. Next to --track_type you can also use --track_id to specify a specific track. Say you have two input files, example-audio.mp4 (containing 4 audio tracks) and example-video.mp4 (containing 4 video tracks) and you want to create a fragmented output file containing the first track of the audio and the last track of the video.


mp4split -o example.ismv \
  example-audio.mp4 --track_id=1 \
  example-video.mp4 --track_id=4

Packaging with track order and defaults

New in version 1.7.17.

It is possible to place tracks in the manifest in a specific order. This order is set by the order in which the tracks are added in the packaging command line. For playout formats that support it e.g. HLS, this in turn also means that the chosen track can be set to DEFAULT=YES.


# create a sorted .isma file
mp4split -o audio_sort.isma \
  swe_audio.mp4 \
  eng_audio.mp4 \
  dan_audio.mp4 \

# create ismv with video and sorted audio
mp4split -o video_audio.ismv \
  video1-4.mp4 \

# create a sorted subtitle file
mp4split -o sorted_subtitles.ismt \
  swe_sub.dfxp \
  eng_sub.dfxp \
  dan_sub.dfxp \

# combine into manifest
mp4split -o sorted_manifest.ism \
  video_audio.ismv \

Therefore in the example above both the Swedish audio and subtitle track would be the first track in their respective groups and in the HLS manifest both set to DEFAULT=YES

The HLS manifest would look like this (additional tracks intentionally omitted):


# AUDIO groups

# SUBTITLES groups

Packaging content for delivery by Unified Origin

The first step is to package all the source content into the format that is used by Unified Origin. This is the fragmented-MP4 format.

The example uses this Source Content.


mp4split -o video_400k.ismv \
  video_400k.mp4 \

mp4split -o video_800k.ismv \
  video_800k.mp4 \

mp4split -o video.ismv \
  video_200k.mp4 \
  video_600k.mp4 \
  audio_dts.mp4 \
  audio_ac3.mp4 \

Now that we have packaged all the audio and video, the following step is to create the two progressive download files. Instead of creating a completely new MP4 video file we will create an MP4 video that only contains the necessary index and references the actual movie data that is stored in the fragmented-MP4 format.


mp4split -o video_400k.mp4 --use_dref \

mp4split -o video_800k.mp4 --use_dref \

As a last step we create the server manifest file. This is an XML file that contains the media information about all the tracks and is used by the USP webserver module.


mp4split -o video.ism \
  video.ismv \
  video_400k.ismv \

At this point we have six files stored for our presentation.

File Description
video_400k.ismv AAC-LC, 400 kbps video
video_800k.ismv HE-AAC, 800 kbps video
video.ismv 200/600 kbps video, DTS, AC3, EAC3
video_400k.mp4 AAC-LC, 400 kbps video
video_800k.mp4 HE-AAC, 800 kbps video
video.ism USP server manifest file

The USP webserver module makes the following URLs available. Note that all these URLs are virtual. They do not exist on disk.

Playout format URL
Smooth Streaming
HTTP Live Streaming
HTTP Dynamic Streaming
Progressive download
Progressive download

Please download the sample script which creates the various server manifest as discussed above. The sample content is Tears of Steel.