Presentation Graphics

Presentation Graphics Stream (PGS or PG) is a bitmap graphics format commonly used for subtitles.

Presentation Graphics
Type of format Graphics & Subtitle Format
First released 2006
Developer Blu-ray Disc Association (Panasonic)
Filename extension None*
Limits 32 Streams
Open Format? Yes
Free Format? ?
Magic Number "PG" 0x5047

The format is similar to Interactive Graphics, but instead of using it for interactive menus, it is used for subtitles or rarely decorations. It is an vast improvement over DVD subtitles.

Presentation Graphics are displayed on its own independent layer behind the Interactive Graphics; it is similar to Interactive Graphics (IG) used for menus (both layers are on top of the Primary Video). The graphics (along with its data and X-Y coordinates) are stored inside M2TS files that contains the video and audio streams. The graphics are decoded from the Blu-ray player's special graphics decoder. It can only use 32 streams. The max graphics memory buffer size is 4 MB. Presentation Graphics are available on both HDMV and BD-J.**

Example of PGS on top of the Primary Video using different colors and sizes.

 

 

 

 

 

 

 

 

Features:   

  • It uses simple 8-bit colors and transparency (256 color palette), this is useful for simple graphics but complex ones like photos will cause dithering a la GIF.  
  •  Unlike Java Graphics (PNG, JPEG), Presentation Graphics use simple animations: Fade In/Out, Color changing, Wipe In/Out, and Scrolling. Supports frame rates up to 30 Hz. Despite being simple, they take a lot of space in the graphics memory buffer if pushing it to its limits.
  •  It's resolution plane size supports 1920x1080/1280x720/720x480/720x576. 
  •  Uses Run-length encoding, a simple compression method.

Presentation Graphics cannot be "opened" on a normal image program on a computer, it must be opened by demuxing the M2TS file or a specialized Blu-ray/subtitling editing software such as BDedit, BDReauthor, Scenarist, etc. When a PGS is extracted/demuxed from the M2TS file, it's usually saved in a file with the .sup extension (Subtitle Presentation).


Data

Data inside a PGS is made of several sections, each have the following header:

Presentation Graphics Stream Data
Name Description Byte Size
Magic Number 
"PG" 0x5047 2
PTS 
Presentation Timestamp - Indicates exact moment a decoded PG's sub-picture should be displayed/presented (synchronized) to the user (at a frequency of 90KHz). 4
DTS Decoding Timestamp - Indicates the precise moment when the decoding of the PG starts (at a frequency of 90KHz). 4
Segment Type
  • 0x14: PDS - Palette Definition Segment
  • 0x15: ODS - Object Definition Segment
  • 0x16: PCS - Presentation Composition Segment
  • 0x17: WDS - Window Definition Segment
  • 0x18: END - End of Display Set Segment 
1
Segment Size Size of the segment

  

Presentation Graphics are divided 5 segments:

  • Presentation Composition Segment (PCS)
  • Window Definition Segment (WDS)
  • Palette Definition Segment (PDS)
  • Object Definition Segment (ODS)
  • End of Display Set Segment (END)
 

Presentation Composition Segment (PCS) is used for composing the graphic's sub-picture. It is also called the Control Segment because it indicates a new Display Set (DS) definition, composed by definition segments (WDS, PDS, ODS) until an END segment is found.

In a Display Set, there can be several windows, palette and object definitions, and the composition objects define what's to be shown on screen.

Presentation Composition Segment fields:

NameDescriptionByte Size
Width 
Video width in pixels (ex.  0x780 = 1920)2
HeightVideo height in pixels (ex. 0x438 = 1080)2
Frame RateAlways 0x10. Can be ignored.1
Composition NumberNumber of this specific composition. It is incremented by one every time a graphics update occurs.2
Composition StateType of this composition. Allowed values are:
  • 0x00: Normal - Defines a display update, and contains only functional segments with elements that are different from the preceding composition.
  • 0x40: Acquisition Point - Defines a display refresh. This is used to compose in the middle of the Epoch. Includes functional segments with new objects to be used in a new composition, replacing old objects with the same Object ID.
  • 0x80: Epoch Start - Defines a new display. The Epoch Start contains all functional segments needed to display a new composition on the screen.

Palette Update FlagIndicates if this PCS describes a Palette only Display Update. Allowed values are:
  • 0x00: False
  • 0x80: True
1
Palette IDID of the palette to be used in the Palette only Display Update1
Number of Composition ObjectsNumber of composition objects defined in this segment1

Composition Objects define the position for each image to be displayed:

NameDescriptionByte Size
Object IDID of the ODS segment that defines the image to be shown2
Window IDID of the WDS segment to which the image is allocated in the PCS. Up to two images may be assigned to one window1
Object Cropped Flag
  • 0x40: Force display of the cropped image object
  • 0x00: Off
1
Object Horizontal PositionX offset from the top left pixel of the image on the screen2
Object Vertical PositionY offset from the top left pixel of the image on the screen
Object Cropping Horizontal PositionX offset from the top left pixel of the cropped object in the screen. Only used when the Object Cropped Flag is set to 0x40.2
Object Cropping Vertical PositionY offset from the top left pixel of the cropped object in the screen. Only used when the Object Cropped Flag is set to 0x40.2
Object Cropping WidthWidth of the cropped object in the screen. Only used when the Object Cropped Flag is set to 0x40.2
Object Cropping Height Position Height of the cropped object in the screen. Only used when the Object Cropped Flag is set to 0x40.


Window Definition Segment (WDS) defines the rectangular area on the screen where the graphic's sub-picture will be shown. This rectangular area is called a Window. This segment defines several windows, and all the fields from Window ID up to Window Height will repeat each other in the segment defining each window.

NameDescriptionByte Size
Number of WindowsNumber of windows defined in this segment1
Window IDID of this window1
Window Horizontal PositionX offset from the top left pixel of the window in the screen.2
Window Vertical PositionY offset from the top left pixel of the window in the screen.2
Window WidthWidth of the window 2 
Window HeightHeight of the window2

 

Palette Definition Segment (PDSis used to define a palette for color conversion. Multiple palette entries are allowed, each with a unique palette ID, enabling the last five fields to repeat.

NameDescriptionByte Size
Palette IDID of the palette1
Palette Version NumberVersion of this palette within the Epoch1
Palette Entry IDEntry number of the palette1
Luminance (Y)Luminance (Y value)1
Color Difference Red (Cr)Color Difference Red (Cr value)
Color Difference Blue (Cb)Color Difference Blue (Cb value)1
Transparency (Alpha)Transparency (Alpha value)1


Object Definition Segment (ODSdefines the graphics object. These are images with rendered text on a transparent background.

NameDescriptionByte Size
Object IDID of this object 2
Object Version NumberVersion of this object1
Last in Sequence FlagIf the image is split into a series of consecutive fragments, the last fragment has this flag set. Possible values:
  • 0x40: Last in sequence
  • 0x80: First in sequence
  • 0xC0: First and last in sequence ( 0x40 | 0x80 )
1
Object Data LengthThe length of the Run-length Encoding (RLE) data buffer with the compressed image data.3
WidthWidth of the image
HeightHeight of the image2
Object DataThis is the image data compressed using Run-length Encoding (RLE). The size of the data is defined in the Object Data Length field.Varies


End of Display Set Segment (ENDalways has a segment size of zero and indicates the end of a Display Set (DS) definition. It appears immediately after the last ODS in one DS.

Example of how subtitles are display. An Epoch in the drawing includes a DS1 (Epoch Start), a DS2 (Normal Case), and a DS3 (Normal Case). The DS1 contains a WDS for specifying the Window in which the subtitles are displayed, an ODS for specifying the line “Actually ... I was hiding my feelings.”, and a first PCS. The DS2 contains a second PCS, and the DS3 contains a third PCS.

Subtitles

Presentation Graphics are commonly used for subtitles for the deaf/hard-of-hearing (SDH), translations, karaoke, and sing-a-along lyrics on screen. Basic subtitles for SDH in mainstream movies typically use white fonts and black outlines. Subtitles for foreign movies typically use either white or yellow colored fonts with black outlines, not only for dialog, but also signs and lyrics.

Example of speaker ID in SDH (voices are off-screen)
Example of non-speech information in SDH (source is off-screen)
Example of non-speech information in SDH (two sources: off-screen and on-screen)
Example of music description in SDH
Example of lyrics transcription in SDH

For diffrent languages, Presentation Graphics Streams are tied with its language code defined in ISO 639-2/T. Each code represents names of language by three characters, e.g. ENG, JAP, etc. 

Forced Subtitles
Some commercial Blu-rays contain forced subtitles, meaning they cannot be turned off due to the HDMV programming, this can be "fixed" by ripping the BD, modifying the code (or M2TS file), and making a new version to burn on a blank BD-R. The reason why some PGS cannot be turned off is either artistic intent or using it for decorative menus. 

 

 

Footnotes

  • *It doesn't use a file extension in a traditional sense. BD editing programs use other image formats and converts them to PG. When a PGS is extracted/demuxed from the M2TS file, it's usually saved in a file with the .sup extension (Subtitle Presentation). Scenarist also uses the .pes file format for import, export, and editing (doesn't contain any magic numbers).
  • ** Presentation Graphics Streams and Text Subtitle Streams cannot be used and displayed at the same time. 


Sources


Author(s) : Æ Firestone

on Friday, November 7, 2025 | , | A comment?
0 responses to “Presentation Graphics”

Leave a Reply

Popular Pages