Help - Search - Members - Calendar
Full Version: Best quality resampling method?
Hydrogenaudio Forums > Hydrogenaudio Forum > General Audio
ZinCh
SoX Resampler (VHQ)
r8brain (Pro)

SSRC (HP) tuned by EAC3TO
SSRC (HP)

Secret Rabbit Code (libsamplerate) tuned by ReClock
Secret Rabbit Code (libsamplerate)

Wich of this resamplers have you tried, what you can reccomend? I need it mostly for NTSC/PAL (4% slowdown/speedup) conversions.

I have found this page (wich have most of this methods listed), but still not sure what will the best for movies (48 kHz, AC3 artefacts).
lvqcl
SSRC doesn't support arbitrary input/output samplerates. So I doubt you can do "4% slowdown/speedup" with it.

What do you mean by "tuned"? From Slysoft forum:
QUOTE
1.8.3.6 - 21/02/2009
* New: Updated resampler to libsamplerate 0.1.7

- and that doesn't looks like tuning.
ZinCh
OK, we can exclude different "versions", just count it as 4 options:

SSRC (HP) code (used in EAC3TO)

Secret Rabbit Code (used in ReClock)

SoX Resample code (also can be used in foobar2k)

r8brain pro propriety (also can be used in EAC3TO)
lvqcl
1. I wrote «So I doubt you can do "4% slowdown/speedup" with it», and it's wrong, SSRC can do 24/25 or 25/24 conversions. blush.gif

2. AFAIK eac3to uses r8b.dll, and this implies that it uses r8brain free, not pro.
ZinCh
eac3to changelog:

v2.76
* SSRC resampling parameters modified slightly to reduce steepness and ringing
v2.75
* new option "-fast" switches SSRC resampler to fast, but low quality mode
* new option "-r8brain" forces use of r8brain resampler instead of SSRC
v2.69
* added high precision SSRC resampler
* resampling "-quality" now allows "low", "high" (SSRC) or "ultra" (r8brain)
* resampling quality now defaults to "high" (SSRC)

quotes from doom9, mostly from author:
QUOTE
Please note that I'm not sure whether SSRC or r8brain is better for resampling.
r8brain is a lot slower than SSRC, so hopefully it's a little bit better, but you be the judge.
Because of the dramatic speed difference the highest quality SSRC mode is now the default resampling mode (also used for PAL speedup/slowdown).
SSRC is somewhat limited in which conversions it likes to do exactly, though. Some sample rate conversions might be declined by SSRC.
If you stumble over such a case, just use the "-quality=ultra" option to switch to r8brain instead.


QUOTE
I meant the maintainer of this comparison website:
http://src.infinitewave.ca/
He gave me some feedback on my early SSRC implementation, based on which I tweaked the SSRC parameters a bit.
But I'm still interesting in your comparison, too. Would be nice if you could use the latest eac3to version, because of the tweaked SSRC parameters...

As far as I understand the technical comparison website above, SSRC is a rather steep resampling filter with good results, but with "normal" ringing.
r8brain filters out quite a lot of the high frequencies, but on the positive side r8brain has very reduced ringing (see pulse graph).
So both filters have their advantages and disadvantages, technically.


QUOTE
There are no exact comparisons, I'm afraid. Reading through posts at hydrogenaudio.org shows that SSRC is recommended most of the time.
This topic particularly points out one problem with r8brain:
http://www.hydrogenaudio.org/forums/index....showtopic=64989
By the way, KikeG recommends these command lines for SSRC:
http://www.hydrogenaudio.org/forums/index.php?showtopic=7133


QUOTE
Thanks. Well, the guys talking about r8brain there are just looking at the graphs and comment on that.
That still doesn't fully satisfy me. But anyway, SSRC is default in eac3to now, while r8brain can still optionally be used. So everybody should be happy.
The settings listed there are mainly for dithering. That doesn't apply here because eac3to fetches the full floating point processing result from SSRC.
So SSRC's dithering functionality isn't used at all.
Canar
I use and prefer SoX, as per the analyses at http://src.infinitewave.ca/
lvqcl
There's also foobar2000 plugin "SSRC X" (foo_dsp_ssrcX.dll): http://foobar2000.xrea.jp/up/files/up881.zip
Ron Jones
QUOTE (Canar @ May 23 2009, 14:43) *
I use and prefer SoX, as per the analyses at http://src.infinitewave.ca/

Ditto. In my mind, there isn't a better free resampler...plus it has other notable functions smile.gif
lvqcl
I tried to ABX SoX and libsamplerate... unsuccessfully. So for me, the faster = the better.
Kees de Visser
QUOTE (Ron Jones @ May 24 2009, 04:04) *
QUOTE (Canar @ May 23 2009, 14:43) *
I use and prefer SoX, as per the analyses at http://src.infinitewave.ca/

Ditto. In my mind, there isn't a better free resampler...plus it has other notable functions smile.gif
Are your preferences solely based on the specs (graphs) or was there also listening involved ?
ZinCh
Anyone know what resampler use LAME? I have tried to look into code, but was unsuccessful.
Ron Jones
QUOTE (Kees de Visser @ May 24 2009, 04:38) *
QUOTE (Ron Jones @ May 24 2009, 04:04) *
In my mind, there isn't a better free resampler...plus it has other notable functions smile.gif

Are your preferences solely based on the specs (graphs) or was there also listening involved ?

Based entirely on the testing at Infinite Wave and on my own limited measurements. I wouldn't claim to be able to perceive differences between any resamplers that might be categorically rated as being "good", "very good" or "excellent" (not that such categorized rating system exists or would exist).
anddele
QUOTE
I have found this page (wich have most of this methods listed), but still not sure what will the best for movies (48 kHz, AC3 artefacts).


QUOTE
Are your preferences solely based on the specs (graphs) or was there also listening involved ?



Hi, I'm new to this great hydrogen forum but i have some experience with music resampling and would like to contribute.
For me the use of resampling is to change the speed of an audio file or upsampling the music so that it sounds more natural.

I dont know much about PAL / NTSC speed change or tempo correction but i have "upsampled" my music since i got my first "real" sound card. It was a creative audigy soundcard that had a real problem, back then it was unknown that it could play only in 48000Hz, 96000Hz and 192000Hz without sounding crappy. Somehow i witnessed that, music playing upsampled to 48000Hz sounded much more natural and pleasant on it. From this day on i have always resampled my music one way or the other and tested all mentioned resamplers. I think there's no better resampler than Sox (rate -v 48000Hz). In comparison the bass and highs are more musical sounding with a good resampler.

The command one-liner for resampling with Sox (in highest possible quality!), so that an 48000Hz file becomes 4% longer, would be :

CODE
Sox.exe YourFile.wav --buffer 16384 -f -b 64 -c 1 -t raw -f -b 64 -c 2 - | Sox.exe -t raw -r 48k -f -b 64 -c 2 - --buffer 16384 -t raw -f -b 64 -c 2 - rate -p 18 -v 50002 | sox.exe --buffer 16384 -t raw -r 48k -f -b 64 -c 2 - -s -b 32 High_Slower_Resampled_Stereo.wav


Pretty easy, eh? tongue.gif
Info: 48000 + 4,17% = 50002 you can change it in the middlepart (-v 50002)

If you want to try it, download my AC3 speedchange. Drag'n'Drop a .wav file on the Slower! Faster! files and the music is resampled by Sox +-4,17% , the resulting file is 32-bit (-s -b 32). Performance is okay, 1 minute of music in 9 seconds. See How-to in the download for full instructions on demuxing and decoding the AC3 stream in 32bit floating point.

http://sp-bausysteme.eu/ac3-speedchange.zip


Maybe i make a full featured gui for this programm. Please tell me what you think about it.



Canar
QUOTE (Kees de Visser @ May 24 2009, 04:38) *
Are your preferences solely based on the specs (graphs) or was there also listening involved ?
Like Ron Jones, there are very few resamplers that I can actually differentiate from unresampled. The FFT analyses at that site are well-done and let me select the best out of the ones that are indistinguishable from the original.
lvqcl
QUOTE (ZinCh @ May 29 2009, 21:36) *
Anyone know what resampler use LAME? I have tried to look into code, but was unsuccessful.

IMHO it is called bandlimited interpolation (with Blackman window).
ZinCh
QUOTE (lvqcl @ May 29 2009, 23:04) *
QUOTE (ZinCh @ May 29 2009, 21:36) *
Anyone know what resampler use LAME? I have tried to look into code, but was unsuccessful.

IMHO it is called bandlimited interpolation (with Blackman window).

thanks, found it here /lame/libmp3lame/util.c

/* resampling via FIR filter, blackman window */
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.