The DPG format is implemented by the Nintendo DS video/music player program MoonShell.
There exist (as far as we know) no official specifications for the format and this page summarizes what we know.
DPG exists in five versions, 0-4. The main changes in these versions are:
- DPG1: Stereo audio
- DPG2: A GOP file for faster searches in the video stream
- DPG4: Thumbnail picture
The DPG file starts with a header:
- DPG0-1 Header size 36
- 0-3: 'DPGX' where X is the version
- 4-7: Number of frames in the video
- 8-11: FPS
- 12-15: Audio sample rate
- 16-19: Number of audio channels (special for gsm:1/ogg:3)
- 20-23: Audio start
- 24-27: Audio size
- 28-31: Video start
- 32-35: Video size
- DPG2-3 additional GOP Header +12 = 48 (DPG2-3) or 52 (DPG4)
- 36-39: GOP start
- 40-43: GOP size
- 44-47: Pixel format: RGB15, RGB18, RGB21 or RGB24. (DPG1 writes this information at byte 36)
- DPG4: Thumbnail pictures,
- 48-51 'THM0'
- Thumbnail image size is 98304
- Audio start 52 + 98304 = 98356
- Codec - mpeg1
- Height - 192, could theoretically be as low as 16
- Width - 256
- FPS - 15
- Codec - mp2, gsm/ogg also possible
- Bitrate 128
- Sample rate 32000, higher possible but may result in worse quality
- Codec - TGA, without header, 16 bit RGB values
- Height - 192
- Width - 256
Nintendo DS compatible software
The current version of dpg4x, has been tested with MoonShell 2.06. Older versions are supposed to work too, if you select the appropriate DPG version for your videos.
Videos encoded with dpg4x are known to work in other alternative DPG players, as those included with M3-DS cards, for example. To ensure better compatibility, it is recommended to encode your videos as DPG0 version, and to keep your DPG player as updated as possible.