[FFmpeg-user] Audio resampler (SoX) returns different result
林至善
g104972 at gmail.com
Tue Nov 20 04:03:48 EET 2018
Hello *Moritz*:
*Thank you so much for responding to my issue :)*
> Interesting. But first of all, I believe your command line is wrong.
> "-ar" uses ffmpeg's native resampler, I believe. Using the filter, you
> need to pass the rate to the filter itself:
> ffmpeg -i In16k.wav -af aresample=resampler=soxr:sample_rate=8000
Out8k.wav
I have tried it, but got the same result(resampler works well but slightly
different when I run this command again).
> You could also just use any other resampler, e.g. by omitting "-af
> aresample=resampler=soxr" fully.
Thanks! It is the default resampler I guess. It is deterministic.
But the default resampler brings some "aliasing" to the resampled auidio.
> I don't have soxr support, so I can't reproduce your issue. It should
> be deterministic. Perhaps some metadata thing.
Metadata. I am not sure what it means but I think it must be something
important.
Is it about my environment setting? Can I fix it?
//
----------------------------------------------------------------------------------------------------------------------------------
Hello *Carl Eugen*:
*So pleased to hear from you :)*
> Please always provide the command line you test together with
> the complete, uncut console output when asking for support here.
↓ run "ffmpeg -i Fsweep16.wav -af aresample=resampler=soxr -ar 8000
Fsweep8.wav"
[image: 159.JPG]
↓ run again.
[image: 147.JPG]
> FFmpeg's default resampler is deterministic.
Thank you for your advice. I tried this:
ffmpeg -i Fsweep16.wav -ar 8000 Fsweep8.wav
It works well and it is deterministic. It uses the resampler "swr" I guess,
but with slightly aliasing in resampled audio.
I think the 'soxr' is necessary in my case, but I am not sure if I should
ask for support here or libsxor?
//
----------------------------------------------------------------------------------------------------------------------------------
Thank you all again for your support.
LCS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 159.JPG
Type: image/jpeg
Size: 162294 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20181120/9a3e6ae2/attachment.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 147.JPG
Type: image/jpeg
Size: 163198 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20181120/9a3e6ae2/attachment-0001.jpe>
More information about the ffmpeg-user
mailing list