How to enable h264 in peerconnection?

many environments say that h264 support in the hb64 browser in webrtc, but I can not find any information.

How to enable h264 in webrtc?

These are my mediaConstraints

var mediaConstraints = {
    video: {
        mandatory: {
           maxWidth: 640,
           maxHeight: 480
        }
    },
    audio: true
};
+4
source share
2 answers

It would seem that H264 is not supported by default. You will need to add the codec string manually to SDP before setting it as local and submitting the offer. They seem to be working very hard to figure this out. You can see this with the work that jesup does in his meetings on April 22 and April 29

, , SDP, .

, , Firefox, , h264 .

+2

Firefox 36.0.4 h264 SDP. , , H264:

....
m=video 9 RTP/SAVPF 120 126 97
....
a=rtpmap:97 H264/90000
....

97 - , H264. , .

+1

Source: https://habr.com/ru/post/1540334/


All Articles