CameraRecorder without audio
-
Hi,
in my app running on embedded target (iMX6) I need to record videos. I am trying to use the QML
CameraRecorder
(using thevideoRecorder
property ofCamera
). 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 errorCameraBin warning: "Can't record audio fast enough"
(which is comming fromgstreamer
. 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
-
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 ?
-
Have you tried setting the
muted
property of yourCameraRecorder
totrue
? -
-
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. -
@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
-
@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 thevideoRecorder
property is enabled in theCamera
. That means, the audio encoding was not causing this problem at all.Thx, Jens