AudioCompressors
property, read-only
property AudioCompressors: string read GetAudioCompressors;
__property System::UnicodeString AudioCompressors = {read=GetAudioCompressors};
public string AudioCompressors { get; }
Public ReadOnly Property AudioCompressors As String
wchar_t *GetAudioCompressors ();
Retrieves a string that contains the list of the audio compressors (audio codecs) available on the current platform.
This list can be assigned to list-based controls. E.g.:
ComboBox1.Items.Text := VideoGrabber1.AudioCompressors;ComboBox1.ItemIndex := VideoGrabber1.AudioCompressor;
It is possible to retrieve programmatically the index of an audio compressor by using the FindIndexInListByName function as follows:
VideoGrabber.AudioCompressor := VideoGrabber.FindIndexInListByName (VideoGrabber.AudioCompressors, 'name of my audio encoder', false, true);
The Media Foundation audio encoders of the platform, e.g. "AAC (Microsoft)", "MP3 (Microsoft)", "WMA (Microsoft)", are listed after the Datastead Multipurpose Encoder (index 0) and before the DirectShow compressors. They are used through the Datastead MFT Encoder of TVideoGrabber, without registration.
An encoder or a DirectShow compressor that appears after the first build of the list (e.g. RefreshDevicesAndCompressorsLists after the installation of a driver or a codec) is appended at the end of the list. Select the compressors by name (FindIndexInListByName) rather than by a fixed index.
The bit rate of a Media Foundation audio encoder entry can be set with ShowDialog (dlg_AudioCompressor) (the encoder uses its supported bit rate nearest to it). It is saved for that entry, as the settings of the DirectShow compressors (registry; SaveCompressorSettingsToDataString / LoadCompressorSettingsFromDataString), and used from the next recording. The Encoder_SetInt / Encoder_SetStr settings do not apply to these entries (FFmpeg codecs of the Datastead Multipurpose Encoder only).
The "Datastead Multipurpose Encoder" entry (index 0) is always listed; when the Datastead Multipurpose Encoder is installed, it uses the FFmpeg audio codecs, configured by Encoder_SetInt / Encoder_SetStr, see using the Datastead Encoder.
Note: when the application starts, the VideoCompressors and AudioCompressors lists are populated with the codecs currently installed. To refresh the compressor lists after installing/uninstalling codecs without exiting/restarting the application, invoke RefreshDevicesAndCompressorsLists.