[FFmpeg-devel] [PATCH] avfilter: add native headphone spatialization filter

Paul B Mahol onemda at gmail.com
Thu Jun 8 14:57:35 EEST 2017


On 6/8/17, wm4 <nfxjfg at googlemail.com> wrote:
> On Thu, 8 Jun 2017 13:24:39 +0200
> Paul B Mahol <onemda at gmail.com> wrote:
>
>> On 6/8/17, wm4 <nfxjfg at googlemail.com> wrote:
>> > On Thu, 8 Jun 2017 11:36:02 +0200
>> > Paul B Mahol <onemda at gmail.com> wrote:
>> >
>> >> On 6/8/17, wm4 <nfxjfg at googlemail.com> wrote:
>> >> > On Thu,  8 Jun 2017 08:13:48 +0200
>> >> > Paul B Mahol <onemda at gmail.com> wrote:
>> >> >
>> >> >> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> >> >> ---
>> >> >
>> >> > Feeding the coefficients as additional audio inputs, and using amovie
>> >> > to load them, seems like an extremely awkward choice. It would make
>> >> > sense to me if there actually were a set of input coefficients per
>> >> > actual audio input, but that's not the case. Instead, the efficients
>> >> > are a much smaller stream than the main audio input.
>> >> >
>> >> > Why not load the coefficients directly?
>> >>
>> >> I'm not going to add yet another movie filter.
>> >> The amovie is there just because I used same filtergraph with mpv to
>> >> be able to seek.
>> >
>> > A user would need to connect all the inputs even with ffmpeg CLI. Not
>> > sure why you're talking about "another movie filter" - why not just
>> > load the coefficients directly, using a custom format if necessary?
>> > From what I understand, you need to do something special to produce
>> > those coefficient wav files anyway.
>>
>> SOFA is custom format, subset of HDF, alternative is wav, wav
>> can hold 16/24/32 int/float samples.
>>
>> SOFA just holds bunch of HRTF coefficients of various loudspeakers
>> positions.
>>
>> I'm not going to NIH libmysofa or invent yet another new format just to
>> hold all
>> IRs when only subset of them are ever used.
>>
>> So take it or leave it. I'm pretty happy with this filter,
>> its even faster when seeking than sofalizer.
>
> I'd probably leave it. Using wav audio is a ridiculous way of storing
> coefficients, when you could just dump them as arrays into a trivial
> custom file format.

But then one would need to implement non-trivial parsing and etc.
On the other hand this filter is easily configurable and extendable.
There is no point to add yet another format to hold HRTFs.
Besides there are other examples where one need to provide HRTFs this
way.

Take look at afir filter usage, its much simpler than brutefir.
BruteFIR needs configuration files....


More information about the ffmpeg-devel mailing list