WebRTC
WebRTC copied to clipboard
Change codec ?
Hello, is there any way to change the Audio codec to a smaller one for bad internet connections ?
Hello. Take a look at this method for changing preffered video codec: https://chromium.googlesource.com/external/webrtc/+/branch-heads/61/webrtc/examples/objc/AppRTCMobile/ARDSDPUtils.m It shouldn't be hard to implement the same for audio. The point is that you need to change the codec priority in the m=audio line in your SDP.
That's help Thanks. Could you also help me with the codec ? Or where can i get Infos about the codec ?
Got these lines but dont know how to interpret m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
escriptionForDescription:(RTCSessionDescription *)description| preferredVideoCodec:(NSString *)codec {
how does the codec look ?
Thanks
They should be below with those numbers after UDP/TLS/RTP/SAVPF that represent their id's in order of priority.
https://webrtchacks.com/sdp-anatomy/ Codec Parameters section below Audio Lines.
Thanks for the help, i think now i understood how it works. I just have to change the m=audio line
m=audio 9 UDP/TLS/RTP/SAVPF 9 111 103 104 102 0 8 106 105 13 110 112 113 126
moving the 9 (a=rtpmap:9 G722/8000) to the front will improve my speed (When my thoughts are correct)
Yeah, that's correct.