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. Record audio and video in one container
Qt 6.11 is out! See what's new in the release blog

Record audio and video in one container

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 2.8k Views 2 Watching
  • 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
    stevem8
    wrote on last edited by
    #1

    Hi

    I am building an application that records video from a USB capture stick, the program works great while using openCV with imwrire to create the file.

    I want to record audio along with this video file, i have looked at the QT examples and have built a program that records audio without a problem.

    The next stage is to combine these 2 streams together and write into one file within QT, does anyone know how this can be done? Would it require using LIbav or something similar?

    Steve

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Is your USB capture stick device seen as a camera ? If so you can try using QtMultimedia to record that input.

      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

      S 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Is your USB capture stick device seen as a camera ? If so you can try using QtMultimedia to record that input.

        Hope it helps

        S Offline
        S Offline
        stevem8
        wrote on last edited by
        #3

        @SGaist

        Hi

        Thanks for your response, yes the catputure stick is being seen as a camera, i am able to make a video file using openCV and x264vfw to create a video file which works perfectly. I have also used the QT example to create an audio recorder which works without a problem. These 2 sepparate programs will create individual video and audio files.

        I can't find an example where i can mux both these files together within QT, i have used ffmpegwrapper for QT but this however only handles video.

        Do you know of a QtMulitmedia example that will record both audio and video.

        Thanks for the help

        Steve

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Take a look at the QCamera + QRecorder classes they might be enough

          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
          0
          • SGaistS SGaist

            Take a look at the QCamera + QRecorder classes they might be enough

            S Offline
            S Offline
            stevem8
            wrote on last edited by
            #5

            @SGaist

            I had a look at QMediaRecorder class but this class will only accept QMedia objects (QAudioDecoder, QCamera, QMediaPlayer, and QRadioTuner). My application takes a video from the camera using openCV, performs video processing and produces a series of QImage frames which i write to a file.

            Is it possible to stream these processed QImage frames to QMediaPlayer which can then be used as an object for QMediaRecorder?

            I cant seems to find QRecorder, will that be more suitable than QMediaRoecorder?

            Steve

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Isn't your camera detected by QtMultimedia i.e. listed by QCameraInfo ?

              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
              0
              • SGaistS SGaist

                Isn't your camera detected by QtMultimedia i.e. listed by QCameraInfo ?

                S Offline
                S Offline
                stevem8
                wrote on last edited by
                #7

                @SGaist

                The camera is being detected but that is not what i want to record, i need to record the video stream that has been processed by openCV, can this be done?

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Then a project like QtAV might be what you need.

                  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