From MultimediaWiki
Jump to: navigation, search

VQF files are used to store a stream of TwinVQ encoded audio data.

General Layout

  • All (u)intxx fields are stored in big-endian order.
typedef struct vqf_file {
 char magic[4];                       /* "TWIN" */
 char version[8];                     /* e.g. "97012000" */
 uint32 subchunks_size;
 uint8 subchunks[subchunks_size];
 char datamarker[4];                  /* "DATA" */
 uint8 data[data_size];               /* data_size from DSIZ subchunk */
} vqf_file;
typedef struct subchunk {
 char subchunk_id[4];
 uint32 subchunk_size;
 uint8 data[subchunk_size-8];
} subchunk;

Standard Sub-chunks

  • Strings are not zero-terminated. The length is defined by the subchunk_size field.
Chunk ID Contents Field Description
COMM Mandatory information int32 channel_mode 0: mono, 1: stereo
int32 bitrate kbit/s
int32 samplerate 44: 44100 Hz, 22: 22050 Hz, 11: 11025 Hz
int32 security_level always 0
NAME Song title char name[]
COMT Comment char comment[]
AUTH Author char author[]
(c)<space> Copyright char copyright[]
FILE Filename char filename[]
DSIZ Data size uint32 data_size size of compressed audio data

Extension Sub-chunks

Chunk ID Contents Field Description
ALBM Album title char album_title[]
YEAR Recording date int16 year 0 means unspecified
char month idem
ENCD Compression date int16 year 0 means unspecified
char month idem
char day idem
char hour idem
char minute idem
char timeZone idem
TRAC Track number int16 track_number
LYRC Lyrics char lyrics[]
GUID Globally Unique Identifier uchar guid[16]
ISRC International Standard Record Code char isrc[] Identifier of CD
WORD Words char words[]
MUSC Composer char composer[]
ARNG Arranger char arranger[]
PROD Producer char producer[]
REMX Remixer char remixer[]
CDCT Conductor char conductor[]
SING Singer char singer[]
BAND Band name char band_name[]
PRSN Personnel char personnel[]
LABL Record label char record_label[]
NOTE Liner notes char liner_notes[]
SCND Auxiliary information char aux_info[]
EXTR reserved
_ID3 Reserved for ID3v2 tags char id3v2_data[] Not sure if such files exist;
priority for tags conflicting with
previous chunks is undefined
_YMH Reserved chunk
_NTT Reserved chunk

Supported formats

The official encoder supports the following output formats:

1 channel (mono), 16 bits per sample
samplerate (Hz) bitrate (kbit/s) bits/frame
11025 8 371
11025 10 464
22050 20 928
22050 24 1114
22050 32 743
44100 40 1857
44100 48 2229
2 channels (stereo), 16 bits per sample
samplerate (Hz) bitrate (kbit/s) bits/frame
11025 16 743
11025 20 928
22050 40 1857
22050 48 2229
22050 64 1486
44100 80 3715
44100 96 4458