Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Voice recording encoding problem
Forum Updated to NodeBB v4.3 + New Features

Voice recording encoding problem

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 3 Posters 691 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • NickVN Offline
    NickVN Offline
    NickV
    wrote on last edited by
    #1

    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?

    jsulmJ 1 Reply Last reply
    0
    • NickVN NickV

      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?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

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

      recorder = new QMediaRecorder(camera);
      
      QAudioEncoderSettings audioSettings;
      audioSettings.setCodec("audio/amr");
      audioSettings.setQuality(QMultimedia::HighQuality);
      
      recorder->setAudioSettings(audioSettings);
      
      recorder->setOutputLocation(QUrl::fromLocalFile(fileName));
      recorder->record();
      

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DRoscoe
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved