From bc268b313e3764ff192f9adb28c5735a6241224a Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 28 Mar 2013 22:35:54 +0100 Subject: audio: remove float processing option The only thing this option did was changing the behavior of af_volume. The option decided what sample format af_volume would use, but only if the sample format was not already float. If the option was set, it would default to float, otherwise to S16. Remove use of the option and all associated code, and make af_volume always use float (unless a af_volume specific sub-option is set). Silence maximum value tracking. This message is printed when the filter is destroyed, and it's slightly annoying. Was enabled due to enabling float by default. --- DOCS/man/en/af.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'DOCS/man/en') diff --git a/DOCS/man/en/af.rst b/DOCS/man/en/af.rst index 2eaeabed0c..759476a1c7 100644 --- a/DOCS/man/en/af.rst +++ b/DOCS/man/en/af.rst @@ -219,7 +219,7 @@ format[=format] rule that are also valid format specifiers: u8, s8, floatle, floatbe, floatne, mpeg2, and ac3. -volume[=v[:sc]] +volume[=v[:sc[:fast]]] Implements software volume control. Use this filter with caution since it can reduce the signal to noise ratio of the sound. In most cases it is best to set the level for the PCM sound to max, leave this filter out and @@ -250,6 +250,9 @@ volume[=v[:sc]] *WARNING*: This feature creates distortion and should be considered a last resort. + + Force S16 sample format if set to 1. Lower quality, but might be faster + in some situations. *EXAMPLE*: -- cgit v1.2.3 From abd5e8a2e774f20d78a901faac64fe74fdc7b040 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 28 Mar 2013 22:46:22 +0100 Subject: options: remove --af-adv Anything this option did has been removed in the preceding 3 commits. Note that even though these options sounded like a good idea (like setting accuracy vs. speed tradeoffs), they were not really properly implemented. --- DOCS/man/en/af.rst | 3 +-- DOCS/man/en/options.rst | 39 ++------------------------------------- 2 files changed, 3 insertions(+), 39 deletions(-) (limited to 'DOCS/man/en') diff --git a/DOCS/man/en/af.rst b/DOCS/man/en/af.rst index 759476a1c7..f3054e7255 100644 --- a/DOCS/man/en/af.rst +++ b/DOCS/man/en/af.rst @@ -233,8 +233,7 @@ volume[=v[:sc[:fast]]] This filter has a second feature: It measures the overall maximum sound level and prints out that level when mpv exits. This feature currently - only works with floating-point data, use e.g. ``--af-adv=force=5``, or use - ``--af=stats``. + only works with floating-point data. *NOTE*: This filter is not reentrant and can therefore only be enabled once for every audio stream. diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index fab682fdd5..5c71dd977a 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -44,40 +44,6 @@ ``--af-clr`` exist to modify a previously specified list, but you shouldn't need these for typical use. ---af-adv= - See also ``--af``. - Specify advanced audio filter options: - - force=<0-7> - Forces the insertion of audio filters to one of the following: - - 0 - Use completely automatic filter insertion (currently identical to - 1). - 1 - Optimize for accuracy (default). - 2 - Optimize for speed. *Warning*: Some features in the audio filters - may silently fail, and the sound quality may drop. - 3 - Use no automatic insertion of filters and no optimization. - *Warning*: It may be possible to crash mpv using this setting. - 4 - Use automatic insertion of filters according to 0 above, but use - floating point processing when possible. - 5 - Use automatic insertion of filters according to 1 above, but use - floating point processing when possible. - 6 - Use automatic insertion of filters according to 2 above, but use - floating point processing when possible. - 7 - Use no automatic insertion of filters according to 3 above, and - use floating point processing when possible. - - list= - Same as ``--af``. - --aid= Select audio channel. ``auto`` selects the default, ``no`` disables audio. See also ``--alang``. @@ -1946,9 +1912,8 @@ --srate= Select the output sample rate to be used (of course sound cards have limits on this). If the sample frequency selected is different from that - of the current media, the resample or lavcresample audio filter will be - inserted into the audio filter layer to compensate for the difference. The - type of resampling can be controlled by the ``--af-adv`` option. + of the current media, the lavrresample audio filter will be + inserted into the audio filter layer to compensate for the difference. --start= Seek to given time position. -- cgit v1.2.3 From ff6342a3112e194c228660516cc19dd1ce4de6d9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 29 Mar 2013 22:29:13 +0100 Subject: af_lavrresample: add no-detach suboption Normally, af_lavrresample detaches itself immediately if the input and output audio parameters are the same. no-detach prevents this. --- DOCS/man/en/af.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'DOCS/man/en') diff --git a/DOCS/man/en/af.rst b/DOCS/man/en/af.rst index f3054e7255..7babf874d4 100644 --- a/DOCS/man/en/af.rst +++ b/DOCS/man/en/af.rst @@ -50,6 +50,11 @@ lavrresample[=option1:option2:...] linear if set then filters will be linearly interpolated between polyphase entries (default: no) + no-detach + don't detach if input and output audio format/rate/channels are the + same. You should add this option if you specify additional parameters, + as automatically inserted lavrresample instances will use the + default settings. lavcac3enc[=tospdif[:bitrate[:minchn]]] Encode multi-channel audio to AC-3 at runtime using libavcodec. Supports -- cgit v1.2.3 From d2c20f4cfbfe01bdf63c2a76f20d39212598440e Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 29 Mar 2013 22:41:47 +0100 Subject: manpage: update af_lavrresample entry Reflects the changes over the last few commits. --- DOCS/man/en/af.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'DOCS/man/en') diff --git a/DOCS/man/en/af.rst b/DOCS/man/en/af.rst index 7babf874d4..5c08b5f048 100644 --- a/DOCS/man/en/af.rst +++ b/DOCS/man/en/af.rst @@ -30,15 +30,15 @@ filter list. Available filters are: lavrresample[=option1:option2:...] - Changes the sample rate of the audio stream to an integer in Hz. - Can be used if you have a fixed frequency sound card or if you are stuck - with an old sound card that is only capable of max 44.1kHz. + This filter uses libavresample (or libswresample, depending on the build) + to change sample rate, sample format, or channel layout of the audio stream. + This filter is automatically enabled if the audio output doesn't support + the audio configuration of the file being played. - This filter is automatically enabled if necessary. It only supports the - 16-bit integer native-endian format. + It supports only the following sample formats: u8, s16ne, s32ne, floatne. srate= - the output sample rate (defaut: 44100) + the output sample rate length= length of the filter with respect to the lower sampling rate (default: 16) -- cgit v1.2.3 From 071a8f50b96758ced05e1eef3aba5ce915a56479 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 31 Mar 2013 04:24:53 +0200 Subject: options: add option to prevent decoder audio downmixing Also rename --a52drc to --ad-lavc-ac3drc, and add --ad-lavc-o. --- DOCS/man/en/changes.rst | 1 + DOCS/man/en/options.rst | 27 +++++++++++++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) (limited to 'DOCS/man/en') diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst index 1e5bb74a2c..20f6be553a 100644 --- a/DOCS/man/en/changes.rst +++ b/DOCS/man/en/changes.rst @@ -124,6 +124,7 @@ Command line switches -afm hwac3 --ad=spdif:ac3,spdif:dts -x W, -y H --geometry=WxH + --no-keepaspect -xy W --autofit=W + -a52drc level --ad-lavc-ac3drc=level =================================== =================================== *NOTE*: ``-opt val`` becomes ``--opt=val``. diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 5c71dd977a..03f09b2efc 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -1,11 +1,3 @@ ---a52drc= - Select the Dynamic Range Compression level for AC-3 audio streams. - is a float value ranging from 0 to 1, where 0 means no compression and 1 - (which is the default) means full compression (make loud passages more - silent and vice versa). Values up to 2 are also accepted, but are purely - experimental. This option only shows an effect if the AC-3 stream contains - the required range compression information. - --abs= (``--ao=oss`` only) (OBSOLETE) Override audio driver/card buffer size detection. @@ -37,6 +29,25 @@ ``--ad=help`` List all available decoders. +--ad-lavc-ac3drc= + Select the Dynamic Range Compression level for AC-3 audio streams. + is a float value ranging from 0 to 1, where 0 means no compression and 1 + (which is the default) means full compression (make loud passages more + silent and vice versa). Values up to 2 are also accepted, but are purely + experimental. This option only shows an effect if the AC-3 stream contains + the required range compression information. + +--ad-lavc-downmix= + Whether to request audio channel downmixing from the decoder (default: yes). + Some decoders, like AC-3, AAC and DTS, can remix audio on decoding. The + requested number of output channels is set with the ``--channels`` option. + Useful for playing surround audio on a stereo system. + +--ad-lavc-o==[,=[,...]] + Pass AVOptions to libavcodec decoder. Note, a patch to make the o= + unneeded and pass all unknown options through the AVOption system is + welcome. A full list of AVOptions can be found in the FFmpeg manual. + --af= Specify a list of audio filters to apply to the audio stream. See `audio_filters` for details and descriptions of the available filters. -- cgit v1.2.3 From d9582ad0a41ed5452ad29bf8511e8c6a3bdbe6f8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 9 May 2013 12:09:23 +0200 Subject: audio/filters: add af_force Its main purpose is for testing in case channel layout stuff breaks, in particular in connection with old audio filters. --- DOCS/man/en/af.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'DOCS/man/en') diff --git a/DOCS/man/en/af.rst b/DOCS/man/en/af.rst index 5c08b5f048..08e7853990 100644 --- a/DOCS/man/en/af.rst +++ b/DOCS/man/en/af.rst @@ -210,6 +210,34 @@ channels=nch[:nr:from1:to1:from2:to2:from3:to3:...] 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. +force=in-format:in-srate:in-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 + conversion filters before or after this filter if needed. + + All parameters are optional. The ``in-`` variants restrict what the filter + accepts as input. The ``out-`` variants change the audio format, without + actually doing a conversion. The data will be 'reinterpreted' by the + filters or audio outputs following this filter. + + + Force conversion to this format. See ``format`` filter for valid audio + format values. + + + Force conversion to a specific sample rate. The rate is an integer, + 48000 for example. + + + Force mixing to a specific channel layout. See ``--channels`` option + for possible values. + + + + + + + format[=format] Convert between different sample formats. Automatically enabled when needed by the sound card or another filter. See also ``--format``. @@ -293,6 +321,11 @@ pan=n[:L00:L01:L02:...L10:L11:L12:...Ln0:Ln1:Ln2:...] channels 0 and 1 into output channel 2 (which could be sent to a subwoofer for example). + *NOTE*: if you just want to force remixing to a certain output channel + layout, it's easier to use the ``force`` filter. For example, + ``mpv '--af=force=channels=5.1' '--channels=5.1'`` would always force + remixing audio to 5.1 and output it like this. + sub[=fc:ch] Adds a subwoofer channel to the audio stream. The audio data used for creating the subwoofer channel is an average of the sound in channel 0 and -- cgit v1.2.3 From 9d1f5e8e9f16737b732918a8924c23ee70886db5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 9 May 2013 13:57:44 +0200 Subject: manpage: update --channels --- DOCS/man/en/options.rst | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'DOCS/man/en') diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 03f09b2efc..f528c3f849 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -357,25 +357,24 @@ --cdrom-device= Specify the CD-ROM device (default: ``/dev/cdrom``). ---channels= +--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 audio (like DVDs). In that case - liba52 does the decoding by default and correctly downmixes the audio into - the requested number of channels. To directly control the number of output - channels independently of how many channels are decoded, use the channels - filter (``--af=channels``). + 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. *NOTE*: This option is honored by codecs (AC-3 only), filters (surround) and audio output drivers (OSS at least). - Available options are: + The ``--channels`` option either takes a channel number or an explicit + channel layout. Channel numbers refer to default layouts, e.g. 2 channels + refer to stereo, 6 refers to 5.1. - :2: stereo - :4: surround - :6: full 5.1 - :8: full 7.1 + See ``--channels=help`` output for defined default layouts. This also + lists speaker names, which can be used to express arbitrary channel + layouts (e.g. ``fl-fr-lfe`` is 2.1). --chapter= Specify which chapter to start playing at. Optionally specify which -- cgit v1.2.3