Page 1 of 1

VLC 2.0.0 downmixing to stereo

Posted: 19 Feb 2012 07:27
by T3slider
I upgraded to VLC 2.0.0 over 1.1.13, but now I cannot get VLC to output 5.1 audio (or anything more than stereo). In 1.1.13 (and earlier), selecting my surround51 device (or whatever it was labeled...cannot remember) correctly played 5.1, no problem. Now, selecting the equivalent 5.1 device (HDA ATI SB, ALC889A Analog 5.1 Surround output to Front, Center, Rear and Subwoofer speakers (surround51:CARD=SB,DEV=0)) has seemingly no effect at all, either when changing to it explicitly from the default stereo or selecting it as the default device in VLC's preferences. I've tried playing regular video files with 5.1 audio and a 5.1 audio test file, but I get stereo only (which is spread over all speakers, rear included -- left side audio plays on left front&rear and centre, similarly for right). mplayer still outputs 6 channels when specifying surround51 as the device, and ALSA's speaker test works fine as well. I'll share some debugging output when running with `vlc -vvv`:

Code: Select all

[0x8c3978] alsa audio output debug: using ALSA device: surround51 [0x8c3978] alsa audio output debug: Hardware PCM card 0 'HDA ATI SB' device 0 subdevice 0 [0x8c3978] alsa audio output debug: device name : ALC889A Analog [0x8c3978] alsa audio output debug: device ID : ALC889A Analog [0x8c3978] alsa audio output debug: subdevice name: subdevice #0 [0x8c3978] alsa audio output debug: initial hardware setup: ACCESS: MMAP_INTERLEAVED RW_INTERLEAVED FORMAT: S16_LE S32_LE SUBFORMAT: STD SAMPLE_BITS: [16 32] FRAME_BITS: [32 256] CHANNELS: [2 8] RATE: [44100 192000] PERIOD_TIME: (20 185760) PERIOD_SIZE: [4 8192] PERIOD_BYTES: [128 262144] PERIODS: [2 32] BUFFER_TIME: (41 371520) BUFFER_SIZE: [8 16384] BUFFER_BYTES: [128 65536] TICK_TIME: ALL [0x8c3978] alsa audio output debug: remixing from 6 to 2 channels [0x8c3978] alsa audio output debug: final HW setup: ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 32 CHANNELS: 2 RATE: 48000 PERIOD_TIME: (170666 170667) PERIOD_SIZE: 8192 PERIOD_BYTES: 32768 PERIODS: 2 BUFFER_TIME: (341333 341334) BUFFER_SIZE: 16384 BUFFER_BYTES: 65536 TICK_TIME: 0 [0x8c3978] alsa audio output debug: initial software parameters: tstamp_mode: NONE period_step: 1 avail_min: 8192 start_threshold: 1 stop_threshold: 16384 silence_threshold: 0 silence_size: 0 boundary: 4611686018427387904 [0x8c3978] alsa audio output debug: final software parameters: tstamp_mode: NONE period_step: 1 avail_min: 8192 start_threshold: 1 stop_threshold: 16384 silence_threshold: 0 silence_size: 0 boundary: 4611686018427387904 [0x8c3978] alsa audio output debug: Available ALSA PCM devices: [0x8c3978] alsa audio output debug: Discard all samples (playback) or generate zero samples (capture) (null) [0x8c3978] alsa audio output debug: HDA ATI SB, ALC889A Analog Default Audio Device (default:CARD=SB) [0x8c3978] alsa audio output debug: HDA ATI SB, ALC889A Analog Front speakers (front:CARD=SB,DEV=0) [0x8c3978] alsa audio output debug: HDA ATI SB, ALC889A Analog 4.0 Surround output to Front and Rear speakers (surround40:CARD=SB,DEV=0) [0x8c3978] alsa audio output debug: HDA ATI SB, ALC889A Analog 4.1 Surround output to Front, Rear and Subwoofer speakers (surround41:CARD=SB,DEV=0) [0x8c3978] alsa audio output debug: HDA ATI SB, ALC889A Analog 5.0 Surround output to Front, Center and Rear speakers (surround50:CARD=SB,DEV=0) [0x8c3978] alsa audio output debug: HDA ATI SB, ALC889A Analog 5.1 Surround output to Front, Center, Rear and Subwoofer speakers (surround51:CARD=SB,DEV=0) [0x8c3978] alsa audio output debug: HDA ATI SB, ALC889A Analog 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers (surround71:CARD=SB,DEV=0) [0x8c3978] alsa audio output debug: HDA ATI SB, ALC889A Digital IEC958 (S/PDIF) Digital Audio Output (iec958:CARD=SB,DEV=0) [0x8c3978] main audio output debug: using audio output module "alsa" [0x8c3978] main audio output debug: TIMER module_need() : 7.785 ms - Total 7.785 ms / 1 intvls (Avg 7.785 ms) [0x8c3978] main audio output debug: output 's16l' 48000 Hz Stereo frame=1 samples/4 bytes [0x8c3978] main audio output debug: mixer 'f32l' 48000 Hz Stereo frame=1 samples/8 bytes [0x8c3978] main audio output debug: filter(s) 'f32l'->'s16l' 48000 Hz->48000 Hz Stereo->Stereo [0x8a7a08] main audio filter debug: looking for audio filter module: 14 candidates [0x8a7a08] audio_format audio filter debug: f32l->s16l, bits per sample: 32->16 [0x8a7a08] main audio filter debug: using audio filter module "audio_format" [0x8a7a08] main audio filter debug: TIMER module_need() : 1.057 ms - Total 1.057 ms / 1 intvls (Avg 1.057 ms) [0x8c3978] main audio output debug: conversion pipeline completed [0x909888] main mixer debug: looking for audio mixer module: 2 candidates [0x909888] main mixer debug: using audio mixer module "float32_mixer" [0x909888] main mixer debug: TIMER module_need() : 0.151 ms - Total 0.151 ms / 1 intvls (Avg 0.151 ms) [0x8c3978] main audio output debug: input 's16l' 48000 Hz 3F2R/LFE frame=1 samples/12 bytes [0x87f798] main audio filter debug: looking for audio filter module: 1 candidate [0x87f798] scaletempo audio filter debug: format: 48000 rate, 2 nch, 4 bps, fl32 [0x87f798] scaletempo audio filter debug: params: 30 stride, 0.200 overlap, 14 search [0x87f798] scaletempo audio filter debug: 1.000 scale, 1440.000 stride_in, 1440 stride_out, 1152 standing, 288 overlap, 672 search, 2400 queue, fl32 mode [0x87f798] main audio filter debug: using audio filter module "scaletempo" [0x87f798] main audio filter debug: TIMER module_need() : 0.175 ms - Total 0.175 ms / 1 intvls (Avg 0.175 ms) [0x8c3978] main audio output debug: filter(s) 's16l'->'f32l' 48000 Hz->48000 Hz 3F2R/LFE->Stereo [0x901938] main audio filter debug: looking for audio filter module: 14 candidates [0x901938] main audio filter debug: no audio filter module matching "any" could be loaded [0x901938] main audio filter debug: TIMER module_need() : 0.137 ms - Total 0.137 ms / 1 intvls (Avg 0.137 ms) [0x901938] main audio filter debug: looking for audio filter module: 14 candidates [0x901938] main audio filter debug: using audio filter module "simple_channel_mixer" [0x901938] main audio filter debug: TIMER module_need() : 0.093 ms - Total 0.093 ms / 1 intvls (Avg 0.093 ms) [0x8fec58] main audio filter debug: looking for audio filter module: 14 candidates [0x8fec58] audio_format audio filter debug: s16l->f32l, bits per sample: 16->32 [0x8fec58] main audio filter debug: using audio filter module "audio_format" [0x8fec58] main audio filter debug: TIMER module_need() : 0.060 ms - Total 0.060 ms / 1 intvls (Avg 0.060 ms) [0x8c3978] main audio output debug: conversion pipeline completed [0x8c3978] main audio output debug: filter(s) 'f32l'->'f32l' 48000 Hz->48000 Hz Stereo->Stereo [0x8c3978] main audio output debug: conversion pipeline completed [0x8c3978] main audio output debug: filter(s) 'f32l'->'f32l' 52800 Hz->48000 Hz Stereo->Stereo [0x776ff8] main audio filter debug: looking for audio filter module: 14 candidates [0x776ff8] main audio filter debug: using audio filter module "samplerate" [0x776ff8] main audio filter debug: TIMER module_need() : 0.217 ms - Total 0.217 ms / 1 intvls (Avg 0.217 ms) [0x8c3978] main audio output debug: conversion pipeline completed [0x8a4788] main decoder debug: End of audio preroll
Note the "remixing from 6 to 2 channels" line, which turns up absolutely nothing useful on Google (or here). I'm on Slackware 13.37 using AlienBob's package. I have had no trouble with his statically linked pre-2.0 packages. In retrospect I should have saved a copy of his older package in case something went wrong...I just didn't expect any trouble with VLC.

I'd appreciate any help and would of course provide any more information that may be needed.

Re: VLC 2.0.0 downmixing to stereo

Posted: 23 Feb 2012 07:58
by T3slider
I compiled VLC 1.1.13 using the same build script that was used for the 2.0.0 package and 5.1 audio is working again. I don't know what's wrong with the ALSA output with VLC 2.0.0 on my system, but since I have a working (albeit now outdated) VLC package I suppose all is well for now. I have to assume this is a bug (especially since the ALSA stuff was reworked between 1.1.13 and 2.0.0) but either I'm the only one with this problem, I'm the only one using 5.1 analog audio, not enough people have upgraded to 2.0.0 to notice, or no one else has bothered to chime in.

Re: VLC 2.0.0 downmixing to stereo

Posted: 23 Feb 2012 12:14
by cth
same problem here. 5.1 isnt working and spdif neither. when i start a52 files with --spdif it gives me this:

[0x7f9354000958] main audio output error: conversion pipeline failed: a52 -> a52
[0x7f9354000958] main audio output error: cannot setup filtering pipeline
[0x7f936ceba3f8] main decoder error: failed to create audio output

or with dts files:

[0x7f4384000958] main audio output error: conversion pipeline failed: dts -> dts
[0x7f4384000958] main audio output error: cannot setup filtering pipeline
[0x7f43b0c10208] main decoder error: failed to create audio output

but when i change to "creative x-fi, iec958 non-audio iec958 (s/pdif) digital audio output" manually, spdif works but still only stereo output.

i have arch64 and i also had no problems pre vlc 2.0.
help would be appreciated.

thanks in advance.

Re: VLC 2.0.0 downmixing to stereo

Posted: 28 Feb 2012 19:31
by Rémi Denis-Courmont
Unfortunately ALSA is really --please stay polite-- up. Here the logs show that your "surround51" cards will accept any number of channels from 2 to 8. This makes no sense; it should obviously only accept 6 channels. In fact, it works fine for me (surround51 only accept 6 channels here). I don't know if it's a bug in ALSA for your audio card, or a just a bug in VLC.

VLC tries to second guess ALSA: Where stereo is accepted, it assumes that stereo is wanted. That is historical: most cards are wired with stereo speakers.

The simplest solution is yet to use PulseAudio, that does not suffer from ALSA's design deficiencies.

Re: VLC 2.0.0 downmixing to stereo

Posted: 03 Mar 2012 19:57
by Rémi Denis-Courmont
This is fixed in VLC 2.0.1. You can now configure the VLC/ALSA plugin explicitly to 5.1. Also S/PDIF should be fixed.

Re: VLC 2.0.0 downmixing to stereo

Posted: 17 Mar 2012 21:03
by T3slider
Sorry for taking so long to respond. I just tried VLC 2.0.1 and it seems to work perfectly (after explicitly setting the channels in the preferences). I really appreciate your efforts to supply a workaround even if it was an ALSA-derived problem.

Thanks!

Re: VLC 2.0.0 downmixing to stereo

Posted: 06 Sep 2012 15:37
by Berniyh
Hi, I'm suffering from the same problem (or at least one that is related), and for me, it is not fixed. The version I'm using is VLC 2.0.3.

In my audio setup, the DD5.1 receiver is connected to the digital output of the sound card and I use it both for stereo (music, moviez, etc.) and for 5.1 sound (in movies), for which I have to use the passthrough.
This worked perfectly for vlc, I could select the digital audio output for audio passthrough in case I need it and keep stereo otherwise. Since vlc 2.0.0, this changed and does not work anymore.

I can still use the passthrough, when I select the option "Use S/PDIF when available", but only once. With that I mean, that it works fine when I first start a movie, but switching to another audio channel or another device will just result in no sound output at all. It is also very inflexible, since I don't want to use the S/PDIF in every possible case.
When not using this option, I don't get S/PDIF passthrough at all anymore, just stereo, in all cases. If I force the alsa detection to 5.1, then I don't get sound at all (and this would be the wrong thing for me anyway).

I don't really know what changed between vlc-1.1.11 and vlc-2.0.0, where it worked perfectly with the former and does not work at all with the latter.

Re: VLC 2.0.0 downmixing to stereo

Posted: 06 Sep 2012 18:31
by kmf31