From 6d4b4c0de3152bc2deb2df09ec3e98e032124593 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Jan 2018 04:02:55 +0100 Subject: audio: add global options for resampler defaults This is part of trying to get rid of --af-defaults, and the af resample filter. It requires a complicated mechanism to set the defaults on the resample filter for backwards compatibility. --- DOCS/interface-changes.rst | 2 ++ DOCS/man/options.rst | 48 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 40 insertions(+), 10 deletions(-) (limited to 'DOCS') diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 7960ea95ec..7be73e8783 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -25,6 +25,8 @@ Interface changes - fix --external-files: strictly never select any tracks from them, unless explicitly selected (this may or may not be expected) - --ytdl is now always enabled, even for libmpv + - add a number of --audio-resample-* options, which should from now on be + used instead of --af-defaults=lavrresample:... --- mpv 0.28.0 --- - rename --hwdec=mediacodec option to mediacodec-copy, to reflect conventions followed by other hardware video decoding APIs diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 2f7baf92ff..44f4b5ae1d 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -1441,16 +1441,6 @@ Audio want. For example, most A/V receivers connected via HDMI and that can do 7.1 would be served by: ``--audio-channels=7.1,5.1,stereo`` -``--audio-normalize-downmix=`` - Enable/disable normalization if surround audio is downmixed to stereo - (default: no). If this is disabled, downmix can cause clipping. If it's - enabled, the output might be too silent. It depends on the source audio. - - Technically, this changes the ``normalize`` suboption of the - ``lavrresample`` audio filter, which performs the downmixing. - - If downmix happens outside of mpv for some reason, this has no effect. - ``--audio-display=`` Setting this option to ``attachment`` (default) will display image attachments (e.g. album cover art) when playing audio files. It will @@ -3453,6 +3443,44 @@ Software Scaler ``--sws-cvs=`` Software scaler chroma vertical shifting. See ``--sws-scaler``. +Audio Resampler +--------------- + +This controls the default options of any resampling done by mpv (but not within +libavfilter, within the system audio API resampler, or any other places). + +It also sets the defaults for the ``lavrresample`` audio filter. + +``--audio-resample-filter-size=`` + Length of the filter with respect to the lower sampling rate. (default: + 16) + +``--audio-resample-phase-shift=`` + Log2 of the number of polyphase entries. (..., 10->1024, 11->2048, + 12->4096, ...) (default: 10->1024) + +``--audio-resample-cutoff=`` + Cutoff frequency (0.0-1.0), default set depending upon filter length. + +``--audio-resample-linear=`` + If set then filters will be linearly interpolated between polyphase + entries. (default: no) + +``--audio-normalize-downmix=`` + Enable/disable normalization if surround audio is downmixed to stereo + (default: no). If this is disabled, downmix can cause clipping. If it's + enabled, the output might be too quiet. It depends on the source audio. + + Technically, this changes the ``normalize`` suboption of the + ``lavrresample`` audio filter, which performs the downmixing. + + If downmix happens outside of mpv for some reason, or in the decoder + (decoder downmixing), or in the audio output (system mixer), this has no + effect. + +``--audio-swresample-o=`` + Set AVOptions on the SwrContext or AVAudioResampleContext. These should + be documented by FFmpeg or Libav. Terminal -------- -- cgit v1.2.3