From 4f581a781bc1c0f82bc4a145b9ea808466aff657 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 4 Dec 2013 22:07:08 +0100 Subject: af_channels: change options, fix bugs, use option parser Apparently this stopped working after some planar changes (broken format negotiation). Radically change option parsing in an incompatible way. Suggest alternatives to this filter, since it barely has any importance anymore. --- DOCS/man/en/af.rst | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/en/af.rst b/DOCS/man/en/af.rst index 34b54eb6c8..bb7f34cf62 100644 --- a/DOCS/man/en/af.rst +++ b/DOCS/man/en/af.rst @@ -184,7 +184,7 @@ Available filters are: Would amplify the sound in the upper and lower frequency region while canceling it almost completely around 1kHz. -``channels=nch[:nr:from1:to1:from2:to2:from3:to3:...]`` +``channels=nch[:routes]`` Can be used for adding, removing, routing and copying audio channels. If only ```` is given, the default routing is used. It works as follows: If the number of output channels is greater than the number of input @@ -195,26 +195,33 @@ Available filters are: ```` number of output channels (1-8) - ```` - number of routes (1-8) - ```` - Pairs of numbers between 0 and 7 that define where to route each - channel. + ```` + List of ``,`` separated routes, in the form ``from1-to1,from2-to2,...``. + Each pair defines where to route each channel. There can be at most + 8 routes. Without this argument, the default routing is used. Since + ``,`` is also used to separate filters, you must quote this argument + with ``[...]`` or similar. .. admonition:: Examples - ``mpv --af=channels=4:4:0:1:1:0:2:2:3:3 media.avi`` + ``mpv --af=channels=4:[0-1,1-0,0-2,1-3] media.avi`` Would change the number of channels to 4 and set up 4 routes that swap channel 0 and channel 1 and leave channel 2 and 3 intact. Observe that if media containing two channels were played back, channels 2 and 3 would contain silence but 0 and 1 would still be swapped. - ``mpv --af=channels=6:4:0:0:0:1:0:2:0:3 media.avi`` + ``mpv --af=channels=6:[0-0,0-1,0-2,0-3] media.avi`` Would change the number of channels to 6 and set up 4 routes that copy channel 0 to channels 0 to 3. Channel 4 and 5 will contain silence. + .. note:: + + You should probably not use this filter. If you want to change the + output channel layout, try the ``format`` filter, which can make mpv + automatically up- and downmix standard channel layouts. + ``format=format:srate:channels:out-format:out-srate:out-channels`` Force a specific audio format/configuration without actually changing the audio data. Keep in mind that the filter system might auto-insert actual -- cgit v1.2.3