Ticket #400 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

front-center should not be remixed into rear channels.

Reported by: Cimi Owned by: lennart
Milestone: 0.9.14 Component: daemon
Keywords: Cc: andrea.cimitan@…

Description

I've 4 speakers, 2 fronts 2 rears. I've configured pulseaudio to use 4 channels, but when it streams the center channel of an Ac3 video this channel is played by every channel (even the rear channels).

I guess this is a bug related to some downmixing, pulseaudio 0.9.10 from ubuntu Hardy.

May I ask for a temporary workaround? (maybe using default.pa)

Change History

  Changed 3 years ago by Cimi

I forgot to say that both mplayer and xine downmix the center channel (and the LFE, which I forgot to say it is downmixed to every speaker with PA) to the front speakers

  Changed 3 years ago by Cimi

  • cc andrea.cimitan@… added

  Changed 3 years ago by Cimi

Same problem with intrepid, so it's a bug even on an updated pulseaudio version

  Changed 3 years ago by lennart

Are you streaming *only* the center channel? Then yes, we do upstreaming, because you have 4 output channels and only one input channel.

Run pulseaudio with "-vvvv" in a terminal, it will then show you the mixing matrix for each stream you create when you create it. It should show you whether PA does the upmixing for you. (You might need to stop the running PA first by issuing "pulseaudio -k" first.

follow-up: ↓ 6   Changed 3 years ago by Cimi

I'm using this: http://www.tfm.ro/ac3/download/test_ac3.rar

Center and LFE are reproduced in every speaker, while mplayer reproduces the center with the two front speakers

in reply to: ↑ 5   Changed 3 years ago by lennart

Replying to Cimi:

Center and LFE are reproduced in every speaker, while mplayer reproduces the center with the two front speakers

Sorry, I don't follow?

Could you please do the pulseaudio -vvvv thing I mentioned? It will explain in detail how we do remixing.

Also note that MPlayer doesn't really expot channel mapping information to its backends. The channel mapping the PA backend synthesizes for the audio streammight not match up what the sound file you have exports. This is a limitation of MPlayer.

Use GStreamer. The GStreamer driver knows about channel mappings.

follow-up: ↓ 8   Changed 3 years ago by Cimi

If you reproduce that file you'll see what is center (this is an avi file that does something similar to speaker-test)

in reply to: ↑ 7   Changed 3 years ago by lennart

Replying to Cimi:

If you reproduce that file you'll see what is center (this is an avi file that does something similar to speaker-test)

I still don't follow.

As mentioned, can you pleas dump the channel remxing matrix with -vvv?

Also as mentioned, have you tried with GStreamer?

  Changed 3 years ago by Cimi

pulseaudio -vvvv: http://pastebin.com/f70445478

I was saying that mplayer/xine + ALSA (no pulseaudio) is working correctly, so reproducing that video the center channel (as said this video is an ac3 video test) is reproduced by the front channels. In a movie the center channel is used for dialogs/speakings, it shouldn't be reproduced by every speaker.

  Changed 3 years ago by Cimi

I realised my english was confusing :)

Play that video (which is an AC3 video test) with gstreamer: front-left, front-right, rear-left, rear-right are reproduced by one correct speaker (I have a 4.0 setup), while center and LFE are reproduced by the 4 speaker simultaneously.

Playing that video with mplayer or xine using alsa output works as it should, where the center channel of the AC3 stream is correctly reproduced by the two front speakers.

  Changed 3 years ago by lennart

This is the interesting part:

D: resampler.c:        I00   I01   I02   I03   I04   I05
D: resampler.c:     +------------------------------------
D: resampler.c: O00 | 0,375 0,750 0,375 0,000 0,000 0,000
D: resampler.c: O01 | 0,375 0,000 0,375 0,750 0,000 0,000
D: resampler.c: O02 | 0,375 0,000 0,375 0,000 0,750 0,000
D: resampler.c: O03 | 0,375 0,000 0,375 0,000 0,000 0,750

This shows the input channels (i.e the one of your stream) and the output channels (the one of your device) and the multiplication factors for the input channels to get to the summed output samples.

We also see the channel mapping that was specified for your stream: lfe,front-left,front-center,front-right,rear-left,rear-right

And your device is surround40:0 which is the mapping front-left,front-right,rear-left,rear-right.

The problem I see here is that front-center is mixed into the rear channels. Is that the problem you were trying to point out?

follow-up: ↓ 13   Changed 3 years ago by Cimi

Yes. front-center should be reproduced simultaneously by front-right/left.

I'm not sure about LFE (subwoofer), it is still reproduced by every channel, what do you think about LFE? Shall it be reproduced by front channels as front-center or it's good to reproduce it from every channel on a 4.0 setup?

in reply to: ↑ 12 ; follow-up: ↓ 14   Changed 3 years ago by lennart

  • summary changed from Pulseaudio is downmixing channels to every speaker (using 4 channels) to front-center should not be remixed into rear channels.

Replying to Cimi:

I'm not sure about LFE (subwoofer), it is still reproduced by every channel, what do you think about LFE? Shall it be reproduced by front channels as front-center or it's good to reproduce it from every channel on a 4.0 setup?

Low frequencies cannot be located by the human brain. It is thus not relevant where they are reproduced.

In 0.9.13 LFE is not remixed at all unless explicitly enabled in the configuration. A lot of hardware synthesizes LFE anyway, so synthesizing it or mixing it into already existing channels is redundant and might cause unrealistic emphasizing of basses.

in reply to: ↑ 13   Changed 3 years ago by Cimi

Replying to lennart:

Replying to Cimi:

I'm not sure about LFE (subwoofer), it is still reproduced by every channel, what do you think about LFE? Shall it be reproduced by front channels as front-center or it's good to reproduce it from every channel on a 4.0 setup?

Low frequencies cannot be located by the human brain. It is thus not relevant where they are reproduced. In 0.9.13 LFE is not remixed at all unless explicitly enabled in the configuration. A lot of hardware synthesizes LFE anyway, so synthesizing it or mixing it into already existing channels is redundant and might cause unrealistic emphasizing of basses.

I know they are not located by the human brain (my father own a professional recording studio and worked for years as a sound technician), but the problem I'm thinking about is different: On a lot of setups the rear speakers are used to be smaller than the front speakers, so they have small woofers inside. For that reason I'm not sure the LFE channel should be reproduced by every speaker or just the front ones, or better to ignore that channel?

  Changed 3 years ago by lennart

As mentioned in 0.9.13 we don't synthesize LFE anymore, nor do we mix it into any other channel, unless explicitly enabled.

follow-up: ↓ 17   Changed 3 years ago by Cimi

Pulseaudio is also duplicating the stereo tracks in the rear channels, this should be disabled as well. Rear channels should not reproduce sounds if not from multichannel audio: stereo and mono tracks should be reproduced by the front speakers

in reply to: ↑ 16 ; follow-up: ↓ 18   Changed 3 years ago by lennart

Replying to Cimi:

Pulseaudio is also duplicating the stereo tracks in the rear channels, this should be disabled as well. Rear channels should not reproduce sounds if not from multichannel audio: stereo and mono tracks should be reproduced by the front speakers

Uh, this is a controversial discussion. If you don't want remixing, consider setting "disable-remixing = no" in daemon.conf.

in reply to: ↑ 17   Changed 3 years ago by Cimi

Replying to lennart:

Replying to Cimi:

Pulseaudio is also duplicating the stereo tracks in the rear channels, this should be disabled as well. Rear channels should not reproduce sounds if not from multichannel audio: stereo and mono tracks should be reproduced by the front speakers

Uh, this is a controversial discussion. If you don't want remixing, consider setting "disable-remixing = no" in daemon.conf.

But in that way I can't hear the front-center and the LFE!

follow-up: ↓ 20   Changed 3 years ago by lennart

Then please file a bug that asks for adding independant switches for enabling upmixing and downmixing. Because as I understood you only want downmixing, but no upmixing, right?

in reply to: ↑ 19   Changed 3 years ago by Cimi

Replying to lennart:

Then please file a bug that asks for adding independant switches for enabling upmixing and downmixing. Because as I understood you only want downmixing, but no upmixing, right?

http://www.pulseaudio.org/ticket/404

  Changed 3 years ago by lennart

  • milestone set to 0.9.14

  Changed 3 years ago by lennart

  • status changed from new to closed
  • resolution set to fixed

Fixed in r209a8d7.

Note: See TracTickets for help on using tickets.