Implementation of DTS Audio in IIS Smooth Streaming

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

 

 
 
 

IMPLEMENTATION OF DTS AUDIO IN IIS


SMOOTH STREAMING
 
 
 
 
Document No.: 9302K68400 
Revision:  A 
 
Version: 1.0 
 
Effective Date:  October 2012 
 
 
 
DTS, Inc. 
5220 Las Virgenes Road 
Calabasas, CA  91302 
USA 
 
 
www.dts.com 
 

28500 v1 Page 1 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

COPYRIGHT AND LICENSE 
 
Do Not Duplicate. © 2012 DTS, Inc.  All Rights Reserved.  Unauthorized duplication is a violation of State, 
Federal, and International laws. 
This  publication  and  the  Product  are  copyrighted  and  all  rights  are  reserved  by  DTS,  Inc  (“DTS”).    DTS 
grants  users  of  this  document  a  nonexclusive,  worldwide,  royalty‐free  copyright  license  to  implement 
the  specifications  stated  herein.    Notwithstanding  the  foregoing,    no  part  of  this  publication  may  be 
reproduced, photocopied, stored on a retrieval system, translated, or transmitted in any form or by any 
means, electronic or otherwise, without the express prior written permission of DTS. 

TRADEMARK 
 
DTS, the Symbol,  and DTS and the Symbol together are registered trademarks of DTS, Inc.   
All other trademarks are the property of their respective owners. 

28500 v2 Page 2 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

Contents

1  Resources .............................................................................................................................................. 5 
2  Terms, Definitions and Abbreviations ................................................................................................... 5 
3  Microsoft Smooth Streaming Manifest Files ........................................................................................ 6 
3.1  Overview .......................................................................................................................................... 6 
3.2  ISM and ISMC files with DTS‐HD ...................................................................................................... 6 
3.2.1  IIS Smooth Streaming Server Manifest (On‐Demand) ............................................................ 7 
3.2.2  IIS Smooth Streaming Server Manifest (Live) .......................................................................... 7 
3.3  IIS Smooth Streaming Client Manifest ............................................................................................. 9 
3.3.1  Child Elements to StreamIndex ............................................................................................... 9 
3.3.2  CodecPrivateData .................................................................................................................... 9 
3.3.3  ISMC example ........................................................................................................................ 11 
4  Storing DTS‐HD Audio in PIFF 1.3 files ................................................................................................ 14 
4.1  Overview ........................................................................................................................................ 14 
4.1.1  DTS Bitstream structure basics ............................................................................................. 14 
4.1.2  Constraints on DTS within PIFF 1.3 files ................................................................................ 14 
4.1.3  Contents in the MDAT of each PIFF 1.3 fragment ................................................................. 15 
4.1.4  Parsing a DTS bitstream ........................................................................................................ 15 
4.1.5  Constraints on the PIFF Track Fragments .............................................................................. 15 
4.2  Identifying DTS in a PIFF File .......................................................................................................... 15 
4.3  Encryption ...................................................................................................................................... 16 
4.4  Demultiplexing DTS from a PIFF file. .............................................................................................. 16 
4.4.1  Overview ............................................................................................................................... 16 
4.4.2  Buffering considerations ....................................................................................................... 16 
4.4.3  Conflicts or known issues ...................................................................................................... 17 
 

28500 v2 Page 3 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

Tables

Table 1 ‐ IIS .ism ............................................................................................................................................ 7 
Table 2 ‐ IIS .ism for On‐Demand .................................................................................................................. 7 
Table 3 ‐ IIS .ism for Live ............................................................................................................................... 7 
Table 4 ‐ IIS .ismc Elements ........................................................................................................................... 9 
Table 5 ‐ IIS .ismc Quality Attributes ............................................................................................................. 9 
Table 6 ‐ CodecPrivateData ........................................................................................................................... 9 
Table 7 – SubFormat ................................................................................................................................... 10 
Table 8 – Speaker Bitmasks ......................................................................................................................... 11 
Table 9 ‐ dtsFlags ......................................................................................................................................... 11 
Table 10 ‐ Valid sync words ......................................................................................................................... 15 
 
   

28500 v2 Page 4 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

DTS Audio and Microsoft Smooth Streaming


This document describes the requirements for delivering DTS‐HD audio streams using the Microsoft® 
Smooth Streaming extension for Internet Information Services (IIS), including: 
 The storage of DTS‐HD streams in ISO media files, and specifically files built to the Protected 
Interoperable File Format [PIFF] specification, as used for Smooth Streaming applications. 
 How DTS‐HD audio streams are described in IIS Smooth Streaming server manifests (.ism) 
[SSLSM], and client manifests (.ismc) [SSCMF]. 

This document covers: 
 How to identify a DTS‐HD audio stream within a PIFF file 
 How to identify the availability of DTS‐HD streams in server and client manifests 
 The steps needed to extract the DTS‐HD audio stream from the PIFF file 

1 Resources
The following documents are helpful in implementing the procedures described in this document: 
[DTSHD]  ETSI TS 102 114 (2011‐08), “DTS Coherent Acoustics Core and Extensions, with 
Additional Profiles”, www.etsi.org 
[DTSISO]  “Implementations of DTS Audio in Media Files Based on ISO/IEC 14496”, DTS Inc., 
Document #9302J81100, www.dts.com  
[ISOFF]  ISO/IEC 14496‐12, Third Edition (2008) and including corrigendum and amendments, 
“Information technology – Coding of Audio‐Visual Object, part 12: ISO Based Media File 
Format”, www.iso.org.  
[PIFF]  Portable Encoding of Audio‐Video Objects: The Protected Interoperable File Format 
(PIFF), go.microsoft.com  
[SSLSM]  IIS Smooth Streaming Live Server Manifest Format, msdn.microsoft.com  
[SSCMF]  IIS Smooth Streaming Client Manifest Format, msdn.microsoft.com  
[WAVE]  Multiple Channel Audio Data and Wave Files, msdn.microsoft.com 

2 Terms, Definitions and Abbreviations


The following terms, definitions and abbreviations are used throughout this document 
AU – access unit 
audio stream  ‐ A sequence of synchronized audio frames  

28500 v2 Page 5 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

audio frame – A component of an audio stream that corresponds to a certain number of PCM audio 
samples. Usually also an AU. 
CBR ‐ Constant Bit Rate 
core substream: A DTS audio stream, or a component of a DTS audio stream, conforming to [DTSHD] 
and always begins with the 32‐bit Sync word of 0x7FFE8001. 
duration – The time represented by one decoded audio frame, may be represented in audio samples 
per channel at a specific audio sampling frequency or in seconds.  
extension – For DTS bitstreams, a component of an audio frame, may or may not exist in sequence with 
other extension components or a core component. 
extension substream: A DTS audio stream, or a component of a DTS audio stream, conforming to 
[DTSHD] and always begins with the 32‐bit sync word of 0x64582025. 
LFE: Low Frequency Effects or subwoofer channel 
PIFF: Portable Interoperable File Format 
VBR ‐ Variable Bit Rate 
XLL – The DTS‐HD lossless audio coding extension, a logical element within the DTS elementary stream 
containing compressed audio data that will decode into bit exact representation of the original signal. 

3 Microsoft Smooth Streaming Manifest Files


3.1 Overview
The Microsoft Smooth Streaming framework requires the use of two manifests in order to present a 
media track. 
The server manifest is used to determine the configuration of the encoded audio and video tracks that 
are available for presentation. Two types of server manifest exist, one for on‐demand content (*.ism), 
the other is for live content (*.isml). On demand content exists as a file or set of files comprising a 
complete presentation within the server. Live content is being generated in real time, buffered in the 
form of some fixed duration fragments that are consecutive. 
The client manifest (.ismc) file also exists on the server, and is passed to the client in order to initiate the 
playback of the content. The client can use the information within the .ismc file to select the appropriate 
assets for playback in accordance with such system conditions as client compatibility and network 
throughput, and user preferences such as audio language, audio channel layout options and the 
availability of options such as subtitle tracks. 

3.2 ISM and ISMC files with DTS‐HD


Common XML elements are used to describe the media formats within both .ism and .ismc files. The 
values of these elements are determined by the media types. Audio tracks are described in the <audio> 

28500 v2 Page 6 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

element and the child <param> elements. The <audio> element is a child of the <switch> element, which 
in turn falls under the <body> element. 
In the <audio> element, the following attribute might be specific to DTS‐HD 

Table 1 ‐ IIS .ism

Attribute  Description 
systemBitrate Specifies the bit rate of the track. This value is matched to the argument of
the QualityLevels() noun on the URL. This attribute is required. For DTS-HD audio, this
is the nominal average bit rate expressed in bits per second. It can be derived from the
avgBitrate parameter in the DTSSpecific Box [DTSISO] (see chapter 4)
 

3.2.1 IIS Smooth Streaming Server Manifest (On‐Demand)


This section describes attributes that may be specific to DTS‐HD for the IIS Smooth Streaming Manifest 
(On‐Demand), and how to determine the correct parameter value. 
The <param> elements that are children of the <audio> element that may be specific to DTS‐HD are 
described on the table below. 

Table 2 ‐ IIS .ism for On‐Demand

Attribute  Description 
timescale Specifies the timescale for this track, as the number of units that pass in one second. This value
shall be set to 10000000.

3.2.2 IIS Smooth Streaming Server Manifest (Live)


This section describes <param> attributes that may be specific to DTS‐HD for the IIS Smooth Streaming 
Manifest (Live), and how to determine the correct parameter value. 
Additional parameters support the same name and semantics as corresponding attributes for 
the QualityLevels() element in the Client Manifest. These are: 

Table 3 ‐ IIS .ism for Live

Attribute  Description 
CodecPrivateData As defined in [WAVE], and extended for DTS-HD
SamplingRate SamplingRate is expressed in Hz, and must be equal to the maximum sampling
frequency of the audio encoded in the DTS-HD bitstream. In the DTSSpecificBox, this
value is stored as DTSSamplingFrequency
Channels The maximum number of output channels encoded in the DTS-HD bitstream. This can
be determined from ChannelLayout in the DTSSpecificBox.
BitsPerSample BitsPerSample shall always be set to 16
PacketSize The value of PackSize shall be set to 1
AudioTag The value of AudioTag shall be set to 65534
FourCC The value of “FourCC” shall be one of “dtsc”, “dtse”, “dtsh” or “dtsl” and shall match
the coding name used in the DTSSampleEntry box as defined in [DTSISO] and used
in the respective PIFF file.
 

28500 v2 Page 7 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

3.2.2.1 Example of IIS Smooth Streaming Live Server manifest


The following is an example of the IIS Smooth Streaming server manifest (Live) with two DTS‐HD audio 
tracks: 

<?xml version="1.0" encoding="utf-16"?>


<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
<head>
<meta name="Meta Data" content="Common meta data" />
</head>
<body>
<switch>
<video src = "Stream.ismv" systemBitrate="2962000">
<param name="trackID" value="3" valuetype="data" />
<param name="FourCC" value="H264" valuetype="data" />
<param name="MaxWidth" value="1280" valuetype="data" />
<param name="MaxHeight" value="720" valuetype="data" />
<param name="CodecPrivateData" value=
"000000016764001FAC2CA5014016EFFC100010014808080A000007D200017700C100005A648000B4C9FE31
C6080002D3240005A64FF18E1DA12251600000000168E9093525" valuetype="data" />
</video>
<audio src = "Stream1.ismv" systemBitrate="768000">
<param name="trackID" value="1" valuetype="data" />
<param name="trackName" value="audio1" valuetype="data" />
<param name="SamplingRate" value="48000" valuetype="data"/>
<param name="BitsPerSample" value="16" valuetype="data" />
<param name="PacketSize" value="1" valuetype="data" />
<param name="AudioTag" value="65534" valuetype="data" />
<param name="FourCC" value="dtse" valuetype="data" />
<param name="CodecPrivateData" value=
"00103F0600000120000000001000800000AA00389B7112084B000000" valuetype="data" />
</audio>
<audio src = "Stream2.ismv" systemBitrate="447000">
<param name="trackID" value="2" valuetype="data" />
<param name="trackName" value="audio2" valuetype="data" />
<param name="SamplingRate" value="48000" valuetype="data"/>
<param name="BitsPerSample" value="16" valuetype="data" />
<param name="PacketSize" value="1" valuetype="data" />
<param name="AudioTag" value="65534" valuetype="data" />
<param name="FourCC" value="dtse" valuetype="data" />
<param name="CodecPrivateData" value=
"00103F0600000120000000001000800000AA00389B7112084B000000" valuetype="data" />

28500 v2 Page 8 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

</audio>
</switch>
</body>
</smil>

3.3 IIS Smooth Streaming Client Manifest


In the IIS Smooth Streaming Client Manifest, media tracks are described by the StreamIndex elements. 
The parameter settings in StreamIndex for DTS‐HD are described in the following table. 

Table 4 ‐ IIS .ismc Elements


Attribute Description
Type The parameter “type” shall be set to “audio”

3.3.1 Child Elements to StreamIndex


StreamIndex supports two child elements.  
 <QualityLevel> shares many of the attributes described in the “Live” manifest.  
 <c> is a chunk identifier for a segment of data. 

The following table summarizes the attributes for QualityLevel and how they are configured for DTS‐HD 

Table 5 ‐ IIS .ismc Quality Attributes


Attribute Description
Index This parameter is required.
BitRate BitRate shall be set to the average bit rate of the DTS-HD audio stream, equal to the avgBitrate
parameter in the ‘ddts’ box.
CodecPrivateData As defined in [WAVE], and extended for DTS-HD.
SamplingRate SamplingRate is expressed in Hz, and must be equal to the maximum sampling frequency of
the audio encoded in the DTS-HD bitstream. In the ‘ddts’ box, this value is stored as
DTSSamplingFrequency.
Channels The maximum number of output channels encoded in the DTS-HD bitstream. This shall be
consistent with ChannelLayout in the ‘ddts’ box [DTSISO].
BitsPerSample The value of BitsPerSample shall be set to 16.
AudioTag The value of AudioTag shall be set to 65534.
FourCC The value of “FourCC” shall be one of “dtsc”, “dtse”, “dtsh” or “dtsl” and shall match the coding
name used in the DTSSampleEntry box as defined in [DTSISO] and used in the respective PIFF
file.

3.3.2 CodecPrivateData
For DTS‐HD audio tracks, the client manifest contains specific information about the track in a 
CodecPrivateData field. The CodePrivateData is formatted as a WAVE_FORMAT_EXTENSIBLE field 
followed by some DTS‐HD specific information. 
The CodecPrivateData for DTS‐HD is described in Table 6, below.  

Table 6 ‐ CodecPrivateData
mnemonic Word Size in Bits
CodecPrivateData () {

28500 v2 Page 9 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 
wSamplesPerBlock 16 (little endian)
dwChannelMask 32 (little endian)
SubFormat
Data1 32 (little endian)
Data2 16 (little endian)
Data3 16 (little endian)
Data4 () {
for (int i=0; i<8; i++)
Data4[i] 8
}
dtsStreamConstruction 8
dtsChannelLayout 16 (big endian)
dtsFlags 8
Reserved = 0 16
}
 

Table 7 – SubFormat
mnemonic Hexadecimal value
Data1 0x00002001
Data2 0x0000
Data3 0x0010
Data4[] 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
 
Example of CodecPrivateData: 

mnemonic Hexadecimal value


CodecPrivateData () {
wSamplesPerBlock 0x0200
dwChannelmask 0x0000003F
SubFormat 0x00002001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
dtsStreamConstruction 0x01
dtsChannelLayout 0x000F
dtsFlags 0x00
Reserved = 0 0x0000
}
 
CodecPrivateData = “0002 3F000000 01200000 0000 1000 80 00 00 AA 00 38 9B 71 01 000F 00 0000" 

3.3.2.1 Semantics
wSamplesPerBlock is fully described in [WAVE] and contains the number of PCM samples per channel 
decoded in each sample, (i.e. audio frame), of the track file. For DTS‐HD, valid values are 512, 1024, 
2048, 4096 and 6144. The correct value can be determined from the value of FrameDuration in the 
DTSSpecificBox, see [DTSISO] for details of FrameDuration. 
dwChannelMask is fully described in [WAVE] and provides a representation of the available output 
channels in the DTS‐HD bitstream. Since dwChannelMask cannot fully represent the possible speaker 
layouts that can be represented in DTS‐HD, a more complete representation of the output channel 

28500 v2 Page 10 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

configuration is in dtsChannelLayout. The relationship between the channel notation and channel 
description relating dtsChannelLayout and dwChannelMask can be seen in Table 8. 

Table 8 – Speaker Bitmasks


Notation Description dwChannelMask dtsChannelLayout
L&R SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT 0x00000003 0x0002
C SPEAKER_FRONT_CENTER 0x00000004 0x0001
LFE 1 SPEAKER_LOW_FREQUENCY 0x00000008 0x0008
L s & R s or SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT 0x00000030 0x0004 (L s & R s )
L sr & R sr * 0x0040 (L sr & R sr )
Lc & Rc SPEAKER_FRONT_LEFT_OF_CENTER | 0x000000C0 0x0200
SPEAKER_FRONT_RIGHT_OF_CENTER
Cs SPEAKER_BACK_CENTER 0x00000100 0x0010
L ss & R ss SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT 0x00000600 0x0800
Oh SPEAKER_TOP_CENTER 0x00000800 0x0100
Lh & Rh SPEAKER_TOP_FRONT_LEFT | 0x00005000 0x0020
SPEAKER_TOP_FRONT_RIGHT
Ch SPEAKER_TOP_FRONT_CENTER 0x00002000 0x0080
L hr & R hr SPEAKER_TOP_BACK_LEFT | 0x00028000 0x8000
SPEAKER_TOP_BACK_RIGHT
C hr SPEAKER_TOP_BACK_CENTER 0x00010000 0x4000
Lw & Rw Left and Right wide (outside of L/R) not defined 0x0400
L hss & R hss Left and Right height on side not defined 0x2000
SPEAKER_RESERVED 0x80000000
* if Lss, Rss exist, then this position is equivalent to Lsr, Rsr respectively

SubFormat shall be set according to Table 7. 
dtsStreamConstruction This value shall be identical to StreamConstruction in the DTSSpecificBox, 
[DTSISO]. 
dtsChannelLayout shall match ChannelLayout in the DTSSpecificBox defined in [DTSISO]. 
dtsFlags is defined according to Table 9. The value of each flag shall match the corresponding named bit 
in the DTSSpecificBox defined in [DTSISO]. 

Table 9 ‐ dtsFlags
name mask description (informative)
MultiAssetFlag 0b10000000 0 = single asset, 1 = multiple asset
LBRDurationMod 0b01000000 0 = no modifier, 1 = LBR duration modifier, duration = 6144
reserved = 0 0b00111111 Reserved for future use, shall be set to 0
 

3.3.3 ISMC example


<?xml version="1.0" encoding="utf-16"?>
<SmoothStreamingMedia
MajorVersion="2"
MinorVersion="1"
Duration="238980001">
<StreamIndex

28500 v2 Page 11 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

Type="video"
Name="video"
Chunks="12"
QualityLevels="1"
MaxWidth="1280"
MaxHeight="720"
DisplayWidth="1280"
DisplayHeight="720"
Url="QualityLevels({bitrate})/Fragments(video={start time})">
<QualityLevel
Index="0"
Bitrate="2962000"
FourCC="H264"
MaxWidth="1280"
MaxHeight="720"
CodecPrivateData=
"000000016764001FAC2CA5014016EFFC100010014808080A000007D200017700C100005A648000B4C9FE31
C6080002D3240005A64FF18E1DA12251600000000168E9093525" />
<c d="20020000" />
<c d="20020000" />
<c d="20020000" />
<c d="20020000" />
<c d="20020000" />
<c d="20020000" />
<c d="20020000" />
<c d="20020000" />
<c d="20020000" />
<c d="20020000" />
<c d="20020000" />
<c d="18000000" />
</StreamIndex>
<StreamIndex
Type="audio"
Name="audio"
Chunks="12"
QualityLevels="2"
Url="QualityLevels({bitrate})/Fragments(audio={start time})">
<QualityLevel
Index="0"
FourCC="dtse"

28500 v2 Page 12 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

Bitrate="768000"
SamplingRate="48000"
Channels="8"
BitsPerSample="16"
PacketSize="1"
AudioTag="65534"
CodecPrivateData=”00103F0600000120000000001000800000AA00389B7112084B000000” />
<QualityLevel
Index="1"
FourCC="dtse"
Bitrate="447000"
SamplingRate="48000"
Channels="8"
BitsPerSample="16"
PacketSize="1"
AudioTag="65534"
CodecPrivateData=”00103F0600000120000000001000800000AA00389B7112084B000000” />
<c d="20480000" />
<c d="20480000" />
<c d="20480000" />
<c d="20480000" />
<c d="20480000" />
<c d="20480000" />
<c d="20480000" />
<c d="20480000" />
<c d="20480000" />
<c d="20480000" />
<c d="20480000" />
<c d="13620000" />
</StreamIndex>
</SmoothStreamingMedia>

28500 v2 Page 13 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

4 Storing DTS‐HD Audio in PIFF 1.3 files


This chapter describes DTS‐HD audio streams and describes how they are compiled into an ISOBMFF in 
general, and specifically how they are compiled into PIFF 1.3 files. 

4.1 Overview
DTS‐HD audio covers a range of profiles within a unified container format. DTS‐HD decoders are 
structured such that all DTS‐HD decoders can create a meaningful presentation from any DTS‐HD 
compliant audio stream. 

4.1.1 DTS Bitstream structure basics


There are two basic forms of DTS bitstreams that together comprise the DTS‐HD coding system.  
 The DTS core substream is the original DTS format that was used in such applications as 
LaserDisc and DVD.  
 The DTS extension substream was originally developed for HD‐DVD and Blu‐ray, and extends the 
useful range of DTS applications to both higher and lower bit rates, in addition to extending the 
feature set. 

The above‐mentioned core and extension substreams may be used together or individually to compose 
an audio presentation. 

4.1.2 Constraints on DTS within PIFF 1.3 files


For the purposes of this specification, it can be assumed that the DTS‐HD audio being applied will be 
limited according to the following constraints: 
 The DTS‐HD audio stream shall be compliant with the latest ETSI TS 102 114 specification. 
 The core substream shall be limited to 1524 Kbits/sec. 
 A PIFF sample of DTS‐HD, (one complete audio frame), shall not exceed 32 Kbytes. 
 Any DTS‐HD stream capable of rendering more than 5.1 channels shall contain an embedded 5.1 
mix such that a 5.1 decoder renders the audio correctly. 
 The peak bit rate within any DTS‐HD track shall not exceed 24.5 Mbits/sec. 
 For a core substream, all access units in a track shall have the same duration. 
 For an extension substream, all access units in a track shall have the same duration. 
 If the DTS‐HD audio stream contains both core and extension substreams, the occurrence of the 
extension frames may be an even integer sub‐multiple of the core frames such that the 
extension frame is always aligned to a core frame. 
 A PIFF fragment always contains a sequence of complete DTS‐HD samples. It is not permitted for 
a DTS‐HD sample to span across two fragments. 

Additional constraints are enforced within the various DTS product licensing programs, but those 
constraints do not affect the systems requirements of a server or client. 

28500 v2 Page 14 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

4.1.3 Contents in the MDAT of each PIFF 1.3 fragment


The DTS‐HD audio stream is a sequence of synchronized frames, where each frame begins with a known 
sync word. If the DTS‐HD audio stream contains a core substream, each PIFF access unit will begin with 
the core access unit. If an extension substream co‐exists with a core substream, the PIFF access unit 
shall always begin with the core access frame. Table 10 shows the valid sync words for core and 
extension substreams. Figure 1 illustrates a DTS‐HD PIFF sample with both a core and extension 
substream. 

Table 10 ‐ Valid sync words


Description Sync word
DTS_SYNCWORD_CORE 0x7FFE8001
DTS_SYNCWORD_SUBSTREAM 0x64582025
 
 
  DTS Core Data DTS Extension Data

 
DTS_SYNCWORD_CORE DTS_SYNCWORD_SUBSTREAM
 
1 PIFF Sample (Access Unit)
 
 
Figure 1 ‐ Example of a DTS‐HD sample as stored in a
 
PIFF fragment
 

4.1.4 Parsing a DTS bitstream


DTS‐HD track fragments are parsed from the ‘mdat’ according to the sample_size parameter in the track 
fragment run box. The sync word, as listed in Table 10, should be checked on both the sample being 
parsed, and the sample to follow (unless it’s the last sample in the ‘mdat’, in which case the last byte in 
the sample should also be the last byte in the ‘mdat’), for some assurance as to the integrity of the data. 

4.1.5 Constraints on the PIFF Track Fragments


PIFF files may contain multiple audio tracks, including multiple tracks of DTS‐HD audio. There are no 
additional constraints on DTS‐HD audio tracks. 

4.2 Identifying DTS in a PIFF File


DTS‐HD is an audio media type, in accordance with the ISO Media File Specification, [ISOFF]. Within the 
track box, a sound media header will be followed by a sample table box. Within the sample table box, 
one of the DTS‐HD audio sample entry boxes will be present. 
Figure 2 is an example of a sample table box containing the DTS sample entry box. 

28500 v2 Page 15 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 
4 5 6 7 8 9 Description
smhd Sound Media Header
stbl Sample table
stsd Sample Descriptions
dtsh May also be ‘dtsc’, ‘dtse’ or ‘dtsl’, see [DTSISO]
ddts Defined in [DTSISO]
stts Normally these boxes are all NULL in PIFF files since the ‘moov’ box
stsc does not contain samples. The relevant information is in the track
stsz ‘trun’ in the fragments (‘moof’ boxes) that are downloaded if the track
stco is selected.

Figure 2 ‐ Example of DTS‐HD in a PIFF file header

4.3 Encryption
Encryption of DTS_HD tracks in PIFF files is similar to any other media format. The DTSSampleEntry 4CC 
is replaced by ‘enca’ with the requisite ‘sinf’ added, as shown below Figure 3. 
 
4 5 6 7 8 9 Reference
stbl [ISOFF], section 8.5
stsd [ISOFF], section 8.5.2
enca
ddts
sinf [ISOFF], section 8.12.1 and [PIFF]
frma scheme_type = ‘cenc’, scheme_version = 0x00010000
schm
schi
tenc
stts

Figure 3 ‐ Encryption of DTS‐HD in PIFF

4.4 Demultiplexing DTS from a PIFF file.

4.4.1 Overview
This section provides some design considerations for products that implement PIFF demultiplexing for 
DTS‐HD audio bitstreams. 

4.4.2 Buffering considerations


The average amount of storage needed for a DTS audio frame can be determined from the duration of 
the frame and the bit rate. Using only the parameters in DTSSampleEntry(),[DTSISO] the calculation is: 
 

2 ∗ 512
∗ ∗ 1 
8 2
 
The first multiplicand converts bits/second to bytes/second. 

28500 v2 Page 16 of 17
  DTS Audio in IIS Smooth Streaming  Version 1.0 

The second part of the equation calculates the frame duration in seconds. “FrameDuration” in 
DTSSampleEntry is codified [0 to 3] representing frame duration in samples of 512, 1024, 2048 or 4096 
respectively, (relative to the base sample rate). The base sample rate, “samplerate” in the 
DTSSampleEntry box, may have a value of 32000, 44100 or 48000. 
The last piece of this equation accounts for a special case of LBR when it is internally band limited to 1/3 
or 2/3 of the full band, (useful for low bit rates). If LBRDurationMod is clear, then no modification and if 
it is set, then a 1.5 modifier for a special case of LBR (6144 sample frame duration). 

4.4.3 Conflicts or known issues


While every effort should be made to maintain a correct relationship between the audio track files and 
the related manifest files and sample entry information, a failure to do so should not render a track 
unplayable. 
In the event of a discrepancy between the bitstream parameters and either DTSSampleEntry or IIS 
manifest files, the decoder will present the audio according to the bitstream. The IIS manifests and the 
DTSSampleEntry are primarily informative. They may be used to aid the consumer in selecting the 
desired track, or for initial client configuration. 
 

28500 v2 Page 17 of 17

You might also like