Using 'LPCM 44 kHz Stereo' codec with streamutil.c

JH
Jared Hagel
Fri, Jan 3, 2020 5:41 PM

Hi PJSIP enthusiasts,

Recently I’ve tried using the ‘LPCM 44 kHz Stereo' codec to stream a wav file in stereo format to a device. To do so I used the following arguments to streamutil.c:

--remote=172.23.44.1:4000 --play-file C:\pjproject-2.9\pjsip-apps\bin\samples\i386-win32-vc14-debug\file_example_Test_44_1.wav --codec  L16/44100/2

The file_example_Test_44_1.wav has a sample rate of 44.1kHz and has stereo channels (ie. left and right). When running this program I repeatedly get the error “Codec encode() error: Codec frame is too short (PJMEDIA_CODEC_EFRMTOOSHORT)”.

Is this a known bug with PJSIP 2.9 - PJSIP is no longer able to stream stereo audio using the LPCM codec? I suspect this is a bug because another similar post I found was this - https://github.com/chebur/pjsip/issues/70. I think this used to work based on this blog post - https://blog.pjsip.org/2008/03/31/doing-it-in-stereo/.

Any suggestions welcome!

Thanks,

Jared

Hi PJSIP enthusiasts, Recently I’ve tried using the ‘LPCM 44 kHz Stereo' codec to stream a wav file in stereo format to a device. To do so I used the following arguments to streamutil.c: --remote=172.23.44.1:4000 --play-file C:\pjproject-2.9\pjsip-apps\bin\samples\i386-win32-vc14-debug\file_example_Test_44_1.wav --codec L16/44100/2 The file_example_Test_44_1.wav has a sample rate of 44.1kHz and has stereo channels (ie. left and right). When running this program I repeatedly get the error “Codec encode() error: Codec frame is too short (PJMEDIA_CODEC_EFRMTOOSHORT)”. Is this a known bug with PJSIP 2.9 - PJSIP is no longer able to stream stereo audio using the LPCM codec? I suspect this is a bug because another similar post I found was this - https://github.com/chebur/pjsip/issues/70. I think this used to work based on this blog post - https://blog.pjsip.org/2008/03/31/doing-it-in-stereo/. Any suggestions welcome! Thanks, Jared