The quality command defines a custom quality level for either audio, video or still image data compression. Digital-video devices recognize this command.

To send this command, call the mciSendString function with the lpszCommand parameter set as follows.

  TEXT("quality %s %s %s"), 



Identifier of an MCI device. This identifier or alias is assigned when the device is opened.


One or more of the following flags. (One of the three flags "audio", "still", and "video" must be present.)

Value Meaning
algorithm algorithm Associates the quality level with the specified algorithm. This algorithm must be supported by the device and be compatible with the "audio", "still", or "video" flag that is used. If omitted, the current algorithm is used.
audio name Indicates this command specifies an "audio" quality level identified with name.
dialog Requests that the device display a dialog box. This dialog box has algorithm-specific fields that are used internally by the device to create the structure describing a specific quality level.
handle handle Specifies a handle to a structure that contains algorithmic-specific data describing a specific quality level. The structures for the data referenced by this handle are device specific.
still name Indicates the command specifies a "still" quality level identified with name.
video name Indicates the command specifies a "video" quality level identified with name.


Can be "wait", "notify", "test", or a combination of these. For more information about these flags, see The Wait, Notify, and Test Flags.

Return Values

Returns zero if successful or an error otherwise.


This command defines a string name for the quality level, which can then be used in a setvideo "quality", setvideo "still quality", or setaudio "quality" command to establish it as the current video, still, or audio-compression quality level.


  Windows NT/2000/XP: Included in Windows NT 3.1 and later.
  Windows 95/98/Me: Included in Windows 95 and later.

See Also

MCI, MCI Command Strings, setaudio, setvideo