Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#7632 closed defect (fixed)

SOFAlizer not centering the center channel

Reported by: StarBrilliant Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: sofa
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

I created a 1000Hz -18dBFS beeping tone on the FC channel and pass it to SOFAlizer with dodeca_and_7channel_3DSL_HRTF.sofa (built-in HRTF file of VLC player).

The resulting audio has a left channel at -32dBFS, and a right channel at between -34 and -33dBFS.

Since the file is extracted from VLC, the HRTF filter included in VLC is working and fine (except for a weird series of operation is necessary to enable it), I doubt the problem is on FFmpeg's side.

I tested with other HRTF files such as hrtf1.sofa (built-in HRTF file of SOFAlizer for Unity plugin), left=-40dBFS, right=-38dBFS. So the bias sometimes goes left and sometimes goes right.

How to reproduce:

% ./Downloads/ffmpeg-20181218-3a36b0c-macos64-static/bin/ffmpeg -filter_complex "sine=f=1000:r=48000:d=10,aeval=0|0|val(0)|0|0|0:c=5.1,aformat=channel_layouts=5.1,asplit[5.1][TEMP];[TEMP]sofalizer=sofa=./Downloads/dodeca_and_7channel_3DSL_HRTF.sofa:gain=15:lfegain=9[SOFA]" -map "[5.1]" 5.1.wav -map "[SOFA]" sofa.wav
ffmpeg version N-92738-g3a36b0c4b8 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-appkit --enable-avfoundation --enable-coreimage --enable-audiotoolbox
  libavutil      56. 24.101 / 56. 24.101
  libavcodec     58. 42.104 / 58. 42.104
  libavformat    58. 24.101 / 58. 24.101
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 46.101 /  7. 46.101
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (2)

5.1.flac (164.5 KB) - added by StarBrilliant 3 months ago.
test file with 1kHz -18dBFS sine on FC channel
sofa.flac (288.3 KB) - added by StarBrilliant 3 months ago.
SOFAlizer (dodeca_and_7channel_3DSL_HRTF.sofa) result with +15dB gain and +9dB LFE gain

Download all attachments as: .zip

Change History (7)

Changed 3 months ago by StarBrilliant

test file with 1kHz -18dBFS sine on FC channel

Changed 3 months ago by StarBrilliant

SOFAlizer (dodeca_and_7channel_3DSL_HRTF.sofa) result with +15dB gain and +9dB LFE gain

comment:1 Changed 3 months ago by richardpl

It could be libmysofa bug, check older ffmpeg version prior porting of sofalizer to libmysofa.

comment:2 Changed 3 months ago by richardpl

Actually this is normal for sofa files without exact channel positions as requested, libmysofa then does internal interpolation.

comment:3 Changed 3 months ago by richardpl

  • Resolution set to fixed
  • Status changed from new to closed

On second look, this is bug in libmysofa interpolation function. Going to fix it there.

comment:4 Changed 3 months ago by StarBrilliant

Thanks for the fix!

comment:5 Changed 3 months ago by cehoyos

  • Keywords sofalizer hrtf removed
Note: See TracTickets for help on using tickets.