Multicast WAV file using ffmpeg

I’m hoping someone can help here as i’ve not been able to find anyone able to solve my issue with choppy sound caused by streaming to a variety of desktop voip phones.

Basically I am trying the following: I have a few wav files in WAV (8Khz, Mono, 16-Bit PCM) which all work fine on the phone when uploaded to FreePBX under system recordings and played back. No issues that way. But I have a few different models of Yealink phones as well as Snom phones and I have set them to listen to a multicast IP address and port. I then use ffmpeg to play that wav file to that IP address using the following command

ffmpeg -re -i Melody_file.wav -f rtp rtp://224.0.1.211:5001

This results in a horribly choppy audio playback. I’ve tried so may different setting changes on the ffmpeg command syntax and nothing works. The only thing that seems to improve it a little is if I add this following line to the syntax, and the thing that is helping is the 960 value.

-filter_complex “aresample=8000,asetnsamples=n=960”

even this isn’t perfect and is still horribly choppy. I’ve tried changing the multicast codec on the phones to PCMU and this doesn’t help either.

Can anyone help please? Below is a screenshot of the ffmpeg output. Can anyone help please?

I’ve made a slight breakthrough, the WAV files with 8000HZ 16Bit PCM are the ones with the problems. If i open the WAV files with Audacity and export it as 8000Hz 32Bit PCM and apply the following filter on ffmpeg:

-filter_complex “asetnsamples=n=160”

then it works perfectly. Does anyone kow what this filter is? would prefer to have the wav files in the correct format rather than having to filter the file

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.