VGM: Difference between revisions
(Add actual container information.)
m (Muzip1 -> Muzip)
|Line 17:||Line 17:|
Latest revision as of 08:27, 17 February 2021
- Company: XVD Corporation (DigitalStream-USA)
- Website: http://www.xvdcorp.com/
- Extension: vgm, vg2
- Samples: http://xvd.bha.co.jp/download/sample.html
VGM (presumably from VideoGraM since originally this format was used for sending short video messages from one user to another) aka XVD (eXtended-play Video Disc) is a format that includes VGM Audio codec and VGM Video codec.
There are some historical variants:
- Image/Video codecs
- WCTc: http://www.ila-ila.com/xvd-hist/sites/lab1454/eng/products/l3.wvl
- VT 1.26: http://www.ila-ila.com/xvd-hist/sites/lab1454/eng/products/missa_vt.exe
- Domen: http://www.ila-ila.com/xvd-hist/sites/lab1454/eng/products/missa_d.exe
- Speech/Audio codecs
- Telp1600: http://www.ila-ila.com/xvd-hist/sites/lab1454/eng/products/ct.csf
- TELPV: http://www.ila-ila.com/xvd-hist/sites/lab1454/eng/products/cynd30.vgm
This format uses big-endian data in its structure and intended to be used with Muzip 1-4, TELP, VT and Domen codecs.
4 bytes - file size (may be zero) 4 bytes - duration in milliseconds 4 bytes - "head" marker 4 bytes - header size 1 byte - number of streams (header_size - 1) bytes - stream headers 4 bytes - "data" marker data packets
Stream header format:
1 byte - codec name length N bytes - codec name 1 byte - stream ID 4 bytes - codec ID 4 bytes - codec priority 4 bytes - codec extradata
1 byte - stream ID 4 bytes - timestamp in milliseconds 4 bytes - data size
This format uses little-endian integers
4 bytes - "VGM2" 4 bytes - file size (may be zero) 4 bytes - duration in milliseconds 1 byte - number of streams 1 byte - file comment length N bytes - file comment (usually "Created by BHA dumper") 1 bytes - string terminator? stream headers data packets
1 byte - stream type 4 bytes - codec ID 4 bytes - stream header extradata size extradata
1 - audio stream 2 - video stream 5 - stream with end-of-stream marker (single packet almost at the end of file), maybe other system messages 6 - stream with seek table (?), also single packet at the end of file >128 - just some padding that occurs time from time
1 byte - stream number (in the order they appear in the header) 1 byte - flags 2/4 bytes - timestamp in milliseconds (4 bytes if bit 2 in flags is set, 2 bytes otherwise) 2/4 bytes - packet size including the header (4 bytes if bit 1 in flags is set, 2 bytes otherwise) 2/4 bytes - some size for video streams only, maybe second field or for P+B frame combination (4 bytes if bit 1 in flags is set, 2 bytes otherwise). Usually it is zero.
Known codec IDs and their headers
- 3 - Muzip first version
- 4 - TELP
- 5..9 - Muzip
0x010027- probably XVD 1.x
0x110027- XVD 2.4
0x210027- XVD 2.5
Audio and video header have the same format in VGM 1 and 2 except that in version 2 there are two additional 4-byte fields in the beginning that can be ignored. All data is in little-endian format.
2 bytes - should be 0x300 2 bytes - number of channels 4 bytes - sampling rate
For Muzip starting at byte 18 there is also codec sub-flavour, known flavours are
MZIP13R (for the latest known version).
2 bytes - width 2 bytes - height 4 bytes - unknown (the rest is for newer versions only) 4 bytes - width 4 bytes - height 4 bytes - bitrate 4 bytes - frames per second