Missing SOFAlizer filter

Any other question that don't fit into the other support categorizes.
pandy
Posts: 255
Joined: Mon Feb 24, 2014 1:46 pm

Missing SOFAlizer filter

Post by pandy »

Seem that sofalizer filter is missing http://ffmpeg.org/ffmpeg-filters.html#sofalizer

Ok, technically not an issue as filter is not supported by Zeranoe builds but there is inconsistency between attached documentation and ffmpeg capabilities.
SOFAlizer itself is also very expected filter (well me and probably lot of other people missed for years decent binaural audio processing in ffmpeg so it was difficult to create "mobile" content for headphones listening in one simple chain).

llogan
Posts: 332
Joined: Fri Mar 14, 2014 3:29 am

Re: Missing SOFAlizer filter

Post by llogan »

The docs didn't mention that this filter requires --enable-netcdf, but that has just been fixed (may take a day for online docs to catch up).

pandy
Posts: 255
Joined: Mon Feb 24, 2014 1:46 pm

Re: Missing SOFAlizer filter

Post by pandy »

My point was that docs mention filter not present in Zeranoe compilation - i assume that whole distribution package is somehow consistent and documentation bundled with binaries is aligned with build capabilities.
I've wrote that per se it is not a bug but rather a missing option and it will be good instead remove doc entry related to sofalizer to provide this filter as it can be very useful and IMHO i miss decent HRTF filter from years in ffmpeg.

pandy
Posts: 255
Joined: Mon Feb 24, 2014 1:46 pm

Re: Missing SOFAlizer filter

Post by pandy »

Bumpitup ;)

Still SOFA filter not present in ffmpeg build but listed in documentation section (doc/ffmpeg-filters.html#sofalizer) .

omniplex
Posts: 9
Joined: Mon Jun 06, 2016 9:00 pm

Re: Missing SOFAlizer filter

Post by omniplex »

pandy wrote:listed in documentation section
The documentation is general, sofalizer is not the only documented feature not present in zeranoe-builds. Because I'm lost with all those command line help options I created a simple script for this business, code snippet:

Code: Select all

set LIST=asyncts azmq flite ladspa ocv openal opengl sofalizer zmq
for %%x in (%LIST%)           do if /I "%~1" == "%%x" goto AWOL
echo Error: %0 found no ffmpeg -h encoder^|filter^|muxer=%~1
goto HELP
:AWOL --------------------------------------------------------------
echo This ffmpeg does not support %NEED%, cf. "%~nx0 buildconf"
But thanks for info, I certainly didn't know that sofalizer is not supported, or what it is, :P

rogerdpack
Posts: 1878
Joined: Fri Aug 05, 2011 9:56 pm

Re: Missing SOFAlizer filter

Post by rogerdpack »

do you (or any followers) actually need/want the sofalizer filter?

pandy
Posts: 255
Joined: Mon Feb 24, 2014 1:46 pm

Re: Missing SOFAlizer filter

Post by pandy »

rogerdpack wrote:do you (or any followers) actually need/want the sofalizer filter?
Short answer is Yes, longer Yes but explanation is clear - sofalizer allow convert multichannel audio to 2 channel form where information on proper spatial location is keep thanks to HRTF.
This is very desired function for all portable players users - if headphone are used then almost all signals are incorrectly located inside head, HRTF allow to move them out of head with proper placement in virtual acoustical space - call this virtual reality for audio.
HRTF is one of most important audio processing tools and almost all latest products form DTS or Dolby extensively use HRTF to immerse customer in good audio.

https://en.wikipedia.org/wiki/Head-rela ... r_function

Hope it is now clear why sofalizer can be considered as important new filter.

Any effort to make it work will be highly appreciated.
Thank You in advance!

rogerdpack
Posts: 1878
Joined: Fri Aug 05, 2011 9:56 pm

Re: Missing SOFAlizer filter

Post by rogerdpack »

OK I did add it to this cross compile script:

https://github.com/rdp/ffmpeg-windows-build-helpers

and some binaries if helpful:

https://sourceforge.net/projects/ffmpeg ... sofalizer/

Cheers!

pandy
Posts: 255
Joined: Mon Feb 24, 2014 1:46 pm

Re: Missing SOFAlizer filter

Post by pandy »

Thank you rogerdpack, i tested quickly new build and seem that sofalizer is now listed as supported filter, sadly it doesn't work failing at loading sofa file - seem it can't find file - not sure what can be source for this problem
  • ffmpeg started on 2016-07-02 at 19:05:43
    Report written to "ffmpeg-20160702-190543.log"
    Command line:
    ffmpeg -report -y -loglevel 56 -i ForUntoUsSurround88.flac -vn -c:a pcm_f32le -af "aresample=resampler=soxr:osr=48000:dither_method=0,sofalizer=sofa='ClubFritz6.sofa':type=freq:radius=3" -f wav ForUntoUsSurround88_sofa.wav
    ffmpeg version N-80900-g77eb05a Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 5.3.0 (GCC)
    configuration: --arch=x86 --target-os=mingw32 --cross-prefix=/Users/packrd/dev/ruby/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --disable-w32threads --enable-gpl --enable-libsoxr --enable-fontconfig --enable-libass --enable-libbluray --enable-iconv --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC --enable-libzvbi --enable-libcaca --enable-libmodplug --extra-libs=-lstdc++ --extra-libs=-lpng --enable-libvidstab --enable-libx265 --enable-decklink --extra-libs=-loleaut32 --enable-libx264 --enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-libopus --enable-frei0r --enable-filter=frei0r --enable-bzlib --enable-libxavs --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libvpx --enable-libilbc --enable-libwavp libavutil 55. 28.100 / 55. 28.100
    libavcodec 57. 48.101 / 57. 48.101
    libavformat 57. 41.100 / 57. 41.100
    libavdevice 57. 0.102 / 57. 0.102
    libavfilter 6. 47.100 / 6. 47.100
    libswscale 4. 1.100 / 4. 1.100
    libswresample 2. 1.100 / 2. 1.100
    libpostproc 54. 0.100 / 54. 0.100
    Splitting the commandline.
    Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
    Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
    Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '56'.
    Reading option '-i' ... matched as input file with argument 'ForUntoUsSurround88.flac'.
    Reading option '-vn' ... matched as option 'vn' (disable video) with argument '1'.
    Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'pcm_f32le'.
    Reading option '-af' ... matched as option 'af' (set audio filters) with argument 'aresample=resampler=soxr:osr=48000:dither_method=0,sofalizer=sofa='ClubFritz6.sofa':type=freq:radius=3'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'wav'.
    Reading option 'ForUntoUsSurround88_sofa.wav' ... matched as output file.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option report (generate a report) with argument 1.
    Applying option y (overwrite output files) with argument 1.
    Applying option loglevel (set logging level) with argument 56.
    Successfully parsed a group of options.
    Parsing a group of options: input file ForUntoUsSurround88.flac.
    Successfully parsed a group of options.
    Opening an input file: ForUntoUsSurround88.flac.
    [file @ 04823b40] Setting default whitelist 'file,crypto'
    [flac @ 04834800] Format flac probed with size=2048 and score=50
    [flac @ 04834800] Before avformat_find_stream_info() pos: 8402 bytes read:32768 seeks:0 nb_streams:1
    [flac @ 04834800] All info found
    [flac @ 04834800] After avformat_find_stream_info() pos: 10450 bytes read:32768 seeks:0 frames:1
    Input #0, flac, from 'ForUntoUsSurround88.flac':
    Duration: 00:00:30.10, start: 0.000000, bitrate: 5838 kb/s
    Stream #0:0, 1, 1/88200: Audio: flac, 88200 Hz, 5.1, s32 (24 bit)
    Successfully opened the file.
    Parsing a group of options: output file ForUntoUsSurround88_sofa.wav.
    Applying option vn (disable video) with argument 1.
    Applying option c:a (codec name) with argument pcm_f32le.
    Applying option af (set audio filters) with argument aresample=resampler=soxr:osr=48000:dither_method=0,sofalizer=sofa='ClubFritz6.sofa':type=freq:radius=3.
    Applying option f (force format) with argument wav.
    Successfully parsed a group of options.
    Opening an output file: ForUntoUsSurround88_sofa.wav.
    [file @ 04836140] Setting default whitelist 'file,crypto'
    Successfully opened the file.
    detected 2 logical cores
    [Parsed_aresample_0 @ 04837380] Setting 'resampler' to value 'soxr'
    [Parsed_aresample_0 @ 04837380] Setting 'osr' to value '48000'
    [Parsed_aresample_0 @ 04837380] Setting 'dither_method' to value '0'
    [Parsed_sofalizer_1 @ 04837e00] Setting 'sofa' to value 'ClubFritz6.sofa'
    [Parsed_sofalizer_1 @ 04837e00] Setting 'type' to value 'freq'
    [Parsed_sofalizer_1 @ 04837e00] Setting 'radius' to value '3'
    [Parsed_sofalizer_1 @ 04837e00] Can't find SOFA-file 'ClubFritz6.sofa'
    [Parsed_sofalizer_1 @ 04837e00] Error while loading SOFA file: 'ClubFritz6.sofa'
    [Parsed_sofalizer_1 @ 04837e00] No valid SOFA file could be loaded. Please specify valid SOFA file.
    [AVFilterGraph @ 048207e0] Error initializing filter 'sofalizer' with args 'sofa=ClubFritz6.sofa:type=freq:radius=3'
    Error opening filters!
    [AVIOContext @ 04836a00] Statistics: 0 seeks, 0 writeouts
    [AVIOContext @ 0005f9a0] Statistics: 32768 bytes read, 0 seeks

richardpl
Posts: 58
Joined: Sat Aug 01, 2015 6:35 pm

Re: Missing SOFAlizer filter

Post by richardpl »

Have you actually downloaded file? Have tried other files? Is full path correct?

Post Reply