Watch on

see also


The description in the official documentation:

This filter enhance the stereo effect by suppressing signal common to both channels and by delaying the signal of left into right and vice versa, thereby widening the stereo effect.

Each segment of the uploaded video was created with the following script:

#! /bin/sh
ffmpeg -hide_banner -y -filter_complex "
, stereowiden=delay=100:drymix=1.0:crossfeed=0.8:feedback=0.9
, aformat=sample_fmts=u8|s16:channel_layouts=stereo
, asplit=3[out1][a1][a2];
, format=yuv420p
, scale=1280:720
[out0]" -map '[out0]' -map '[out1]' out.mp4

Reading the source code (af_stereowiden.c) may be a quick way to understand what this filter does, as did extrastereo. This is because the processing result of this filter is relatively moderate, and it cannot be said that it is easy to identify what has been brought about:

for (n = 0; n < in->nb_samples; n++, src += 2, dst += 2, s->cur += 2) {
    const float left = src[0], right = src[1];

    if (s->cur == s->buffer + s->length)
        s->cur = s->buffer;

    dst[0] = drymix * left - crossfeed * right - feedback * s->cur[1];
    dst[1] = drymix * right - crossfeed * left - feedback * s->cur[0];

    s->cur[0] = left;
    s->cur[1] = right;

So, the following will keep the input regardless of the value of delay:

[me@host: ~]$ ffplay snd.wav -af "stereowiden=delay=100:drymix=1.0:crossfeed=0:feedback=0"

And also, in the following example, delay does not make sense.:

[me@host: ~]$ ffplay snd.wav -af "stereowiden=delay=100:drymix=1.0:crossfeed=0.8:feedback=0"

(Note that delay must be in range [1, 100].)

see also

crossfeed, bs2b, extrastereo