Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Change codec ? #39

Open
Parilar opened this issue Nov 20, 2017 · 5 comments
Open

Change codec ? #39

Parilar opened this issue Nov 20, 2017 · 5 comments

Comments

@Parilar
Copy link

Parilar commented Nov 20, 2017

Hello,
is there any way to change the Audio codec to a smaller one for bad internet connections ?

@AlexKMDev
Copy link
Owner

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.

@Parilar
Copy link
Author

Parilar commented Nov 21, 2017

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

@AlexKMDev
Copy link
Owner

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.

@Parilar
Copy link
Author

Parilar commented Nov 21, 2017

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)

@AlexKMDev
Copy link
Owner

AlexKMDev commented Nov 21, 2017

Yeah, that's correct.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants