Commit Graph

36 Commits

Author SHA1 Message Date
wm4 c8b8fe9981 audio: remove unreferenced af_lavrresample
This filter wasn't referenced anywhere and thus was dead code. It should
have been in the audio filter list in user_filters.c. This was intended
as compatibility wrapper (to avoid breaking old command lines and config
files), and has no real use. Apparently I forgot to add it to the filter
list (did I even test this shit?), and so it was rotting around for 1.5
years doing nothing (just like myself).

Note that users can just use the libavfilter provided filter to force
resampling, just that it has a different name and different options.
There's also af_format to force inserting auto conversion through the
internal f_swsresample filter.
2019-09-19 20:37:05 +02:00
wm4 7bfb240309 f_lavfi: add an option to use old audio PTS handling for af_lavfi
The fix-pts option basically uses the old af_lavfi's (before filter
rewrite) timestamp logic. The rest is explained in the manpage.
2018-04-15 23:11:33 +03:00
wm4 4b567aeac8 manpage: clarify some --vf options
In particular, mention deprecated things.
2018-01-31 11:12:08 +01:00
wm4 b9f804b566 audio: rewrite filtering glue code
Use the new filtering code for audio too.
2018-01-30 03:10:27 -08:00
Vobe e7ea893c2f af_rubberband: add af-command to multiply current pitch
This commit introduces the multiply-pitch af-command. Users may bind
keys to this command in order to incrementally adjust the pitch of a
track. This will probably mostly be useful for musicians trying to
transpose up and down by semi tones without having to calculate
the correct ratio beforehand.

As an example, here is an input.conf to test this feature:

    { af-command all multiply-pitch 0.9438743126816935
    } af-command all multiply-pitch 1.059463094352953
2018-01-15 23:14:01 -08:00
wm4 a5f53da229 af_lavrresample: deprecate this filter
The future direction might be not having such a user-visible filter at
all, similar to how vf_scale went away (or actually, redirects to
libavfilter's vf_scale).
2018-01-13 03:26:45 -08:00
wm4 3d27a0792b af: remove deprecated audio filters
These couldn't be relicensed, and won't survive the LGPL transition. The
other existing filters are mostly LGPL (except libaf glue code).

This remove the deprecated pan option. I guess it could be restored by
inserting a libavfilter filter (if there's one), but for now let it be
gone.

This temporarily breaks volume control (and things related to it, like
replaygain).
2017-11-29 21:30:51 +01:00
wm4 cc69650e76 af, vf: improvements to libavfilter bridge
Add the "lavfi-" prefix (details see manpage additons).

Tag the filter name as "(lavfi)" in the verbose filter list output.
2017-05-31 17:42:55 +02:00
wm4 f1c4d20e65 audio: move replaygain control to top-level options
af_volume is deprecated, and so are its replaygain sub-options. To make
it possible to use replaygain without deprecated options (and of course
to make it available at all after af_volume is dropped), reintroduce
them as top-level options.

This also means that they are easily changeable at runtime by using them
as properties. Change the "volume" property to use the new update
mechanism as well.

We don't actually bother sharing the implementation between new and
deprecated mechanisms, as the deprecated one will simply be deleted.

For the from_dB() functions, we mention anders' copyright, although I'm
not sure if a mere formula is copyrightable. This will have to be
determined later.

This whole change is mostly untested. Our distributed human CI will take
care of it.
2017-04-26 21:45:55 +02:00
wm4 7d424b4ce4 command: add better runtime filter toggling method
Basically, see the example in input.rst.

This is better than the "old" vf-toggle method, because it doesn't
require the user to duplicate the filter string in mpv.conf and
input.conf.

Some aspects of this changes are untested, so enjoy your alpha testing.
2017-03-25 17:07:40 +01:00
Jan Janssen 222899fbbe af_drc: remove
Remove low quality drc filter. Anyone whishing to have dynamic range
compression should use the much more powerful acompressor ffmpeg filter:

    mpv --af=lavfi=[acompressor] INPUT

Or with parameters:

    mpv --af=lavfi=[acompressor=threshold=-25dB:ratio=3:makeup=8dB] INPUT

Refer to https://ffmpeg.org/ffmpeg-filters.html#acompressor for a full
list of supported parameters.

Signed-off-by: wm4 <wm4@nowhere>
2017-03-25 12:57:10 +01:00
Martin Herkt c3ae2ff107
man: fix PDF build
It really doesn’t want to pagebreak that box, so I removed a
useless example.
2016-10-06 21:49:14 +02:00
Hector Martin 57eca14a45 af_rubberband: add af-command and option to change the pitch
This allows both fixed and dynamic control over the audio pitch using
librubberband, which was previously not exposed to the user.
2016-09-19 18:56:14 +02:00
Hector Martin ed8540c38e af_pan: add af-command support to change the matrix
This allows for seamless changes in the downmixing matrix without having
to reinitialize the filter chain.
2016-09-19 14:55:58 +02:00
Paul B Mahol e2a54bb1ca audio/filter: remove delay audio filter
Similar filter is available in libavfilter.
2016-08-12 19:45:39 +02:00
wm4 e911e208b8 af_lavcac3enc: make encoder configurable 2016-06-23 12:14:45 +02:00
wm4 d917efcd58 manpage: minor corrections
Pointed out by der_richter on IRC.
2016-01-24 19:41:32 +01:00
wm4 1ff32236fa manpage: fix broken example
Fixes #2353.
2015-09-27 19:21:37 +02:00
wm4 fea1e09a9c manpage: add a note about libavfilter 2015-09-11 23:48:47 +02:00
wm4 4eae4a5da7 af_lavrresample: add normalize suboption 2015-09-08 22:16:30 +02:00
wm4 d04d2380e3 audio/filter: remove af_bs2b too
Some users still use this filter, so the filter was going to be kept.
But I overlooked that libavfilter provides this filter. Remove the
redundant wrapper from mpv. Something like --af=lavfi=bs2b should work
and give exactly the same results.
2015-09-04 00:23:39 +02:00
wm4 091bfa3abf audio/filter: remove some useless filters
All of these filters are considered not useful anymore by us. Some have
replacements in libavfilter (useable through af_lavfi).

af_center, af_extrastereo, af_karaoke, af_sinesuppress, af_sub,
af_surround, af_sweep: pretty simple and useless filters which probably
nobody ever wants.

af_ladspa: has a replacement in libavfilter.

af_hrtf: the algorithm doesn't work properly on most sources, and the
implementation was buggy and complicated. (The filter was inherited from
MPlayer; but even in mpv times we had to apply fixes that fixed major
issues with added noise.) There is a ladspa filter if you still want to
use it.

af_export: I'm not even sure what this is supposed to do. Possibly it
was meant for GUIs rendering audio visualizations, but it couldn't
really work well. For example, the size of the audio depended on the
samplerate (fixed number of samples only), and it couldn't retrieve the
complete audio, only fragments. If this is really needed for GUIs, mpv
should add native visualization, or a proper API for it.
2015-09-03 23:55:36 +02:00
wm4 4c6a600943 af_volume: add a replaygain fallback option 2015-06-23 15:07:19 +02:00
wm4 552dc0d564 af_convert24: remove this filter 2015-06-16 22:40:37 +02:00
Kevin Mitchell 3f8b8b8c0c manpage: clarify --af=format 2015-04-15 04:27:57 -07:00
Kevin Mitchell e1e46cc81a manpage: remove extra newline at end of af.rst 2015-04-15 04:27:57 -07:00
Kevin Mitchell 1091353d47 manpage: correct option minchn->minch for lavcac3enc 2015-03-30 16:37:03 -07:00
Martin Herkt add4c9ee03 man: fix PDF build 2015-03-15 15:18:11 +01:00
wm4 df5548a754 af_rubberband: make all librubberband options configurable
librubberband exports a big load of options. Normally, the default
settings (whether they're librubberband defaults or our defaults) should
be sufficient, but since I'm not so sure about this, making it
configurable allows others to figure it out for me.
2015-02-11 17:11:05 +01:00
wm4 b6ab34fc98 af_rubberband: pitch correction with librubberband
If "--af=rubberband" is used, librubberband will be used to speed up or
slow down audio with pitch correction.

This still has some problems: the audio delay is not calculated
correctly, so the audio position jitters around by a few milliseconds.
This will probably ruin video timing.
2015-02-11 00:29:12 +01:00
wm4 30f3f9fcda manpage: fix af_scaletempo suggested commands 2015-02-10 20:43:59 +01:00
wm4 b745c2d005 audio: drop swapped-endian audio formats
Until now, the audio chain could handle both little endian and big
endian formats. This actually doesn't make much sense, since the audio
API and the HW will most likely prefer native formats. Or at the very
least, it should be trivial for audio drivers to do the byte swapping
themselves.

From now on, the audio chain contains native-endian formats only. All
AOs and some filters are adjusted. af_convertsignendian.c is now wrongly
named, but the filter name is adjusted. In some cases, the audio
infrastructure was reused on the demuxer side, but that is relatively
easy to rectify.

This is a quite intrusive and radical change. It's possible that it will
break some things (especially if they're obscure or not Linux), so watch
out for regressions. It's probably still better to do it the bulldozer
way, since slow transition and researching foreign platforms would take
a lot of time and effort.
2014-09-23 23:09:25 +02:00
Martin Herkt 27a065182c man: fix a whole bunch of typos 2014-09-01 04:27:13 +02:00
wm4 defa0a20e0 af_lavcac3enc: lower minimum channel number to 3
It seems only stereo PCM should be passed through.
2014-08-12 23:45:41 +02:00
wm4 be792c085a af_lavcac3enc: change default bitrate to 640
No reason to use less.

Since the name "default" is misleading now, replace it with "auto"
(still recognize the old name).
2014-08-12 23:34:28 +02:00
wm4 f5e1756475 DOCS: remove en/ sub-directory
This additional sub-directory doesn't serve any purpose anymore. Get rid
of it.
2014-06-20 23:01:12 +02:00