Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. CameraRecorder without audio
Forum Updated to NodeBB v4.3 + New Features

CameraRecorder without audio

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
cameracamerabinaudiogstreamerrecording
8 Posts 3 Posters 2.8k Views 1 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.
  • Y Offline
    Y Offline
    YenZi
    wrote on 12 Jul 2018, 08:37 last edited by
    #1

    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
    0
    • Y Offline
      Y Offline
      YenZi
      wrote on 12 Jul 2018, 13:28 last edited by
      #2

      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
      0
      • G Offline
        G Offline
        GrecKo
        Qt Champions 2018
        wrote on 12 Jul 2018, 14:28 last edited by
        #3

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

        Y 1 Reply Last reply 13 Jul 2018, 05:37
        1
        • C Offline
          C Offline
          Cleiton Bueno
          wrote on 12 Jul 2018, 18:29 last edited by
          #4

          @GrecKo it's right, see.

          QMediaRecord
          Camera Recorder QML


          Cleiton Bueno

          Blog | Linkedin | B2Open

          Y 1 Reply Last reply 13 Jul 2018, 05:40
          0
          • G GrecKo
            12 Jul 2018, 14:28

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

            Y Offline
            Y Offline
            YenZi
            wrote on 13 Jul 2018, 05:37 last edited by
            #5

            Hi @GrecKo ,

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

            1 Reply Last reply
            0
            • C Cleiton Bueno
              12 Jul 2018, 18:29

              @GrecKo it's right, see.

              QMediaRecord
              Camera Recorder QML


              Cleiton Bueno

              Blog | Linkedin | B2Open

              Y Offline
              Y Offline
              YenZi
              wrote on 13 Jul 2018, 05:40 last edited by
              #6

              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.

              C 1 Reply Last reply 13 Jul 2018, 13:53
              0
              • Y YenZi
                13 Jul 2018, 05:40

                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.

                C Offline
                C Offline
                Cleiton Bueno
                wrote on 13 Jul 2018, 13:53 last edited by
                #7

                @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 19 Jul 2018, 13:27
                0
                • C Cleiton Bueno
                  13 Jul 2018, 13:53

                  @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 Offline
                  Y Offline
                  YenZi
                  wrote on 19 Jul 2018, 13:27 last edited by
                  #8

                  @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
                  0

                  6/8

                  13 Jul 2018, 05:40

                  • Login

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