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 thanks Max |
|||
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. |
|||
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 |
|||
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. |
|||
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 |
|||
14-07-2019, 05:56
Post: #6
|
|||
|
|||
RE: Convolution and Upsampling | |||
14-07-2019, 16:28
Post: #7
|
|||
|
|||
RE: Convolution and Upsampling | |||
16-07-2019, 13:13
Post: #8
|
|||
|
|||
RE: Convolution and Upsampling
There is no solution at present that allows you to upsample to different sample rates before applying the convolution filter..
For the 44;16 files, you could use convOut=-i /share/ConvolutionFiles/Cor1S352.wav -lavfi [0]aresample=resampler=soxr:precision=32:osr=352800[2];[2][1]afir=gtype=gn The change from Cor1S*.wav to Cor1S352.wav is needed because without this, MinimStreamer will select Cor1S44.wav to match the sample rate of the input audio file. The addition of osr=352800 is needed because without this, soxr would leave the sample rate of 44100 Hz unchanged, the convolution would be performed at 44100 Hz and FFmpeg would upsample the output from the convolution filter from 44100 Hz to 352800 Hz. This setting could be used to test whether applying the filters in this order improves sound quality but could not be a permanent setting because it isn't suitable for 48 kHz and 96 kHz audio files. |
|||
16-07-2019, 17:31
Post: #9
|
|||
|
|||
RE: Convolution and Upsampling
(16-07-2019 13:13)simoncn Wrote: There is no solution at present that allows you to upsample to different sample rates before applying the convolution filter.. thank you for your proposal. I'm curious, is convolution at 44k or 352k recognizable. |
|||
16-07-2019, 20:07
(This post was last modified: 16-07-2019 20:08 by simoncn.)
Post: #10
|
|||
|
|||
RE: Convolution and Upsampling
You can answer this question by comparing the following settings:
convOut=-i /share/ConvolutionFiles/Cor1S352.wav -lavfi [0]aresample=resampler=soxr:precision=32:osr=352800[2];[2][1]afir=gtype=gn convOut=-i /share/ConvolutionFiles/Cor1S*.wav -lavfi afir=gtype=gn[2];[2]aresample=resampler=soxr:precision=32 The first does convolution at 352k and the second does convolution at 44k. I look forward to seeing your conclusions. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)