Is recording to wav file with Qt6 supported on Windows?

150 Views Asked by At

I am trying to record audio to wav file on Windows using QMediaRecorder in Qt6.

Printing supported formats doesn't list Wave:

QMediaFormat format;
qDebug() << format.supportedFileFormats(QMediaFormat::ConversionMode::Encode);

QList(QMediaFormat::Mpeg4Audio, QMediaFormat::FLAC, QMediaFormat::MPEG4, QMediaFormat::WMV, QMediaFormat::AAC, QMediaFormat::MP3, QMediaFormat::WMA)

Is this a known issue for Qt6, since it worked with Qt5?

1

There are 1 best solutions below

0
Pamputt On

Are you sure WAV codec is really installed on your system? Another Qt user has the same problem with the WAV codec on Windows 11. Mitch Curtis points to Microsoft Codecs FAQ that explains "how to find out which codecs are installed on your computer":

  • On the Help menu in Windows Media Player, select About Windows Media Player. If you don't see the Help menu, select Organize > Layout > Show menu bar.
  • In the About Windows Media Player dialog box, select Technical Support Information. Your web browser will open a page that includes a lot of detailed info about the related binary files, codecs, filters, plug-ins, and services installed on your PC. This info should help you troubleshoot problems.