[Solved] Webcam Audio Not Recorded Properly

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

[Solved] Webcam Audio Not Recorded Properly

Post by ismail783 »

My webcam video recording is working.

When I am making sound my input device is receiving sound.

However, when I playback the sound, it is nothing but noise.
Screenshot from 2020-06-27 17-47-28.png
What can I do now?
Last edited by ismail783 on Tue Jun 30, 2020 1:05 am, edited 1 time in total.

ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

Re: Webcam Audio Not Recorded Properly

Post by ismail783 »

I also tried to record sound using arecord and this is what I get:

Code: Select all

$ arecord --list-devices                                                                             
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 2: ALC887-VD Alt Analog [ALC887-VD Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: WEBCAM [GENERAL WEBCAM], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ arecord -f dat -r 60000 -D hw:1,0 -d 5 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 60000 Hz, Stereo
arecord: set_params:1305: Channels count non available
I think this set_params:1305: Channels count non available is causing the problems.

Any suggestions?

ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

Re: Webcam Audio Not Recorded Properly

Post by ismail783 »

I have just updated the kernel

Code: Select all

$ uname -r
5.4.0-39-generic
no luck yet.

ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

Re: Webcam Audio Not Recorded Properly

Post by ismail783 »


ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

Re: Webcam Audio Not Recorded Properly

Post by ismail783 »


User avatar
MrEen
Level 20
Level 20
Posts: 11571
Joined: Mon Jun 12, 2017 8:39 pm

Re: Webcam Audio Not Recorded Properly

Post by MrEen »

Hi ismail783,

Let's see the output of amixer -c1 please.

ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

Re: Webcam Audio Not Recorded Properly

Post by ismail783 »

amixer -c1 output is given bellow

Code: Select all

$ amixer -c1
Simple mixer control 'Mic',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 2
  Mono: Capture 2 [100%] [50.00dB] [on]

ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

Re: Webcam Audio Not Recorded Properly

Post by ismail783 »

By the way, how did you show inline code? I can't do it, so I bold the text.

User avatar
MrEen
Level 20
Level 20
Posts: 11571
Joined: Mon Jun 12, 2017 8:39 pm

Re: Webcam Audio Not Recorded Properly

Post by MrEen »

WOW. 0-2 for volume control? That really doesn't sound correct, but I'm not sure what to do about it.

Let's see pacmd list-cards now. For that inline code, the button with a c on it while the text is highlighted does that, but I sometimes just type [ c ] and [ /c ] (without the spaces) when I'm not interested in touching the mouse. (And now I'll use the mouse to hit the Submit button :lol: )

ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

Re: Webcam Audio Not Recorded Properly

Post by ismail783 »

I have made a lot of change to make it working. Do you want me to use timeshift? In that case it might take 10 min to get back to you.

Code: Select all

$ pacmd list-cards
2 card(s) available.
    index: 0
	name: <alsa_card.pci-0000_00_1f.3>
	driver: <module-alsa-card.c>
	owner module: 7
	properties:
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0x6001110000 irq 131"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		input:analog-stereo: Analog Stereo Input (priority 60, available: no)
		output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
		output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500, available: unknown)
		output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (priority 5560, available: unknown)
		output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
		output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5460, available: unknown)
		output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5200, available: no)
		output:hdmi-stereo-extra1+input:analog-stereo: Digital Stereo (HDMI 2) Output + Analog Stereo Input (priority 5260, available: no)
		output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 100, available: no)
		output:hdmi-surround-extra1+input:analog-stereo: Digital Surround 5.1 (HDMI 2) Output + Analog Stereo Input (priority 160, available: no)
		output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 100, available: no)
		output:hdmi-surround71-extra1+input:analog-stereo: Digital Surround 7.1 (HDMI 2) Output + Analog Stereo Input (priority 160, available: no)
		output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5200, available: no)
		output:hdmi-stereo-extra2+input:analog-stereo: Digital Stereo (HDMI 3) Output + Analog Stereo Input (priority 5260, available: no)
		output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 100, available: no)
		output:hdmi-surround-extra2+input:analog-stereo: Digital Surround 5.1 (HDMI 3) Output + Analog Stereo Input (priority 160, available: no)
		output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 100, available: no)
		output:hdmi-surround71-extra2+input:analog-stereo: Digital Surround 7.1 (HDMI 3) Output + Analog Stereo Input (priority 160, available: no)
		off: Off (priority 0, available: unknown)
	active profile: <output:analog-stereo+input:analog-stereo>
	sinks:
		alsa_output.pci-0000_00_1f.3.analog-stereo/#0: Built-in Audio Analog Stereo
	sources:
		alsa_output.pci-0000_00_1f.3.analog-stereo.monitor/#0: Monitor of Built-in Audio Analog Stereo
		alsa_input.pci-0000_00_1f.3.analog-stereo/#1: Built-in Audio Analog Stereo
	ports:
		analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
			properties:
				
		analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: yes)
			properties:
				
		analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-speakers"
		analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
		iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
			properties:
				
		hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "video-display"
				device.product.name = "LG IPS FULLHD"
		hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
    index: 1
	name: <alsa_card.usb-GENERAL_GENERAL_WEBCAM-02>
	driver: <module-alsa-card.c>
	owner module: 27
	properties:
		alsa.card = "1"
		alsa.card_name = "GENERAL WEBCAM"
		alsa.long_card_name = "GENERAL GENERAL WEBCAM at usb-0000:00:14.0-8, high speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:00:14.0-usb-0:8:1.2"
		sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/sound/card1"
		udev.id = "usb-GENERAL_GENERAL_WEBCAM-02"
		device.bus = "usb"
		device.vendor.id = "1b3f"
		device.vendor.name = "Generalplus Technology Inc."
		device.product.id = "2002"
		device.product.name = "808 Camera"
		device.serial = "GENERAL_GENERAL_WEBCAM"
		device.form_factor = "webcam"
		device.string = "1"
		device.description = "808 Camera"
		module-udev-detect.discovered = "1"
		device.icon_name = "camera-web-usb"
	profiles:
		input:analog-mono: Analog Mono Input (priority 2, available: unknown)
		off: Off (priority 0, available: unknown)
	active profile: <input:analog-mono>
	sources:
		alsa_input.usb-GENERAL_GENERAL_WEBCAM-02.analog-mono/#2: 808 Camera Analog Mono
	ports:
		analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-input-microphone"

ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

Re: Webcam Audio Not Recorded Properly

Post by ismail783 »

I have reverted back to the point where I started making change in the sound system.

Here are both outputs again,

Code: Select all

$ amixer -c1
Simple mixer control 'Mic',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 2
  Mono: Capture 2 [100%] [50.00dB] [on]

$ pacmd list-cards
2 card(s) available.
    index: 0
	name: <alsa_card.pci-0000_00_1f.3>
	driver: <module-alsa-card.c>
	owner module: 7
	properties:
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0x6001110000 irq 129"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		input:analog-stereo: Analog Stereo Input (priority 60, available: no)
		output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
		output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500, available: unknown)
		output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (priority 5560, available: unknown)
		output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
		output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5460, available: unknown)
		output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5200, available: no)
		output:hdmi-stereo-extra1+input:analog-stereo: Digital Stereo (HDMI 2) Output + Analog Stereo Input (priority 5260, available: no)
		output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 100, available: no)
		output:hdmi-surround-extra1+input:analog-stereo: Digital Surround 5.1 (HDMI 2) Output + Analog Stereo Input (priority 160, available: no)
		output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 100, available: no)
		output:hdmi-surround71-extra1+input:analog-stereo: Digital Surround 7.1 (HDMI 2) Output + Analog Stereo Input (priority 160, available: no)
		output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5200, available: no)
		output:hdmi-stereo-extra2+input:analog-stereo: Digital Stereo (HDMI 3) Output + Analog Stereo Input (priority 5260, available: no)
		output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 100, available: no)
		output:hdmi-surround-extra2+input:analog-stereo: Digital Surround 5.1 (HDMI 3) Output + Analog Stereo Input (priority 160, available: no)
		output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 100, available: no)
		output:hdmi-surround71-extra2+input:analog-stereo: Digital Surround 7.1 (HDMI 3) Output + Analog Stereo Input (priority 160, available: no)
		off: Off (priority 0, available: unknown)
	active profile: <output:analog-stereo+input:analog-stereo>
	sinks:
		alsa_output.pci-0000_00_1f.3.analog-stereo/#0: Built-in Audio Analog Stereo
	sources:
		alsa_output.pci-0000_00_1f.3.analog-stereo.monitor/#0: Monitor of Built-in Audio Analog Stereo
		alsa_input.pci-0000_00_1f.3.analog-stereo/#1: Built-in Audio Analog Stereo
	ports:
		analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
			properties:
				
		analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: yes)
			properties:
				
		analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-speakers"
		analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
		iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
			properties:
				
		hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "video-display"
				device.product.name = "LG IPS FULLHD"
		hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
    index: 1
	name: <alsa_card.usb-GENERAL_GENERAL_WEBCAM-02>
	driver: <module-alsa-card.c>
	owner module: 27
	properties:
		alsa.card = "1"
		alsa.card_name = "GENERAL WEBCAM"
		alsa.long_card_name = "GENERAL GENERAL WEBCAM at usb-0000:00:14.0-8, high speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:00:14.0-usb-0:8:1.2"
		sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/sound/card1"
		udev.id = "usb-GENERAL_GENERAL_WEBCAM-02"
		device.bus = "usb"
		device.vendor.id = "1b3f"
		device.vendor.name = "Generalplus Technology Inc."
		device.product.id = "2002"
		device.product.name = "808 Camera"
		device.serial = "GENERAL_GENERAL_WEBCAM"
		device.form_factor = "webcam"
		device.string = "1"
		device.description = "808 Camera"
		module-udev-detect.discovered = "1"
		device.icon_name = "camera-web-usb"
	profiles:
		input:analog-mono: Analog Mono Input (priority 2, available: unknown)
		off: Off (priority 0, available: unknown)
	active profile: <input:analog-mono>
	sources:
		alsa_input.usb-GENERAL_GENERAL_WEBCAM-02.analog-mono/#2: 808 Camera Analog Mono
	ports:
		analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-input-microphone"

User avatar
MrEen
Level 20
Level 20
Posts: 11571
Joined: Mon Jun 12, 2017 8:39 pm

Re: Webcam Audio Not Recorded Properly

Post by MrEen »

Okay, you said in your OP that it recorded nothing but noise. Was the noise quite loud? If so, try amixer -c1 set Mic 50% and test again.

ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

Re: Webcam Audio Not Recorded Properly

Post by ismail783 »

I ran amixer -c1 set Mic 50%, then record audio using cheese. It sounds like someone is blowing very strong wind in my microphone after a certain interval repeatedly.

ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

Re: Webcam Audio Not Recorded Properly

Post by ismail783 »


User avatar
MrEen
Level 20
Level 20
Posts: 11571
Joined: Mon Jun 12, 2017 8:39 pm

Re: Webcam Audio Not Recorded Properly

Post by MrEen »

This is quite odd. Try a different USB port, then see if amixer -c1 shows a more normal volume range.

ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

Re: Webcam Audio Not Recorded Properly

Post by ismail783 »

Code: Select all

$ amixer -c1
Simple mixer control 'Mic',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 2
  Mono: Capture 1 [50%] [40.00dB] [on]
Just to give you a heads-up, this is a non-brand webcam.

ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

Re: Webcam Audio Not Recorded Properly

Post by ismail783 »

One usb port for both sound and video.

User avatar
MrEen
Level 20
Level 20
Posts: 11571
Joined: Mon Jun 12, 2017 8:39 pm

Re: Webcam Audio Not Recorded Properly

Post by MrEen »

Okay, you have some real weirdness going on with that volume. Presumably, 0=0dB, yet 2=50dB and 1=40dB. That just ain't right. Let me look for something to try. I hope to find something soon, but I need to head to bed soon, so it might not be until tomorrow that I have anything to try.

ismail783
Level 2
Level 2
Posts: 59
Joined: Tue Jul 10, 2018 10:34 am

Re: Webcam Audio Not Recorded Properly

Post by ismail783 »

That is ok sir. Will In-Shah-Allah check back tomorrow as I am having some issues with this forum as well.
Last edited by ismail783 on Tue Jun 30, 2020 9:31 am, edited 1 time in total.

User avatar
MrEen
Level 20
Level 20
Posts: 11571
Joined: Mon Jun 12, 2017 8:39 pm

Re: Webcam Audio Not Recorded Properly

Post by MrEen »

One thing I should have asked for. Start recording with the mic, and while recording, run pacmd list-sources in the terminal and paste that output.

I'll check the output tomorrow and see if that spurs any ideas as well.

Post Reply

Return to “Newbie Questions”