You are not logged in.

#1 2018-04-06 08:38:32

Ebe
Member
Registered: 2017-11-16
Posts: 23

Completely distorted sound in video while just audio sounds fine

The audio in VLC and the browsers work fine but the video sounds either distorted with low volume or as if the sound is coming from underwater. This problem exists with both VLC video playback and browsers  (Firefox and GNOME Web Browser).
The sound test in the audio works fine (although my headset, Apple Earpod, plays only mono instead of stereo for some reason).

I have been trying to find a solution for this for over a week now but with no progress.

These are the packages I have installed to try to solve the problem.

sudo pacman -S alsa-utils
sudo pacman -S gst-plugins-{bad,good,ugly,base} ffmpeg libdvdcss
sudo pacman -S gst-libav streamer

I also tried fidgeting with the alsamixer but still no change

This is the output of aplay - L

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default
    Default ALSA Output (currently PulseAudio Sound Server)
sysdefault:CARD=PCH
    HDA Intel PCH, ALC662 rev1 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output

May I know how to get the audio working properly with video?

Offline

#2 2018-04-06 08:45:10

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: Completely distorted sound in video while just audio sounds fine

Terminal output of affected applications? Input file formats? What kind of hardware are we talking here? What hardware usage are we talking here? Simply from the symptoms it sounds like your hardware hits it's limit doing both and starts to choke out stuttery audio.

Alternatively wrong sample rate specifications and a low level resampler is applied and the video/audio distinction is just a coincidence.

What's the output of

pacmd list-sinks
pacmd list-sink-inputs

during the stutter and the nonstutter situation

Last edited by V1del (2018-04-06 08:48:20)

Offline

#3 2018-04-06 09:20:20

Ebe
Member
Registered: 2017-11-16
Posts: 23

Re: Completely distorted sound in video while just audio sounds fine

This is the output during the distorted sound while listening to the video.

$ pacmd list-sinks
1 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: 
	priority: 9039
	volume: front-left: 53315 /  81% / -5.38 dB,   front-right: 53315 /  81% / -5.38 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 22.64 ms
	max request: 4 KiB
	max rewind: 344 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 2
	configured latency: 25.01 ms; range is 0.50 .. 2000.00 ms
	card: 1 <alsa_card.pci-0000_00_1b.0>
	module: 7
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC662 rev1 Analog"
		alsa.id = "ALC662 rev1 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xfb120000 irq 30"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "1c20"
		device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "352800"
		device.buffering.fragment_size = "176400"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "Built-in Audio Analog Stereo"
		alsa.mixer_name = "Realtek ALC662 rev1"
		alsa.components = "HDA:10ec0662,1025c000,00100101"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: no)
			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: yes)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-headphones>
$ pacmd list-sink-inputs
2 sink input(s) available.
    index: 420
	driver: <protocol-native.c>
	flags: START_CORKED 
	state: CORKED
	sink: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo>
	volume: front-left: 47635 /  73% / -8.31 dB,   front-right: 47635 /  73% / -8.31 dB
	        balance 0.00
	muted: no
	current latency: 0.00 ms
	requested latency: 90.00 ms
	sample spec: float32le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: copy
	module: 12
	client: 57 <WebKitWebProcess>
	properties:
		media.name = "Playback Stream"
		application.name = "WebKitWebProcess"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		application.process.id = "17052"
		application.process.user = "ebe"
		application.process.host = "ADFX-03"
		application.process.binary = "WebKitWebProcess"
		application.language = "en_US.UTF-8"
		window.x11.display = ":1"
		application.process.machine_id = "460c02aae1084e789c3810d8dbdc0b16"
		application.process.session_id = "c4"
		module-stream-restore.id = "sink-input-by-application-name:WebKitWebProcess"
		media.language = "en"
    index: 426
	driver: <protocol-native.c>
	flags: START_CORKED 
	state: RUNNING
	sink: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo>
	volume: front-left: 0 /   0% / -inf dB,   front-right: 0 /   0% / -inf dB
	        balance 0.00
	muted: no
	current latency: 65.56 ms
	requested latency: 25.01 ms
	sample spec: float32le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: copy
	module: 12
	client: 32 <Firefox>
	properties:
		media.name = "AudioStream"
		application.name = "Firefox"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		application.process.id = "11146"
		application.process.user = "ebe"
		application.process.host = "ADFX-03"
		application.process.binary = "firefox"
		application.language = "en_US.UTF-8"
		window.x11.display = ":1"
		application.process.machine_id = "460c02aae1084e789c3810d8dbdc0b16"
		application.process.session_id = "c4"
		application.icon_name = "firefox"
		module-stream-restore.id = "sink-input-by-application-name:Firefox"

This is the output while I'm listening to an audio file in VLC

$ pacmd list-sinks
1 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: 
	priority: 9039
	volume: front-left: 26874 /  41% / -23.23 dB,   front-right: 26874 /  41% / -23.23 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 24.38 ms
	max request: 4 KiB
	max rewind: 344 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 2
	configured latency: 25.01 ms; range is 0.50 .. 2000.00 ms
	card: 1 <alsa_card.pci-0000_00_1b.0>
	module: 7
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC662 rev1 Analog"
		alsa.id = "ALC662 rev1 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xfb120000 irq 30"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "1c20"
		device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "352800"
		device.buffering.fragment_size = "176400"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "Built-in Audio Analog Stereo"
		alsa.mixer_name = "Realtek ALC662 rev1"
		alsa.components = "HDA:10ec0662,1025c000,00100101"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: no)
			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: yes)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-headphones>
$ pacmd list-sink-inputs
2 sink input(s) available.
    index: 426
	driver: <protocol-native.c>
	flags: START_CORKED 
	state: CORKED
	sink: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo>
	volume: front-left: 0 /   0% / -inf dB,   front-right: 0 /   0% / -inf dB
	        balance 0.00
	muted: no
	current latency: 96.01 ms
	requested latency: 25.01 ms
	sample spec: float32le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: copy
	module: 12
	client: 32 <Firefox>
	properties:
		media.name = "AudioStream"
		application.name = "Firefox"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		application.process.id = "11146"
		application.process.user = "ebe"
		application.process.host = "ADFX-03"
		application.process.binary = "firefox"
		application.language = "en_US.UTF-8"
		window.x11.display = ":1"
		application.process.machine_id = "460c02aae1084e789c3810d8dbdc0b16"
		application.process.session_id = "c4"
		application.icon_name = "firefox"
		module-stream-restore.id = "sink-input-by-application-name:Firefox"
    index: 429
	driver: <protocol-native.c>
	flags: START_CORKED FIX_RATE 
	state: RUNNING
	sink: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo>
	volume: front-left: 57016 /  87% / -3.63 dB,   front-right: 57016 /  87% / -3.63 dB
	        balance 0.00
	muted: no
	current latency: 481.38 ms
	requested latency: 40.00 ms
	sample spec: float32le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: copy
	module: 12
	client: 66 <VLC media player (LibVLC 3.0.1)>
	properties:
		media.role = "video"
		media.name = "audio stream"
		application.name = "VLC media player (LibVLC 3.0.1)"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		application.id = "org.VideoLAN.VLC"
		application.version = "3.0.1"
		application.icon_name = "vlc"
		application.language = "en_US.UTF-8"
		application.process.id = "22344"
		application.process.user = "ebe"
		application.process.host = "ADFX-03"
		application.process.binary = "vlc"
		window.x11.display = ":1"
		application.process.machine_id = "460c02aae1084e789c3810d8dbdc0b16"
		application.process.session_id = "c4"
		module-stream-restore.id = "sink-input-by-media-role:video"

Offline

#4 2018-04-06 11:15:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: Completely distorted sound in video while just audio sounds fine

What are those infinity db streams? Do you have some weird firefox addon that tries to play back audio (or another program based on firefox, ie some download manager or similar)? A website with a rampant chatclient or similar generating tons of short audio events? Your actual playback stream is being corked and I suspect this is happening rapidly (hence your audio is being unmuted/muted quickly to lead to the distortion you hear)

A band aid remedy could be to comment out

load-module module-role-cork
load-module module-role-ducking

in your /etc/pulse/default.pa

And restarting pulse

systemctl --user restart pulseaudio

However you should figure the root cause of what is creating these rampant firefox streams

Last edited by V1del (2018-04-06 11:26:11)

Offline

#5 2018-04-06 11:24:55

Ebe
Member
Registered: 2017-11-16
Posts: 23

Re: Completely distorted sound in video while just audio sounds fine

I commented out the line with cork but cannot find the line with ducking in my default.pa file.

The problem is not only with browsers (including firefox) but also with videos outside browsers. I played the same video downloaded and played on a VLC player and tried the same distortion and lack of volume occurs.
However, the pure audio files play well in both browser and VLC. Strange.

Offline

#6 2018-04-06 11:28:49

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: Completely distorted sound in video while just audio sounds fine

If this still remains the case even with those adjustments, what about the other things I mentioned? How does the hardware load look like? Do you get any information in the terminal from running an application there, does the journal log anything?

Wait you are the same guy with the crashing Xorg and the like, seriously post your journal and or run a memcheck. Your hardware doesn't sound healthy, looking at the states of your 2 threads

Last edited by V1del (2018-04-06 11:35:31)

Offline

#7 2018-04-06 11:38:49

Ebe
Member
Registered: 2017-11-16
Posts: 23

Re: Completely distorted sound in video while just audio sounds fine

Thank you for your support, Videl smile. I'll have to leave my lab now and will be only back on this node on Thursday. I'll have to try out the memtest and sort out the audio bugs then.

Last edited by Ebe (2018-04-06 11:39:10)

Offline

#8 2018-04-13 04:10:18

Ebe
Member
Registered: 2017-11-16
Posts: 23

Re: Completely distorted sound in video while just audio sounds fine

Hello, Videl, are you there? I'm back on the node now with the same problems smile.

I'm running a memory test for my RAM, is there anything I could do to fix the audio (in video)?

Offline

Board footer

Powered by FluxBB