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 Sound and Video using QMediaRecorder
Forum Updated to NodeBB v4.3 + New Features

Record Sound and Video using QMediaRecorder

Scheduled Pinned Locked Moved Solved General and Desktop
19 Posts 4 Posters 9.7k Views 3 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #9

    One thing is: do you have an mp4 encoder on your machine ?

    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
    1
    • C Offline
      C Offline
      ClementD
      wrote on last edited by
      #10

      @SGaist I think not. i have VLC or openCV but i don't think Qt can access it.
      Qt doesn't have a native encoder? i don't need mp4 , still can be avi or anything.

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

        VLC is ffmpeg based.

        Qt doesn't provide any codec, it uses whatever the platform makes available.

        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
        2
        • C Offline
          C Offline
          ClementD
          wrote on last edited by
          #12

          How can i make codec available to Qt?
          Do i have to edit kits ? or environnement variable?

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

            Make them available to Windows. Like I said, Qt backends implementation are platform specific, so you have to install the codecs you want on your system in order for Qt to be able to use them.

            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
            2
            • C Offline
              C Offline
              ClementD
              wrote on last edited by
              #14

              Thanks you! i'll try tonight. But if i deploy my software, do i have to install codecs on each computer using my software or does Qt include it during the deployment?

              At the moment i am currently working with openCV for the video.
              On the audio part, i noticed a problem using QAudioRecorder. when i try to change settings, it's always fail. maybe i have the same problem with QMediaRecorder.
              Keep looking for a solution and i'll telle you if i find the solution. Thanks you for your help ;)

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

                No, Qt won't install such stuff for you, it's up to you to either point the user to where he should get one or make it part of your installer.

                What settings are you using ?

                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
                1
                • C Offline
                  C Offline
                  ClementD
                  wrote on last edited by
                  #16

                  Hello, sorry i have been working during the end of years events so i did not work on my own project.
                  I have currently created a thread using Open CV in order to record video in .avi and i used the Qt's audiorecorder example to record sound. i juste changed it a little but it's fully functionnal.

                  Next step is to merge these two process and to syncronously record video and sound.
                  I will creat a last thread that will use ffmpeg to merge the two files.

                  happy new year everybody and i wish you a happy coding year !

                  mrjjM 1 Reply Last reply
                  0
                  • C ClementD

                    Hello, sorry i have been working during the end of years events so i did not work on my own project.
                    I have currently created a thread using Open CV in order to record video in .avi and i used the Qt's audiorecorder example to record sound. i juste changed it a little but it's fully functionnal.

                    Next step is to merge these two process and to syncronously record video and sound.
                    I will creat a last thread that will use ffmpeg to merge the two files.

                    happy new year everybody and i wish you a happy coding year !

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #17

                    @ClementD
                    Happy new year to you too :)

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      ClementD
                      wrote on last edited by
                      #18

                      Finaly, i have finished and it is working!

                      To conclude :

                      I used the audio recorder example to record sound.
                      I used OpenCV to record video syncroniously
                      at the end of the recording, I used a QProcess in order to launch ffmpeg.

                      Linking it with some signals to a main process which handle all processes.

                      Well! Problem SOLVED. Thanks you all !

                      T 1 Reply Last reply
                      3
                      • C ClementD

                        Finaly, i have finished and it is working!

                        To conclude :

                        I used the audio recorder example to record sound.
                        I used OpenCV to record video syncroniously
                        at the end of the recording, I used a QProcess in order to launch ffmpeg.

                        Linking it with some signals to a main process which handle all processes.

                        Well! Problem SOLVED. Thanks you all !

                        T Offline
                        T Offline
                        thippu
                        wrote on last edited by
                        #19

                        @ClementD , @SGaist ,Hi
                        This is thippu
                        I'm working on video recording project using Qt creator coding in c++
                        I'm new to it Plz help me how to record video and save the recorded video(with audio).
                        or if u have created project already provide link so that I can refer and use
                        It helps me lot !!
                        thank you in advance

                        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