Re: Change sample rate of an audio with best quality?
Reply #26 – 2025-01-25 12:32:59
Thanks for the replies so far. My post wasn't intended to make any product placements. I thought it was ok to continue the discussion in this old thread, sorry if I made a mistake here. Of course the main toppic was about sample rate conversions but pitch shifting somehow belongs to that too and was brought up here as well. I have to educate myself what double blind listening tests (ABX or ABC/HR) are to be able to post comparisons so please bear with me there. But I am willing to post those once a solution for the audacity pitch correction replacement is found, so no worries. My intentions for the conversions are more movie audio track than music related. 23,976fps speed with correct pitch, conversion to 25fps with higher pitch due to PAL speedup, 25fps with the same pitch as 23,976 which would sound too low when slowed down to 23,976 again and as to be pitch corrected and vice versa and so on and so forth for cases in 24fps as well. I usually used EAC3to to for speeding or slowing down the audio which somewhat is a natural conversion that the pitch is a bit lower when slowed down or a bit higher when sped up meaning that a 23,976fps sped up to 25 would sound correct when slowed down to 23,976 again without any audible loss of quality. For cases where somebody screwed with the pitch aside from the regular conversion I used audacity to do the pitch correction and applied that on the sped up/slowed down audio. So it is all a 2step scenario not an all on one conversion. For the regular speed up/slow down only process I replaced EAC3to with ffmpeg and went for the following: 23,976fps sped up to 25fps-drc_scale 0 -i %INPUTFILE% -af aresample=resampler=soxr:precision=20:osf=s16:dither_method=triangular,asetrate=50050 -ar 48000 -acodec pcm_s16le -f WAV %1%-25.wav 25fps slowed down to 23,976fps-drc_scale 0 -i %INPUTFILE% -af aresample=resampler=soxr:precision=20:osf=s16:dither_method=triangular,asetrate=46033.966 -ar 48000 -acodec pcm_s16le -f WAV %1%-23976.wav so the next step would be to find out how to apply a "stretch-free" pitch only correction to those while keeping the exact same length of the file such as audacity is able to do. That ascale solution with the ffmpeg fork sounds interesting. The pitch shifts I'm looking for are +/- 0,10, 0,71, 0,72, 0,68, 0,69 cents. PS.: of course I am willing to post this in a new thread is you want it that way, let me know