Thanks Romain.

You know... now that you mention it, I think I saw that bitrate/samplerate 
correlation in the MPEG2 spec.

From my original email, I had another question about getting our existing speex 
data into a mp3 stream. The speex data is delivered (long story) to the machine 
running liqsoap and for now I'm writing it to the soundcard (temporary until I 
add_decoder()). Previously, I had success delivering the sound to browsers 
using input.portaudio but that only seems to capture sound from the input jack. 
What's the input.??? that captures whatever is playing on the card? Mplayer? 

Again this Windows 7, so the Unix related documentation is a bit hard to 
translate.

Thanks,
JimT. 

-----Original Message-----
From: Romain Beauxis [mailto:[email protected]] 
Sent: Thursday, June 11, 2015 8:05 AM
To: savonet-users
Cc: savonet
Subject: Re: [Savonet-users] Use Liquidsoap to send voice quality data to HTML5 
Browser <audio>

Hi Jim,

2015-06-10 17:33 GMT-05:00  <[email protected]>:
> I’m interested in sending voice quality data (bitrate=8) to HTML5 
> <audio> elements using Liquidsoap. Unfortunately, it doesn’t look like 
> any of the
> mp3 varieties (fxp, vbr, abr) in Liquidsoap allow bitrate=8. I realize 
> that speex  uses bitrate=8, but MP3 is preferred because IE, Chrome, 
> FF all support it in HTML5 (Windows 7).
>
>
>
> MPEG2 III states that it supports this bitrate, but Liquidsoap must be 
> MPEG1 III? Is there any way I can get this to work?

8 Kbps is only supported with MPEG II and MPEG 2.5 indeed. But, also, MPEG II 
and 2.5 are only used for specific samplerate. Here's the
documentation:
/* Tables of supported audio parameters & format.
 *
 * Valid samplerates and bitrates.
 * const int samplerates[9] = {
 *   44100, 48000, 32000, // MPEG-I
 *   22050, 24000, 16000, // MPEG-II
 *   11025, 12000, 8000   // MPEG-2.5
 * };
 *
 * const int bitrates[16][4] = {
 * //  MPEG version:
 * //  2.5, reserved,  II,  I
 *   { -1,  -1,        -1,  -1},
 *   { 8,   -1,         8,  32},
 *   { 16,  -1,        16,  40},
 *   { 24,  -1,        24,  48},
 *   { 32,  -1,        32,  56},
 *   { 40,  -1,        40,  64},
 *   { 48,  -1,        48,  80},
 *   { 56,  -1,        56,  96},
 *   { 64,  -1,        64, 112},
 *   { 80,  -1,        80, 128},
 *   { 96,  -1,        96, 160},
 *   {112,  -1,       112, 192},
 *   {128,  -1,       128, 224},
 *   {144,  -1,       144, 256},
 *   {160,  -1,       160, 320},
 *   { -1,  -1,        -1,  -1}
 *  };
 *
 */

So, you need to set the samplerate of your %mp3 encoder accordingly.
For instance, this works:
%mp3(bitrate=8,samplerate=22050)
and this as well:
%mp3(bitrate=8,samplerate=8000)

Romain

------------------------------------------------------------------------------
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users
------------------------------------------------------------------------------
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to