slomkowski / mumsi

SIP to Mumble gateway/bridge using PJSUA stack.
Apache License 2.0
41 stars 33 forks source link

config params #14

Closed pzi42 closed 7 years ago

pzi42 commented 8 years ago

I'm not shure wether this is the right place for my question.

I have now reduced the necessary Bandwith for mumsi. tTerefor communication in slow Networks (transferrate below 64kb/s) is possible.

My next step is implementing parmeters for Bitrate and Framesize. Framesize is set in mumsi, Bitrate is set in mumlib.

So any good idea how to implement two new config parameter "FRAMESIZE" and "BITRATE".

slomkowski commented 8 years ago

Can you write down the values for frame size and bitrate you have used?

I'll also think about parameter injection myself since it probably needs some redesign.

pzi42 commented 8 years ago

This ar my changes to mumsi and mumlib to make it work with lower bandwith. The current parameters are working for murmur bandwidth of 16000

mumlib/include/mumlib/Audio.hpp constexpr int BITRATE = 8000;

mumlib/src/Audio.cpp

    error = opus_encoder_ctl(opusEncoder, OPUS_SET_BITRATE(BITRATE));
    if (error != OPUS_OK) {
        throw AudioException((boost::format("failed to initialize transmission Bitrate: %d %s") % BITRATE  % opus_strerror(error)).str());
    }

mumsi/PjsuaCommunicator.cpp


            pj_status_t status = pjmedia_port_info_init(&(mediaPort.info),
                                                        &name,
                                                        PJMEDIA_SIG_CLASS_PORT_AUD('s', 'i'),
                                                        SAMPLING_RATE,
                                                        1,
                                                        16,
                                                        SAMPLING_RATE * 60 /
                                                        1000); // todo recalculate to match mumble specs
slomkowski commented 8 years ago

@pzi42 I updated Mumsi and Mumlib to support these settings.

pzi42 commented 8 years ago

@slomkowski Thank you. I will try it tomorrow.

pzi42 commented 8 years ago

I've tried, it compiled and started. Communication test isn't done yet. I will inform you after communication test ist done.

pzi42 commented 7 years ago

Hey, sorry I forgot to close the issue. New options are working, Thank You