Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Extract sound with QMultimedia
QtWS25 Last Chance

Extract sound with QMultimedia

Scheduled Pinned Locked Moved Solved General and Desktop
qmultimediaaudiovideo
10 Posts 3 Posters 4.2k 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.
  • S Offline
    S Offline
    sabativi
    wrote on 26 Apr 2016, 15:04 last edited by
    #1

    Hello,

    I would like to know if it is possible to extract sound from a video with qmultimedia.
    I know you can play and record sounds, but how to extract from a video.

    I know how to read video, i know how to write sounds on disk, the only missing part is the extraction.

    Perhaps the answer is : qmultimedia is not built for this, use third party library.

    Thanks in advance,

    Victor

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 26 Apr 2016, 21:53 last edited by
      #2

      Hi and welcome to devnet,

      Depending on your OS, you could use QAudioProbe.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sabativi
        wrote on 28 Apr 2016, 08:57 last edited by
        #3

        @SGaist Thanks for your response.

        As i am running on OSX, i can see that the backend does not support QAudioProbe.

        Qt has a lot of examples for recording sound/videos based on a device, can we substitute a device with a video ?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 29 Apr 2016, 20:51 last edited by
          #4

          It's not that easy because both do use the same route.

          You should take a look at QtAV, that might get you the building blocks you need in order to do what you want.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          S 1 Reply Last reply 2 May 2016, 13:50
          0
          • S SGaist
            29 Apr 2016, 20:51

            It's not that easy because both do use the same route.

            You should take a look at QtAV, that might get you the building blocks you need in order to do what you want.

            S Offline
            S Offline
            sabativi
            wrote on 2 May 2016, 13:50 last edited by
            #5

            @SGaist Thanks again.

            I have already looked at QtAv, but for a commercial purpose QMultimedia is better because it uses codes installed on the target.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 2 May 2016, 21:14 last edited by
              #6

              Don't take it the wrong way but that's not a good argument.

              OS X applications embed their non-system dependencies so they can run wherever they are installed. That's already what you do with Qt. The only thing you have to take into account with ffmpeg is the codecs you want/need to have. Some are GPL only.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              S 1 Reply Last reply 3 May 2016, 09:05
              0
              • S SGaist
                2 May 2016, 21:14

                Don't take it the wrong way but that's not a good argument.

                OS X applications embed their non-system dependencies so they can run wherever they are installed. That's already what you do with Qt. The only thing you have to take into account with ffmpeg is the codecs you want/need to have. Some are GPL only.

                S Offline
                S Offline
                sabativi
                wrote on 3 May 2016, 09:05 last edited by
                #7

                @SGaist Allright, thanks for this and no worry i do not take it personnally, i am here to learn :)

                Have you already use ffmpeg bindings of QtAv ? I am trying to use it to run a simple command like : ffmpeg -i input.mp4 output.wav, still trying to figure out the simple way to do this.

                So what are the advantages of using QMultimedia versus QtAv for you ?

                Thanks again and again,

                Victor

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 3 May 2016, 20:07 last edited by
                  #8

                  No, I haven't used QtAV yet but ffmpeg libraries directly.

                  If you want to just run the ffmpeg executable, then use QProcess.

                  QtMultimedia uses the system multimedia framework so you don't have to build additional dependencies. You should also have easy access to the cameras the system can handle as well as reading multimedia files. So depending on your needs, its more than enough.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • V Offline
                    V Offline
                    vlada
                    wrote on 20 Apr 2017, 14:15 last edited by
                    #9

                    I would like to continue in this discussion. I'm working on a music player and I would like to implement some music visualisation (nothing fancy, just a spectrum analyzer based on FFT).

                    So did you find a way to get the raw audio data of a music file I'm currently playing? I'm using QtAV but I didn't find there any possibility to read the decoded audio data or something similar to QAudioProbe.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 20 Apr 2017, 21:06 last edited by
                      #10

                      Hi,

                      Then that's something you should ask to the QtAV authors. It's not an official Qt module.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      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