Audio encoder settings (Opus)

721 views
Skip to first unread message

Avital Yachin

unread,
Oct 10, 2018, 2:00:05 AM10/10/18
to meetecho-janus
Hi,

I'm trying to stream some music using the videoroom plugin.
Using the opus codec gives very poor audio quality.
I've seen several posts suggesting to use the maxaveragebitrate parameter in the a=fmtp line of the SDP, however, not sure if this affect only the receiving side or also tells the encoder what to use..
Has anyone experience with audio quality optimizations?
Is there any way to tell the browser to use higher bitrate for audio encoding?

Thanks.

Mirko Brankovic

unread,
Oct 10, 2018, 4:05:25 AM10/10/18
to meetecho-janus
Besides the Skypes Silk and g722.2 (ARM-WB) and g.729.1 Opus is maybe even best HD codec in my humble opinion.
Are you only using videroom publisher/subscriber or some rtp_forwarding/postprocessing?

--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Regards,
Mirko

Avital Yachin

unread,
Oct 10, 2018, 4:59:17 AM10/10/18
to meetecho-janus
I am using forwarding, however I tested the raw input from the browser by recording the incoming stream to .mjr file and convert to .opus using the janus-pp-rec tool.
The sounds quality suggests that the bitrate (not sample rate) in use changes quite a bit during the stream, so I guess possible direction would be to force some average bitrate, or even CBR.
Any ideas how to achieve that ?

Mirko Brankovic

unread,
Oct 10, 2018, 5:19:16 AM10/10/18
to meetecho-janus
Yeah because Opus has dynamic bitrate:
Opus supports constant and variable bitrate encoding from 6 kbit/s to 510 kbit/s, frame sizes from 2.5 ms to 120 ms, and five sampling rates from 8 kHz (with 4 kHz bandwidth) to 48 kHz (with 20 kHz bandwidth, the human hearing range).

Not sure if you can force it to be constant from Client entering VideoRoom point of view

Lorenzo Miniero

unread,
Oct 10, 2018, 6:00:45 AM10/10/18
to meetecho-janus
If it's adapting, it's likely reacting to the network, so forcing a high bitrate all the time may actually make the experience worse. Anyway, one way to force (or allow) a higher bitrate for Opus can be messing with the maxaveragebitrate fmtp property in SDP, see https://tools.ietf.org/html/rfc7587#section-6.1

That said, this sounds more like a question for discuss-webrtc,
Lorenzo

To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Regards,
Mirko
Reply all
Reply to author
Forward
0 new messages