Important: Please read the Qt Code of Conduct -

Voice recording encoding problem

  • Hello everyone.
    The problem that i'm facing is that i record a voice message but the encoding of the record is mp4. I would like to use different encoding for my record. Is there a way to do that?What about if i want to save it like mp3 file?

  • Lifetime Qt Champion

    @NickV You should tell how you are recording.
    If you use QAudioRecorder then take a look at its documentation:
    Did you try to set codec via QAudioEncoderSettings?
    There is even an example how to do it:

    recorder = new QMediaRecorder(camera);
    QAudioEncoderSettings audioSettings;

  • You've already asked this question:
    Audio recording

    Depending on what device you are using to record the audio, you may be limited to your available codecs. AFAIK, Qt does not provide codecs, just an interface to access them. You'd have to encode in a format native to your hardware and convert after the fact, or find a third-party codec you can integrate with your application and post-process the recorded audio after the fact.

Log in to reply