[RESOLVED] Trans coding for MOH

Hi,

I am using ffmpeg to play a stream as MusicOnHold. For example I am doing:

/usr/bin/ffmpeg  -i https://playerservices.streamtheworld.com/api/livestream-redirect/KVCXFM.mp3 -vn -ar 16000 -ac 1 -f s8 -

I was told that for every call that is placed on hold, there is some trans coding that needs to be done by Asterisk. I am trying to figure out the best way to do it. For instance how does Asterisk expect the audio format and what does it then do? How would Asterisk treat each of these lines?

/usr/bin/ffmpeg  -i https://playerservices.streamtheworld.com/api/livestream-redirect/KVCXFM.mp3 -vn -ar 16000 -ac 1 -f s8 -
/usr/bin/ffmpeg  -i https://playerservices.streamtheworld.com/api/livestream-redirect/KVCXFM.mp3 -vn -ar 8000 -ac 1 -f s16le -
/usr/bin/ffmpeg  -i https://playerservices.streamtheworld.com/api/livestream-redirect/KVCXFM.mp3 -vn -ar 4000 -ac 1 -f s32be -

Does one cause Asterisk “to do less work”?

RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz

So my best bet would be to use the line below?

/usr/bin/ffmpeg  -i https://playerservices.streamtheworld.com/api/livestream-redirect/KVCXFM.mp3 -vn -ar 8000 -ac 1 -f s16le -

s16le = PCM signed 16-bit little-endian

yes

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