On 20/01/15 19:07, Éloi Bail wrote: > Hi, > > We are using libav to encode / decode opus audio between two SIP clients. > > The encoding client use libopus while the decoding client use either libopus > (before libavcodec56) or opus native decoder (since libavcodec56). > Audio encoding format is signed 16 bits (AV_SAMPLE_FMT_S16), sample rate = > 48000 > > Using libopus for decoding, everything work fine. But using native libav opus > decoding, we see lot of noise in decoded audio. > > I compared encoder and decoder parameters set in libav. I saw first that FMT > used for decoding is AV_SAMPLE_FMT_FLTP (defined in opus_decode_init). > Replacing this value by AV_SAMPLE_FMT_S16 is not successful. Otherwise all > other parameters look correct. > > Does opus native decoder support AV_SAMPLE_FMT_S16 ? Any advice to > investigate this issue ? > > Thanks,
You should use avresample to get the output you expect: Since you are using a recent version you can leverage [avresample_convert_frame][1] to convert from FLTP to S16 quite simply. lu [1]https://libav.org/doxygen/release/11/group__lavr.html#gac3060330c9004aa7e88ba8d9d90b0689 _______________________________________________ libav-api mailing list libav-api@libav.org https://lists.libav.org/mailman/listinfo/libav-api