From d4d1fc823f99ab9cf13067fdd31b02c2c7fc4e2b Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 7 Jun 2017 21:23:14 +0200 Subject: avfilter: add native headphone spatialization filter Signed-off-by: Paul B Mahol --- doc/filters.texi | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'doc') diff --git a/doc/filters.texi b/doc/filters.texi index 9cc356b4df..023096f4e0 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -2789,6 +2789,49 @@ Samples where the target gain does not match between channels @end table @end table +@section headphone + +Apply head-related transfer functions (HRTFs) to create virtual +loudspeakers around the user for binaural listening via headphones. +The HRIRs are provided via additional streams, for each channel +one stereo input stream is needed. + +The filter accepts the following options: + +@table @option +@item map +Set mapping of input streams for convolution. +The argument is a '|'-separated list of channel names in order as they +are given as additional stream inputs for filter. +This also specify number of input streams. Number of input streams +must be not less than number of channels in first stream plus one. + +@item gain +Set gain applied to audio. Value is in dB. Default is 0. + +@item type +Set processing type. Can be @var{time} or @var{freq}. @var{time} is +processing audio in time domain which is slow. +@var{freq} is processing audio in frequency domain which is fast. +Default is @var{freq}. + +@item lfe +Set custom gain for LFE channels. Value is in dB. Default is 0. +@end table + +@subsection Examples + +@itemize +@item +Full example using wav files as coefficients with amovie filters for 7.1 downmix, +each amovie filter use stereo file with IR coefficients as input. +The files give coefficients for each position of virtual loudspeaker: +@example +ffmpeg -i input.wav -lavfi-complex "amovie=azi_270_ele_0_DFC.wav[sr],amovie=azi_90_ele_0_DFC.wav[sl],amovie=azi_225_ele_0_DFC.wav[br],amovie=azi_135_ele_0_DFC.wav[bl],amovie=azi_0_ele_0_DFC.wav,asplit[fc][lfe],amovie=azi_35_ele_0_DFC.wav[fl],amovie=azi_325_ele_0_DFC.wav[fr],[a:0][fl][fr][fc][lfe][bl][br][sl][sr]headphone=FL|FR|FC|LFE|BL|BR|SL|SR" +output.wav +@end example +@end itemize + @section highpass Apply a high-pass filter with 3dB point frequency. -- cgit v1.2.3