Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved CameraRecorder without audio

    QML and Qt Quick
    camera camerabin audio gstreamer recording
    3
    8
    1893
    Loading More Posts
    • 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.
    • Y
      YenZi last edited by

      Hi,

      in my app running on embedded target (iMX6) I need to record videos. I am trying to use the QML CameraRecorder (using the videoRecorder property of Camera). The problem I am facing is, that the camera output is slowed down extremely as soon as I enable the videoRecorder. On the console I can see the error CameraBin warning: "Can't record audio fast enough" (which is comming from gstreamer. As I don't need any audio recorded in the video at all, I am looking for a way to set things up so that I can record only the video without any audio. I have searched for a solution for 2 days now and I couldn't find any answer. So maybe someone here on the forum can help out.

      Thx, YenZi

      1 Reply Last reply Reply Quote 0
      • Y
        YenZi last edited by

        So, I just found out that this gstreamer pipeline on the commandline works just fine and records the camera capture to a file :

        gst-launch-1.0 -e imxv4l2videosrc ! imxvpuenc_h264 bitrate=4096 ! h264parse ! mp4mux ! filesink location=video.mp4
        

        Now the question would be, how I can control these gstreamer pipeline params just by using the QML Camera component ?

        1 Reply Last reply Reply Quote 0
        • GrecKo
          GrecKo Qt Champions 2018 last edited by

          Have you tried setting the muted property of your CameraRecorder to true ?

          Y 1 Reply Last reply Reply Quote 1
          • Cleiton Bueno
            Cleiton Bueno last edited by

            @GrecKo it's right, see.

            QMediaRecord
            Camera Recorder QML


            Cleiton Bueno

            Blog | Linkedin | B2Open

            Y 1 Reply Last reply Reply Quote 0
            • Y
              YenZi @GrecKo last edited by

              Hi @GrecKo ,

              yes, I've set muted: true. Makes no difference.

              1 Reply Last reply Reply Quote 0
              • Y
                YenZi @Cleiton Bueno last edited by

                Hi @Cleiton-Bueno,

                even if I set muted: true the gstreamer pipeline still seems to have audio encoding included. The biggest problem is, that I don't have control over the gstreamer pipeline working as the backend for QtMultimedia elements.

                Cleiton Bueno 1 Reply Last reply Reply Quote 0
                • Cleiton Bueno
                  Cleiton Bueno @YenZi last edited by

                  @YenZi An alternative so you do not have to change QtMultimedia source-code, create patches and everything else is to block the kernel module regarding the mic part of the webcam, for example:

                  Listing the drivers/modules for the audio interfaces:

                  $ cat /proc/asound/modules
                    0 snd_hda_intel
                  

                  Then add in the blacklist this module, be careful that more than one can identify the WebCamera/Camera:

                  # echo "blacklist snd_hda_intel" >> /etc/modprobe.d/blacklist.conf
                  

                  So the module will not load and the capture will not work.


                  Cleiton Bueno

                  Blog | Linkedin | B2Open

                  Y 1 Reply Last reply Reply Quote 0
                  • Y
                    YenZi @Cleiton Bueno last edited by

                    @Cleiton-Bueno thanks for your suggestion. I have disabled audio in my kernel completely now. Now I get the message CameraBin warning: "Could not open audio device for recording." which shows, that I really removed audio support.
                    Unfortunately, this still doesn't solve my basic issue, which is a extremely sluggish video output when the videoRecorder property is enabled in the Camera. That means, the audio encoding was not causing this problem at all.

                    Thx, Jens

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post