Supported audio codecs in videoroom plugins

1,041 views
Skip to first unread message

Pallab Gain

unread,
Mar 10, 2016, 2:04:20 AM3/10/16
to meetecho-janus
Hi !
Does Janus videoroom plugin supports PCMU, or iSAC audio codec ? Beside OPUS, what are the audio codecs supported by Janus MCU ?

Regards,
Pallab

Lorenzo Miniero

unread,
Mar 10, 2016, 7:05:16 AM3/10/16
to meetecho-janus
The VideoRoom by default forces Opus for audio and VP8 for video on all publishers, and this was by choice: in fact we wanted to be sure a codec all participants would support, and not end up in scenarios where a publisher would send stuff the other participants couldn't understand.

That said, yesterday we published a PR where you can choose a different video codec to force on all participants: https://github.com/meetecho/janus-gateway/pull/478
e.g., if you want/need your room to only use H.264 or VP9 instead of VP8. I guess the same approach could be done for audio too, but I don't see the point for that: video is a different beast, with people pulling in different directions, while for audio Opus has never been in discussion, it's a very good codec, everybody supports it and so it's the natural choice.

L.

Pallab Gain

unread,
Mar 10, 2016, 8:09:10 AM3/10/16
to meetecho-janus
Yes, I noticed the recent PR where we can now specify video codec during creating the room. It's amazing to see how Janus is growing, and becoming more mature every day. I understand your point of not thinking about other audio codec than OPUS, and I agree with you too.

Why we need PCMU codec ?
We are a Google Glass startup, and using Janus as our MCU. Janus gives us lowest latency, and Janus is very reliable for us. Unfortunately, Google Glass is very sensitive when it comes to CPU use. So, far we were using OPUS(complexity 1 ), and VP8 (  240x320x5 ) with minimum streaming profile possible from Glass. But, it is still not enough, and Glass is shutting down due to overheat. So, team from Google suggested us to try PCMU audio codec. That is why we need PCMU in Janus. 

In our use case, Google Glass acts as a publisher, and all the clients ( Chrome ) connected that Glass act as listeners. There can be at most one publisher, and at most fifty listeners in one video room. 

Can you please suggest me the implementation workflow a little bit if we want to add PCMU support ? We don't do any post processing in our video room plugin. We use video room as a SFU. So, for our use case, do we need to build G711, and add the PCMU encoder+decoder in video room plugin ? Or, changing the answer-er SDP from Janus video room plugin, and forwarding the received AV packets should simply work ?

Regards,
Pallab

Lorenzo Miniero

unread,
Mar 10, 2016, 8:24:26 AM3/10/16
to meetecho-janus
Il giorno giovedì 10 marzo 2016 14:09:10 UTC+1, Pallab Gain ha scritto:
Yes, I noticed the recent PR where we can now specify video codec during creating the room. It's amazing to see how Janus is growing, and becoming more mature every day. I understand your point of not thinking about other audio codec than OPUS, and I agree with you too.

Why we need PCMU codec ?
We are a Google Glass startup, and using Janus as our MCU. Janus gives us lowest latency, and Janus is very reliable for us. Unfortunately, Google Glass is very sensitive when it comes to CPU use. So, far we were using OPUS(complexity 1 ), and VP8 (  240x320x5 ) with minimum streaming profile possible from Glass. But, it is still not enough, and Glass is shutting down due to overheat. So, team from Google suggested us to try PCMU audio codec. That is why we need PCMU in Janus. 



Got it (and nice scenario by the way! always excited to see Janus being used in creative ways :-) )

 
In our use case, Google Glass acts as a publisher, and all the clients ( Chrome ) connected that Glass act as listeners. There can be at most one publisher, and at most fifty listeners in one video room. 

Can you please suggest me the implementation workflow a little bit if we want to add PCMU support ? We don't do any post processing in our video room plugin. We use video room as a SFU. So, for our use case, do we need to build G711, and add the PCMU encoder+decoder in video room plugin ? Or, changing the answer-er SDP from Janus video room plugin, and forwarding the received AV packets should simply work ?



If you want to do this yourself, you can either try and follow the same approach we used in the PR for video (allow for audio codec configuration) modifying the code, or you can try to simply modify the audio SDP template to force PCMU instead of Opus. The second one is probably easier and quicker: I guess that just defining OPUS_PT to 0 instead of 111 and changing opus/48000/2 to PCMU/8000 in the plugin code should do the trick, but I haven't tested it so I can't say for sure.

In the future I might work on the first approach myself, that is extending the PR from configuring video only to audio configuration too. Not sure when that would happen, though.

L.

Pallab Gain

unread,
Mar 10, 2016, 12:01:59 PM3/10/16
to meetecho-janus
Thank you so much for the good words, and help. I just successfully tested couple of round streaming sessions with PCMU/8000 audio codec in videoroom by changing audio SDP lines. Now, our CPU consumption in Glass became half than all previous AV session with OPUS. We are still testing it, and it will probably take one or two week to get a feedback from quality assurance team.

I will soon make the implementation as flexible as you did for video codecs in recent PR, and will probably try to send you a pull request if you may. Again thank you very much for being there for us, and the community. 

Regards,
Pallab
Reply all
Reply to author
Forward
0 new messages