STR (Streaming Data)
CD-ROM data format for streaming movies and other time-series data.
| Extension | .STR |
|---|---|
| Sector size | 2048 bytes (2336 bytes with audio) |
This is an old revision of this page, as edited by RemmyLee at 02:46, 23 October 2026. Edit this revision | Latest revision
Overview
Streaming is the reading and processing of successive data from a CD-ROM. STR is the CD-ROM data format defined for streaming on the PlayStation.1
Streaming is used for animation and audio. It also serves other time-series data that changes continuously.1
The streaming library is used separately from the other CD-ROM functions.1
The bitstream for movie playback comes through streaming. The bitstream does not hold the image size, so the STR header holds the data needed for playback.1
Streaming Data
Streaming data in an STR file is a continuous array of frame data elements.1
The contents of a frame depend on the data. In an animation, one frame can hold one still image of the sequence.1
The STR format does not set the data type of a frame.1
Each frame has its own length and type. One STR file can mix frames of several types and sizes.1
Frame Data
Frame data is divided into 2048-byte sectors. These match the CD-ROM data sectors.1
Each sector starts with a 32-byte header. 2016 bytes of data follow.1
Each frame begins on a sector boundary. The last sector of a frame is padded with dummy data to the 2048-byte boundary.12
Sector Header
The sector header is divided into the following fields:23
| Field | Size | Contents |
|---|---|---|
| StSTATUS | 2 bytes | STR format identifier and version |
| StTYPE | 2 bytes | Data type of the frame |
| StSECTOR_OFFSET | 2 bytes | Sector number in the frame |
| StSECTOR_SIZE | 2 bytes | Number of sectors in the frame |
| StFRAME_NO | 4 bytes | Frame number of the streaming data, starting from 1 |
| StFRAME_SIZE | 4 bytes | Frame size in long words |
| StUSER | 16 bytes | User-defined area |
All fields are little endian.3
An StTYPE with the MSB set is a system-defined format. With the MSB clear it is a user-defined format, and the other 15 bits are free.2
The streaming library uses StSECTOR_OFFSET, StSECTOR_SIZE and StFRAME_NO to read frame data in order without missing sectors.2
User-defined Frame Data
User-defined data streams with the MSB of StTYPE set to 0.3
A run of streaming data with the same attributes throughout can use one header frame for the whole run. This reduces the total amount of data.3
The manual gives an example of streaming data with a header frame.3
The example is as follows:
| Frame | StTYPE |
|---|---|
| Header | 0x0003 |
| Frame0 | 0x0002 |
| Frame1 | 0x0002 |
| Frame3 | 0x0002 |
In this example the LSB of StTYPE marks the header frame.3
The application can read StTYPE in each frame. The meaning of the frame data can then change with the type of frame.3
A header frame can hold CLUT data that is not saved in each frame. It can also hold a table of jumps to frames.3
MDEC Animation
MDEC animation is a system-defined format with StTYPE 0x8001.4
Its sector header has the following fields:
| Field | Size | Contents |
|---|---|---|
| StSTATUS | 2 bytes | Status |
| StTYPE | 2 bytes | Data type, with a channel number for multi-channel streaming |
| StSECTOR_OFFSET | 2 bytes | Sector number in the frame |
| StSECTOR_SIZE | 2 bytes | Number of sectors in the frame |
| StFRAME_NO | 4 bytes | Frame number of the streaming data, starting from 1 |
| StFRAME_SIZE | 4 bytes | Frame size in long words |
| StMOVIE_WIDTH | 2 bytes | Width |
| StMOVIE_HEIGHT | 2 bytes | Height |
| StMOVIE_HEADM | 4 bytes | Reserved for system |
| StMOVIE_HEADV | 4 bytes | Reserved for system |
The channel number is 0 for ordinary streaming.4
The frame data of an MDEC animation is BS data.
Streaming Data with Audio
The PlayStation plays back ADPCM audio data as specified in the CD-ROM XA standard. Sony calls this XA-ADPCM audio.4
XA-ADPCM audio goes from the CD-ROM decoder to the SPU without using main memory. Streaming reads data into main memory, so it cannot play XA-ADPCM audio.4
Audio sectors are interleaved with data sectors on the disc. Streaming data with audio places the streaming data in the gaps between the audio sectors.45
The manual's example uses streaming data at 30 fps (5 sectors per frame). The audio is 37.8 kHz stereo at double speed.5
Sector Size
A sector of ordinary streaming data is 2048 bytes. A sector of streaming data with audio is 2336 bytes.6
A data sector has the following parts:
| Part | Size |
|---|---|
| Subheader | 8 bytes |
| Sector header | 32 bytes |
| Data | 2016 bytes |
| Dummy data | 280 bytes |
The audio sectors have the following parts:6
| Part | Size |
|---|---|
| Subheader | 8 bytes |
| XA-ADPCM audio | 2324 bytes |
| Dummy data | 4 bytes |
The CD-ROM XA standard sets the size of the subheader. The subheader holds flags that tell data sectors from audio sectors.6
The dummy data makes an audio sector the same size as a data sector.6
The sector header and data areas are the same as in ordinary streaming data.6
References
-
^ a b c d e f g h i j k Sony Computer Entertainment Inc. File Formats. November 1998. Page 1-3, Figure 1.
-
^ a b c d Sony Computer Entertainment Inc. File Formats. November 1998. Page 1-4, Figures 2 and 3.
-
^ a b c d e f g h Sony Computer Entertainment Inc. File Formats. November 1998. Page 1-5, Figure 4.
-
^ a b c d e Sony Computer Entertainment Inc. File Formats. November 1998. Page 1-6, Figure 5.
-
^ a b Sony Computer Entertainment Inc. File Formats. November 1998. Page 1-7, Figure 7.
-
^ a b c d e Sony Computer Entertainment Inc. File Formats. November 1998. Page 1-8, Figures 8 and 9.