[Libav-user] Using rematrix_maxval

gaetan.dubreil at free.fr gaetan.dubreil at free.fr
Mon Dec 4 22:26:45 EET 2017


Hello,

When I resample an audio file to the AV_SAMPLE_FMT_DBLP sample format with libswresample, I get some values out of the interval -1, 1. It happens when I resample from 44100 to 48000 for example. I tried to use the rematrix_maxval option like this :

  SwrContext *ctx = swr_alloc();
  ...
  av_opt_set_double(ctx, "rematrix_maxval", 1, 0);
  swr_init(ctx);

but it have no effect.
Does the way I use it are supposed to guarantee values between -1 and 1 or did I not understand its purpose?
I can solve the problem by setting the rematrix_volume option to 0.96 but I'm not sure it will work in all cases.

I wonder if being in 32 bits can be the cause of the problem.

Thank you in advance for your attention.


More information about the Libav-user mailing list