From 249789c256ddffb6fc6eaf628b2653c195dcdac8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 10 Mar 2014 02:09:18 +0100 Subject: audio: make --channels option always force the output layout Use the --channels value directly on the AO, instead of doing it only in the --channels=stereo (default) case and if the decoder output is not stereo. --- DOCS/man/en/changes.rst | 1 + DOCS/man/en/options.rst | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst index 6aecc9b4f5..b7ded44e4a 100644 --- a/DOCS/man/en/changes.rst +++ b/DOCS/man/en/changes.rst @@ -179,6 +179,7 @@ Command Line Switches ``-panscanrange`` ``--video-zoom``, ``--video-pan-x/y`` ``-pp ...`` ``'--vf=pp=[...]'`` ``-pphelp`` ``--vf=pp:help`` + ``-channels`` ``--channels`` (changed semantics) ``dvdnav://`` ``dvdnav://menu`` =========================== ======================================== diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index fc8b778ac8..b08117aa0b 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -455,12 +455,10 @@ OPTIONS Specify the CD-ROM device (default: ``/dev/cdrom``). ``--channels=`` - Request the number of playback channels (default: 2). mpv asks the - decoder to decode the audio into as many channels as specified. Then it is - up to the decoder to fulfill the requirement. This is usually only - important when playing videos with AC-3, AAC or DTS audio. In that case - libavcodec downmixes the audio into the requested number of channels if - possible. + Request a channel layout for audio output (default: stereo). This will ask + the AO to open a device with the given channel layout. It's up to the AO + to accept this layout, or to pick a fallback or to error out if the + requested layout is not supported. The ``--channels`` option either takes a channel number or an explicit channel layout. Channel numbers refer to default layouts, e.g. 2 channels @@ -470,12 +468,17 @@ OPTIONS lists speaker names, which can be used to express arbitrary channel layouts (e.g. ``fl-fr-lfe`` is 2.1). - .. note:: + You can use ``--channels=empty`` to disable this. In this case, the AO + use the channel layout as the audio filter chain indicates. + + This will also request the channel layout from the decoder. If the decoder + does not support the layout, it will fall back to its native channel layout. + (You can use ``--ad-lavc-downmix=no`` to make the decoder always output + its native layout.) Note that only some decoders support remixing audio. + Some that do include AC-3, AAC or DTS audio. - Currently, this option is not very useful. The main effect of this - option is that automatic stereo downmixing is disabled. It depends - mainly on the selected audio output and the associated audio subsystem - how playback of files with surround audio will behave. + If the channel layout of the media file (i.e. the decoder) and the AO's + channel layout don't match, mpv will attempt to insert a conversion filter. ``--chapter=`` Specify which chapter to start playing at. Optionally specify which -- cgit v1.2.3