[MEncoder-users] Using "-pan" for channel mixing
Corey Hickey
bugfood-ml at fatooh.org
Tue Nov 27 06:52:51 CET 2007
Tobias Brockamp wrote:
> Am 24.11.2007 um 21:57 schrieb Jan Knutar:
>
>> On Saturday 24 November 2007 20:11, Tobias Brockamp wrote:
>>
>>> Anybody an idea how get out these "klicks"?
>> Reduce the total amount of volume, either by volume filter before
>> pan or
>> by lowering the coefficients you feed to pan...
>
> Hmm, but the volume isn't not so high.
You're using:
-af pan=2:1:0:0:1:1:0:0:1:0.5:0.5:1:1
..which is kind of a bare-bones, simple downmix. You could try lowering
the LFE volume:
-af pan=2:1:0:0:1:1:0:0:1:0.5:0.5:0.5:0.5
...or further:
-af pan=2:1:0:0:1:1:0:0:1:0.5:0.5:0.1:0.1
Beyond that, all I can say is that you're combining the sound output of
several channels and trying to make them fit in the volume range of a
single channel. In the first downmix listed above:
output_left = front_left + rear_left + center/2 + LFE
Let's say the possible range of audio sample values is from -1 to 1, and
plug in some sample numbers:
1.6 = 0.7 + 0.4 + 0.6/2 + 0.2
As you can see, the output value is far out of range, even though the
input values aren't all particularly high.
Note that you can use -af pan=<whatever>,volume" to clip out-of-range
values without altering the output volume (when possible). Clipping
makes sound sound bad, though, so only use it as a last resort or if
only a small percentage of audio samples are expected to be out of range.
-Corey
More information about the MEncoder-users
mailing list