Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion (Read 17278 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #25
That is what i mean with poorly presented. The thread is half a year old and still nobody knows what exactly should be so good about it but Discrete Fourier Transforms was some fancy thing for audiophiles.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #26
Here are frequency sweep test files: https://drive.google.com/drive/folders/1LhG6IlcMM4m89xhYGBajVBgpbirXJmw4?usp=drive_link

32000->48000 resampling.

For r8brain-free used float, 48000 Hz destination samplerate and 99% bandwidth
For ardftsrc used: ardftsrc=48000:qualilty=8192:bandwidth=0.98 -c:a pcm_f32le

sweep_orig.wav is PCM float 32bit-le 32000Hz source sample.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #27
Here are speed numbers, for one big flac file, from 44100Hz to 48000Hz:

ffmpeg  -i ~/Music/Interstellar.mka -af ardftsrc=48000:thread_type=frame -f null -
elapsed=0:00:01.26 size=N/A time=02:12:00.38 bitrate=N/A speed=6.28e+03x

and now with soxr within aresample filter:

ffmpeg -i ~/Music/Interstellar.mka -af aresample=48000:resampler=soxr -f null -
elapsed=0:00:04.85 size=N/A time=02:12:00.38 bitrate=N/A speed=1.63e+03x

and now just (low quality) swr resampler within aresample filter:

ffmpeg -i ~/Music/Interstellar.mka -af aresample=48000:resampler=swr -f null -
elapsed=0:00:02.58 size=N/A time=02:12:00.38 bitrate=N/A speed=3.07e+03x

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #28
Added new phase parameter to control min/intermediate/linear/max phase of resampling.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #29
I provided here facts, and nobody here can prove they are not facts.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #30
What ffmpeg version has this resampler?


Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #32
Just want to say I am reading it with interest. I usually downsample >=96 kHz FLAC to mostly 48, sometimes 64 (also bit depth reduction at times, e.g., 64k/20bit are a good chunk smaller than 48k/24bit, just for consideration). I'm all for best practise, but the "more than good enough" and practical solution as for fb2k addicts is using SoX (plus ditherer) and I'm not yet feeling the itch to e.g. create and call batch files or idk.. from fb2ks converter. If someone made an fb2k plugin, and I cannot do that myself, I'd probably happily use that librempeg or r8 thing. After all we're in the inaudible realms.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #33
SoXr  resampler is very good, when downsampling you would miss only very small portion of high frequency range when comparing with ardftsrc parameters (with right combinations of options).
ARDFTSRC is using rather extremely trivial algorithm to implement resampling, you just need good FFT lib that supports RDFT transforms (FFTW3, libhpk), and do correct amount of left and right padding and apply pre-constructed taper window to subset of coefficients in frequency domain + do overlap save step.
Construction of the taper window is also very trivial. I might write python script which would do same thing as this filter, if there is enough of interest.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #34
Just want to say I am reading it with interest. I usually downsample >=96 kHz FLAC to mostly 48, sometimes 64 (also bit depth reduction at times, e.g., 64k/20bit are a good chunk smaller than 48k/24bit, just for consideration). I'm all for best practise, but the "more than good enough" and practical solution as for fb2k addicts is using SoX (plus ditherer) and I'm not yet feeling the itch to e.g. create and call batch files or idk.. from fb2ks converter. If someone made an fb2k plugin, and I cannot do that myself, I'd probably happily use that librempeg or r8 thing. After all we're in the inaudible realms.
If you want a resampler that keeps the maximum bandwith there is already the dBpoweramp/SSRC component in foobar.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #35
Last time I checked SSRC have limitations what integer ratios it can resample, but if it works for some limited set of fixed rates than fine.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #36
Up to 96kHz all necessary values should be there.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #37
Yes, for more advanced, read more sample rates, better software than SSRC should by used anyway.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #38
neither one, its only in librempeg. If you have github account you can download librempeg version of ffmpeg executable from one of repository forks: https://github.com/rorgoroth/mingw-cmake-env/releases/tag/latest
Thank you for that link. I use GNU/Linux though so I will have to compile it myself at some point.