Closed Forza-tng closed 2 years ago
Please use the --extra-output-options
option to supply the needed flags, such as:
-e '[ "-resampler", "soxr" ]'
Or -sample-fmt
etc.
PS: To give you some background as to why this extra-options option is there, I cannot reasonably manually include all possible ffmpeg options that people might want to use, so you can specify them directly. Otherwise it would be too much of a maintenance burden, apart from the different option naming convention (one dash vs two dashes) and potential option clashes.
Please use the
--extra-output-options
option to supply the needed flags, such as:-e '[ "-resampler", "soxr" ]'
Or
-sample-fmt
etc.
Thanks for the example. How would I add soxr options to the -e '[ "-resampler", "soxr" ]'
. I'd like to match the following filter line resampler=soxr:out_sample_rate=48000:precision=28:cheby=1:dither_method=triangular
You should be able to add:
"-out_sample_rate" , "48000"
to the array. The manual you linked to contains all the options. Please add the remaining ones accordingly.
The string you showed belongs to the filter usage. The extra options I demonstrated are for the regular ffmpeg command line.
Aggrrhh, pieces and clues.
What would be an example command line with SOX resampler then?
It seems ffmpeg-normalize in.wav -o out.wav -prf "aresample=resampler=soxr:osr=16000"
does not work.
The -prf
option is a pre-filter that gets applied before normalization. So you want a post-filter (-pof
):
ffmpeg-normalize in.wav -o out.wav -pof "aresample=resampler=soxr:osr=16000"
That, however, leads to an error — a known bug — that can be fixed by explicitly supplying the output channel format:
ffmpeg-normalize in.wav -f -o out.wav -pof "aresample=resampler=soxr:osr=16000" -e "-ac 2"
(Please note that "does not work" is usually not a good error description. It helps to explain what specifically does not work.)
Thanks for the info. I had checked with 6.0 and that still apparently has this bug.
Hi!
In order to get the best audio quality, it would be nice to use Soxr for sample rate conversion filter instead of the default 'swr' when it is available. In addition I'd like to see the possibility to specify the output bit depth, for example 24bit or 16bit, no matter what input format that is used.
https://ffmpeg.org/ffmpeg-resampler.html mentions that soxr is the preferable method.