Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convolution and Upsampling
10-07-2019, 17:50
Post: #1
Convolution and Upsampling
Hi all,

I use upsamling by soxr with great results.
syntax:
convOut=-af aresample=resampler=soxr:precision=32

Now I want to use convolution,
syntax:
convOut=-i /share/ConvolutionFiles/Cor1S*.wav -lavfi afir=gtype=gn

What is the correct syntax for „convOut“ if I want to use convolution and upsampling ?
All my previous attempts have unfortunately resulted in an error Huh

thanks
Max
Find all posts by this user
Quote this message in a reply
11-07-2019, 09:30
Post: #2
RE: Convolution and Upsampling
You need to create an FFmpeg filtergraph using the following syntax:

convOut=-i /share/ConvolutionFiles/Cor1S*.wav -lavfi afir=gtype=gn[2];[2]aresample=resampler=soxr:precision=32

This sends the output of the afir filter to an internal FFmpeg stream [2], which is then used as the input to the aresample filter.
Find all posts by this user
Quote this message in a reply
12-07-2019, 14:07
Post: #3
RE: Convolution and Upsampling
FFmpeg filtergraph was new to me. It works perfectly ;-)

Is there a possibility to do upsampling first ?
like: convOut=-af aresample=resampler=soxr:precision=32[2];[2]/share/ConvolutionFiles/Cor1S*.wav -lavfi afir=gtype=gn

Thanks a lot
Find all posts by this user
Quote this message in a reply
12-07-2019, 16:55
Post: #4
RE: Convolution and Upsampling
This is possible but there are limitations in what can be achieved.

What are the sample rates and bit depths of your original files? Are you using soxr to upsample them all to the same sample rate (what sample rate)? Are you also using soxr to increase the bit depth (what bit depth)?

This information will enable me to suggest the optimal approach for your situation.
Find all posts by this user
Quote this message in a reply
13-07-2019, 13:22
Post: #5
RE: Convolution and Upsampling
most files are 44k 16bit, some files are 48k and 96k.
soxr is for upsamling and all files are upsampled by maximum even multiple to 352K or 384k and 24bit
e.g. flac(16;44):wav24;352
Find all posts by this user
Quote this message in a reply
14-07-2019, 05:56
Post: #6
RE: Convolution and Upsampling
(13-07-2019 13:22)mm2 Wrote:  most files are 44k 16bit, some files are 48k and 96k.
soxr is for upsamling and all files are upsampled by maximum even multiple to 352K or 384k and 24bit
e.g. flac(16;44):wav24;352

Curious to find out what was the difference between Soxr and ffmpeg upsampling
Find all posts by this user
Quote this message in a reply
14-07-2019, 16:28
Post: #7
RE: Convolution and Upsampling
(14-07-2019 05:56)Snoopy08 Wrote:  Curious to find out what was the difference between Soxr and ffmpeg upsampling

try soxr with "precision" parameter
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)