Re: [mpg123-users] Calling MPG123 from Asterisk, version behavior changed
Brought to you by:
sobukus
From: Thomas O. <tho...@or...> - 2021-09-11 12:38:42
|
Am Fri, 10 Sep 2021 18:33:32 +0200 schrieb Carlos Oliva <car...@nu...>: > Investigating the issue, I discovered that with old versions of mpg123 > everything works. but with Debian package version (1.26.4-1) or las 1.29 > version I always hear noise. Noise suggests that the sample encoding is different than expected. > > mpg123 -q -s -b 96 -f 8192 --mono -r 8000 http://server.url/file.mp3 > > out.sln > > using mpg123 version 1.26 or 1.29 I get a file of 424K > using mpg123 version 1.20.1 I get a file of 212K So you got a 14-second-track here that should get you 16 bit × 8000 Hz × 13.6 s = 212K but you get twice that? I'd assume that mpg123 creates f32 or s32 output, then. Please look at the output without -q and -vv instead. And yes … newer mpg123 does default to 32 bit float when the output supports it. Your output is a pipe/file without any preferences. I see that the current behaviour might be surprising and maybe it needs fixing. > Is there any command line switch I can use for having the same output than > in old version? I tried, but I couldn' t find how to make mpg123 work as In any case, you can specify -e s16 for 16 bit integer encoding. This works with mpg123 since ages now (I don't remember the exact version it was introduced, but it was much longer ago than 1.20). When not playing to a hardware device that prescribes encodings, it is best to be specific, like with --mono. Can you communicate that to the Asterisk folks in case they have defaults that miss this? At the same time, I am looking into whether it might be good to revert to the old behaviour of s16 stereo as default format for writing to files. 1.25.0 still worked that way. Since stable distros are slower to picking up new versions, some more people could still be surprised. Alrighty then, Thomas |